Automl module

The Automl features allows you to train an automl model with the advantage of an added Sanatio report on the newly trained model.

The automl object is returned to the user with a validation report.

How to access the feature?

from sanatio.code_generation import generate_sanatio_pipeline

automl_object = generate_sanatio_pipeline(...parameters...)

Parameters required for initialization

Parameter Name
Data Type
Optional

X_train

Data Frame

The training data used for the model

y_train

Data Series

The truth value used to train the model

X_test

Data Frame

The testing feature data split

y_test

Data Series

The ground truth data for testing

classification

Boolean

True if a classification model

regression

Boolean

True if a regression model

time

Int

Amount of time in seconds that the automl model can take.

Example

from sklearn.datasets import load_boston
from sklearn.model_selection import train_test_split
import pandas as pd

data = load_boston()
X,y = load_boston(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.33, random_state=1)
from sanatio.training.automl.pipeline_generation import generate_sanatio_pipeline

automl_object = generate_sanatio_pipeline(X_train=pd.DataFrame(X_train,columns=data.feature_names), 
                                          y_train=y_train, 
                                          X_test=pd.DataFrame(X_test,columns=data.feature_names), 
                                          y_test=y_test, 
                                          classification=False, regression=True, time=120)

Last updated