Usecase configuration

class previsionio.usecase_config.ColumnConfig(target_column=None, filename_column=None, id_column=None, fold_column=None, weight_column=None, time_column=None, group_columns=(), apriori_columns=(), drop_list=())

Column configuration for starting a usecase: this object defines the role of specific columns in the dataset (and optionally the list of columns to drop).

Parameters:
  • target_column (str, optional) – Name of the target column in the dataset
  • id_column (str, optional) – Name of the id column in the dataset that does not have any signal and will be ignored for computation
  • fold_column (str, optional) – Name of the fold column used that should be used to compute the various folds in the dataset
  • weight_column (str, optional) – Name of the weight column used to assign non-equal importance weights to the various rows in the dataset
  • filename_column (str, optional) – Name of the filename column in the dataset for an image-based usecase
  • time_column (str, optional) – Name of the time column in the dataset for a timeseries usecase
  • group_columns (str, optional) – Name of the target column in the dataset for a timeseries usecase
  • apriori_columns (str, optional) – Name of the target column in the dataset for a timeseries usecase
  • drop_list (list(str), optional) – Names of all the columns that should be dropped from the dataset while training the usecase
class previsionio.usecase_config.Feature

Types of feature engineering that can be applied to a dataset with Prevision.io. The Full member is a shortcut to get all available feature engineering modules at once. To just drop a feature engineering module from a list of modules, use:

Feature.drop(Feature.xxx)
Counts = 'Counter'

Value type counting

DateTime = 'Date'

Date transformation

Frequency = 'freq'

Frequency encoding

Full = ['Counter', 'Date', 'freq', 'text_tfidf', 'text_word2vec', 'text_embedding', 'tenc', 'poly', 'pca', 'kmean']

Full feature engineering

KMeans = 'kmean'

K-Means clustering

PCA = 'pca'

Principal component analysis

PolynomialFeatures = 'poly'

Polynomial feature

TargetEncoding = 'tenc'

Target encoding

TextEmbedding = 'text_embedding'

Sentence embedding

TextTfidf = 'text_tfidf'

Statistical analysis

TextWord2vect = 'text_word2vec'

Word embedding

class previsionio.usecase_config.LiteModel

Types of lite models that can be trained with Prevision.io. The Full member is a shortcut to get all available models at once. To just drop a single model from a list of models, use:

Model.drop(Model.xxx)
ExtraTrees = 'ET'

ExtraTrees

Full = ['LGB', 'XGB', 'NN', 'ET', 'LR', 'RF', 'NBC']

Evaluate all models

LightGBM = 'LGB'

LightGBM

LinReg = 'LR'

Linear Regression

NaiveBayesClassifier = 'NBC'

Random Forest

NeuralNet = 'NN'

NeuralNet

RandomForest = 'RF'

Random Forest

XGBoost = 'XGB'

XGBoost

class previsionio.usecase_config.Model

Types of normal models that can be trained with Prevision.io. The Full member is a shortcut to get all available models at once. To just drop a single model from a list of models, use:

LiteModel.drop(LiteModel.xxx)
ExtraTrees = 'ET'

ExtraTrees

Full = ['LGB', 'XGB', 'NN', 'ET', 'LR', 'RF']

Evaluate all models

LightGBM = 'LGB'

LightGBM

LinReg = 'LR'

Linear Regression

NeuralNet = 'NN'

NeuralNet

RandomForest = 'RF'

Random Forest

XGBoost = 'XGB'

XGBoost

class previsionio.usecase_config.ParamList

A list of params to be passed to a usecase.

class previsionio.usecase_config.Profile

Training profile type.

Advanced = 'advanced'

Slowest profile, for maximal optimization

Normal = 'normal'

Normal profile, best balance

Quick = 'quick'

Quickest profile, lowest predictive performance

class previsionio.usecase_config.SimpleModel

Types of simple models that can be trained with Prevision.io. The Full member is a shortcut to get all available simple models at once. To just drop a single model from a list of simple models, use:

SimpleModel.drop(SimpleModel.xxx)
DecisionTree = 'DT'

DecisionTree

Full = ['DT', 'LR']

Evaluate all simple models

LinReg = 'LR'

Linear Regression

class previsionio.usecase_config.TrainingConfig(profile='normal', normal_models=['LGB', 'XGB', 'NN', 'ET', 'LR', 'RF'], lite_models=['LGB', 'XGB', 'NN', 'ET', 'LR', 'RF', 'NBC'], simple_models=['DT', 'LR'], features=['Counter', 'Date', 'freq', 'text_tfidf', 'text_word2vec', 'text_embedding', 'tenc', 'poly', 'pca', 'kmean'], with_blend=False, fe_selected_list=[])

Training configuration that holds the relevant data for a usecase description: the wanted feature engineering, the selected models, the training speed…

Parameters:
  • profile (str) –

    Type of training profile to use:

    • ”quick”: this profile runs very fast but has a lower performance (it is recommended for early trials)
    • ”advanced”: this profile runs slower but has increased performance (it is usually for optimization steps at the end of your project)
    • the “normal” profile is something in-between to help you investigate an interesting result
  • models (list(str), optional) – Names of the (normal) models to use in the usecase (among: “LR”, “RF”, “ET”, “XGB”, “LGB” and “NN”)
  • simple_models (list(str), optional) – Names of the (normal) models to use in the usecase (among: “LR” and “DT”)
  • features (list(str), optional) – Names of the feature engineering modules to use (among: “Counter”, “Date”, “freq”, “text_tfidf”, “text_word2vec”, “text_embedding”, “tenc”, “ee”, “poly”, “pca” and “kmean”)
  • with_blend (bool, optional) – If true, Prevision.io’s pipeline will add “blend” models at the end of the training by cherry-picking already trained models and fine-tuning hyperparameters (usually gives even better performance)
  • fe_selected_list (list(str), optional) – Override for the features list, to restrict it only this list
class previsionio.usecase_config.TypeProblem

Type of supervised problems available with Prevision.io.

Classification = 'classification'

Classification

Clustering = 'clustering'

Clustering

MultiClassification = 'multiclassification'

Multi Classification

Regression = 'regression'

Regression