Skip to content

Fitting module updates

Summary of changes

  • Added new kwarg to all optimizers standardize which is True by default.
  • Added new fit.py which contains a wrapper fit function (which handles the standardization)
  • The available_fit_methods is now located in fit.py rather than in base_optimizer.py
  • The number of nonzero parameters have been added to the BaseOptimizer as a property and included in summary and __str__
  • Smaller clean ups here and there

Comments

  • The normalization or standardization is done via the methods available in sklearn in their preprocessing module
  • In the optimizers the fit matrix and parameters are not changed, its only in the new fit method where the scaling and then rescaling happens.
  • This is done without copying the fit_matrix and hence the fit_matrix goes through a transform and then an inverse_transform which might change it slightly numerically.
  • Nothing is done in regards to centering the fit matrix or fit data only rescaling of the fit matrix.

Closes #259 (closed) #263 (closed)

Edited by Erik Fransson

Merge request reports