MLBazaar/BTB

Implementation of Tuners for the new structure

pvk-developer opened this issue · 0 comments

As part of #131 , the new Tuner class will have some enhancements regarding to the actual version:

Our BaseTuner will implement the following methods:

  • _fit : This method is changed to private as the final user should not use be calling this method directly. This method will come from a MetaModel which the tuner will have to inherit from.
  • _predict: This method is changed to private as the final user should not use be calling this method directly. This method will come from a MetaModel which the tuner will have to inherit from.
  • _acquire: This method being inherit from a mixin AcquisionFunction.
  • propose: This method should be the same as it is now.
  • record: Renamed the method add to better reflect the user story of recording results.

Also we will have the following properties:

  • best_score: which is being private at the moment and undocumented. This will contain the best score obtained so far.
  • best_params: which is also private and undocumented. This will contain the hyperparameters values regarding the best_score.

As explained above, we will have two mixin classes that our BaseTuner will have to inherit from: MetaModel and AcquisitionFunction. Both of this classes will have it's abstract methods to be implemented by their child classes.

  • MetaModel will have : _init_model which will create the model instance. _fit which will fit the model, _predict which will return predictions from the fitted model.
  • AcquisitionFunction will have: _acquire which will evaluate the list of predictions, and will evaluate which is the best of them.

By having this structure we will have a good code re-usability and allow a tuner to combine different mixins quicker and in a more simple way.