Simple API

train_model ( data , target_to_predict , task , metric = 'auto' , time_budget = None , test_data = None )

Return a fully-trained model that has been selected and tuned for optimal performance on your data and task.

Parameters :
  • data ( str or pd.DataFrame ) –

    The input data. It can be one of the following options:
    • String - a CSV file path

    • Pandas DataFrame - a table

  • target_to_predict ( str ) – The name of the column in your data that is the target for the model to predict

  • task ( "classification" , "regression" or Task object ) – desired task

  • metric ( str , default="auto" ) – The name of the scoring metric that AutoML uses when selecting and tuning your model. If “auto”, an appropriate metric will be automatically chosen for your data and task.

  • time_budget ( float or None , default=None ) – The maximum time budget in seconds. if None, there is no maximum time budget.

  • test_data ( str or pd.DataFrame or None , default=None ) –

    Data that is used to estimate the quality of the trained model on data that it will evaluate in the future. It can be one of the following options:

    • String, a CSV file path

    • Pandas DataFrame, a table

    if None, the test scores are estimated automatically by reserving 20% of the training data for evaluation of the final model.

Returns :

A fully-trained model that is ready to predict the target on new data.

Return type :

Classifier or Regressor

evaluate_model_quality ( model , data )

Evaluate model quality

Parameters :
  • model ( Classifier , Regressor ) – The model to evaluate

  • data ( str , or pd.DataFrame ) –

    The data on which to evaluate the model. It can be one of the following options:

    • String - a CSV file path

    • Pandas DataFrame - a table

Returns :

score of the model on the provided data

Return type :

pd.DataFrame

load_model ( path )

Load the model from provided path

Parameters :

path ( str ) – location from which to load the model

Returns :

Loaded model

Return type :

Classifier, Regressor