-
Notifications
You must be signed in to change notification settings - Fork 6
Auto Regression
The fastautoml.AutoRegressor class automatically select the best model for a regression problem. In particular, it computes the optimal subset of features, select the best family of models, and the best hyperparameters for the model selected. Please, refer to the Reference API (TDB) for a list of supported families of models.
In this example we are going to apply our auto regression class to the problem of estimate the price of houses, that is, the boston dataset included with sckit-learn.
>>> from fastautoml.fastautoml import AutoRegressor
>>> from sklearn.datasets import load_boston
>>> from sklearn.model_selection import train_test_split
>>> (X, y) = load_boston(return_X_y=True)
>>> X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=1)
>>> model = AutoRegressor()
>>> model.fit(X_train, y_train)
AutoRegressor()
>>> model.score(X_test, y_test)
0.8763987309111113
>>> type(model.model)
sklearn.tree.tree.DecisionTreeRegressorA key difference between the fastautoml library and other AutoML libraries is that we return one single model as the best possible model, instead of an ensamble of models. In this sense, the data scientst can reuse the results of the AutoRegressor and continue with the analysis.
For more information about how to select the optimal Regressor see the following blog entries:
- A Comparision of Time and Accuracy in AutoML libraries (TBD)
The following families of models are currently supported for the auto-regression part: