Baselines Pipelines

This module is used to evaluate the incoming dataset with classical baselines that the user can easily modify and use interactively.

Classifier

class deephyper.baseline.classifier.BaseClassifierPipeline(clf=sklearn.neighbors.KNeighborsClassifier, load_data_func=<function BaseClassifierPipeline.<lambda>>, preproc=sklearn.pipeline.Pipeline, seed=42)[source]

Baseline classifier to evaluate the problem at stake.

>>> from sklearn.neighbors import KNeighborsClassifier
>>> from deephyper.baseline import BaseClassifierPipeline
>>> from sklearn.datasets import load_digits
>>> load_data = lambda : load_digits(return_X_y=True)
>>> baseline_classifier = BaseClassifierPipeline(KNeighborsClassifier(), load_data)
>>> baseline_classifier.run() 
accuracy_score on Train:...
accuracy_score on Test:...

Regressor

class deephyper.baseline.regressor.BaseRegressorPipeline(clf=sklearn.ensemble.RandomForestRegressor, load_data_func=<function BaseRegressorPipeline.<lambda>>, preproc=sklearn.pipeline.Pipeline, seed=42)[source]

Baseline regressor to evaluate the problem at stake.

>>> from sklearn.ensemble import RandomForestRegressor
>>> from deephyper.baseline import BaseRegressorPipeline
>>> from sklearn.datasets import load_boston
>>> load_data = lambda : load_boston(return_X_y=True)
>>> baseline_regressor = BaseRegressorPipeline(RandomForestRegressor(n_jobs=4), load_data)
>>> baseline_regressor.run() 
r2_score on Train:...
r2_score on Test:...