Reorganize the project structure
pvk-developer opened this issue · 0 comments
pvk-developer commented
Due to a structure that is making it hard to implement new hyperparameters and confusing at the same time, a lac of documentation and other issues that makes working with BTB
complicated, a new structure is being proposed as follows:
- Hyperparameter: A base class that defines an abstraction for all the hyperparameters (see the structure below). New hyperparameters can inherit from this class for a simple and quick implementation, having the base types of each class holding it's corresponding hyperparams (
boolean, categorical, numerical...
) each one in a separated file. - Tunable class which holds a collection of hyperparameters with metadata such as contraints and conditions and this class being able to interact with all of the hyperparameters defined.
- Acquisition Function, which will be a
mixin
that theTuner
class will have to extend a long side of anMetaModel
which will also be amixin
. - MetaModel, a
mixin
that defines themodel
and it's private functions such as_fit
and_predict
which are public at the moment but the final user should not have to use them directly. - Tuner, a class that will inherit from the
mixins
explained above, will have an abstract class which will implement :best_score
,best_params
as properties (which are not documented at the moment and are private). This class will work with a single objectTunable
instad of a list. Also, some rename of the methods, likeadd
, torecord
to reflect better it's function should be made.
The new project structure would be similar to this:
├── btb
│ ├── __init__.py
│ ├── selection
│ │ └── __init__.py
│ └── tuning
│ ├── acquisition
│ │ └── base.py
│ ├── hyperparams
│ │ ├── base.py
│ │ └── __init__.py
│ ├── __init__.py
│ ├── metamodels
│ │ ├── base.py
│ │ └── __init__.py
│ ├── tunable.py
│ └── tuners
│ ├── base.py
│ └── __init__.py