-
Notifications
You must be signed in to change notification settings - Fork 1
[Abstract] Supervised Model
A Supervised Model is any machine learning model that learns by being supervised by a loss function, that quantifies how far its output is from what is desired.
It is an abstract class, so you need to instantiate one of its subclasses. You can create your own subclasses or use predefined ones:
- SkLearnModel
- Etc.
Anyway, to initialize any of the subclasses you'll have to give a design
. Depending on each family of models, the design
that is accepted changes. For instance, for the SkLearnModel you may only give designs that are SkLearn classifiers. refer to each specific family of models to know more.
Each Supervised Model has a setup
method, which should be called before any train-test session begins. This method might require some parameters.
To train it, just call the train
method, and give an object and a target:
model.train(object, target)
To test it based on the previous train, just call the test
method, and give an object and a target:
model.test(object, target)
You may not give a target and the prediction will be returned.
y = model.test(object)
To get the metrics and performance plots of the previous train-test session, call the report
method. You should give a Supervised Train Report :
y = model.report(reporter= SupervisedTrainReport(), show:bool, save_to:str)
Optionals:
-
show
: Report is printed to the terminal. -
save_to
: Report is saved as PDF in the specified directory.