streamline.modeling.modeljob module

class streamline.modeling.modeljob.ModelJob(full_path, output_path, experiment_name, cv_count, class_label='Class', instance_label=None, scoring_metric='balanced_accuracy', metric_direction='maximize', n_trials=200, timeout=900, training_subsample=0, uniform_fi=False, save_plot=False, random_state=None)[source]

Bases: Job

Parameters:
  • full_path

  • output_path

  • experiment_name

  • cv_count

  • class_label

  • instance_label

  • scoring_metric

  • metric_direction

  • n_trials

  • timeout

  • uniform_fi

  • save_plot

  • random_state

data_prep()[source]

Loads target cv training dataset, separates class from features and removes instance labels.

static export_best_params(file_name, param_grid)[source]

Exports the best hyperparameter scores to output file.

run(model)[source]
Parameters:

model – model object

run_model(model)[source]
Parameters:

model – model object

Returns: list of metrics [metric_list, fpr, tpr, roc_auc, prec, recall, prec_rec_auc, ave_prec, fi, probas]

save_runtime()[source]

Save ML algorithm training and evaluation runtime for this phase.