Regression

Performs model training, testing, evaluations and deployment

deploy_model(estimator_name, host='localhost', port=8000)[source]
estimator_namestr,

Estimator name to be delpoyed

host{str, IPv4 or IPv6}, default=’localhost’

Hostname or ip address of the machine where API to be deployed

portint, default=8000

API listening port

get_estimators(multi_output=False, multi_task=False, names_only=True)[source]

Returns the list of available regression estimators

multi_outputbool, default=False

Future use

multi_taskbool, default=False

Future use

names_onlybool, default=True

Rerturn only the estimator name without metadata

train_test_evaluate(X_train, X_test, y_train, y_test, tune_models=None, metrics='default', multi_output=False, multi_task=False, target_scaling_strategy=None, save_pipeline_to_disk=True, experiment_name=None, run_name=None)[source]

Trains the data on the given dataset, evaluate the models and returns comparison metrics

X_trainpandas dataframe

Training data

X_testpandas dataframe

Test data

y_trainarray of shape (X_train.shape[0],)

Target values of training dataset

y_testarray of shape (X_test.shape[0],)

Target values of test dataset

tune_models{‘all’, None} or list of models to be trained, default=None

all: tune all regression models list: list of models to be trained None: hyperparameter tuning will not be performed

metrics{‘all’, ‘default’}, default=’default’
  • all:

    mean_absolute_error, mean_squared_error, r2_score, explained_variance_score, max_error, mean_squared_log_error, median_absolute_error, mean_absolute_percentage_error, mean_poisson_deviance, mean_gamma_deviance, mean_tweedie_deviance, d2_tweedie_score, mean_pinball_loss

  • default:

    mean_absolute_error, mean_squared_error, r2_score

multi_outputbool, default=False

Future use

multi_taskbool, default=False

Future use

target_scaling_strategy{‘StandardScaler’, ‘MinMaxScaler’, ‘MaxAbsScaler’, ‘RobustScaler’, None}, default=None

Scales the target variable before training the model

save_pipeline_to_diskbool, default=True

Save preprocessor and model training pipeline to the disk. Should be set to True if needs model to be deployed as an API

experiment_namestr, default=None

Name of the experiment

run_namestr,default=None

Name of the run within the experiment

Examples

Regression

regression_hyperparameter_tuning