breze-no-salt/breze

Initialization of models should only be the storing of parameters

bayerj opened this issue · 0 comments

Currently, when the constructor of a model is called, this triggers:

  1. Building of expressions
  2. Allocating of memory for the paramters
  3. Initialization of parameteres

This is not how sklearn does it, and thus we should do it differently as well. The proposal is to instead have a prepare method and a prepared flag. Before calling fit() or sth similar, the model is then prepared, which means that the above tasks are performed.

If a user deems it necessary (e.g. because she wants to use a custom parameter initialization scheme) she can prepare the model explicitly.