Usecase configuration¶
-
class
previsionio.usecase_config.
ColumnConfig
(target_column: Optional[str] = None, filename_column: Optional[str] = None, id_column: Optional[str] = None, fold_column: Optional[str] = None, weight_column: Optional[str] = None, time_column: Optional[str] = None, group_columns: Optional[List[str]] = None, apriori_columns: Optional[List[str]] = None, drop_list: Optional[List[str]] = None)¶ 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 (list(str), optional) – Names of the columns in the dataset that define a unique time serie for a timeseries usecase
- apriori_columns (list(str), optional) – Names of the columns that are known a priori 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.
TrainingConfig
(profile: previsionio.usecase_config.Profile = <Profile.Quick: 'quick'>, advanced_models: List[previsionio.usecase_config.AdvancedModel] = [<AdvancedModel.XGBoost: 'XGB'>, <AdvancedModel.LinReg: 'LR'>], normal_models: List[previsionio.usecase_config.NormalModel] = [<NormalModel.XGBoost: 'XGB'>, <NormalModel.LinReg: 'LR'>], simple_models: List[previsionio.usecase_config.SimpleModel] = [], features: List[previsionio.usecase_config.Feature] = [<Feature.Frequency: 'freq'>, <Feature.TargetEncoding: 'tenc'>, <Feature.Counts: 'Counter'>], with_blend: bool = False, feature_time_seconds: int = 3600, feature_number_kept: Optional[int] = None)¶ Training configuration that holds the relevant data for a usecase description: the wanted feature engineering, the selected models, the training speed…
Parameters: - profile (Profile) –
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
- advanced_models (list(AdvancedModel), optional) – Names of the advanced models to use in the usecase (among: “LR”, “RF”, “ET”, “XGB”, “LGB”, “CB” and “NN”). The advanced models will be hyperparametrized, resulting in a more accurate modelization at the cost of a longer training time.
- normal_models (list(NormalModel), optional) – Names of the (normal) models to use in the usecase (among: “LR”, “RF”, “ET”, “XGB”, “LGB”, “CB”, ‘NB’ and “NN”). The normal models only use default parameters.
- simple_models (list(SimpleModel), optional) – Names of the (simple) models to use in the usecase (among: “LR” and “DT”). These models are easy to ineterpret and fast to train but only offer a limited modelization complexity.
- features (list(Feature), 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)
- feature_time_seconds (int, optional) – feature selection take at most fsel_time in seconds
- feature_number_kept (int, optional) – a feature selection algorithm is launched to keep at most feature_number_kept features
- profile (Profile) –
-
class
previsionio.usecase_config.
TypeProblem
¶ Type of supervised problems available with Prevision.io.
-
Classification
= 'classification'¶ Prediction using classification approach, for when the output variable is a category
-
MultiClassification
= 'multiclassification'¶ Prediction using classification approach, for when the output variable many categories
-
ObjectDetection
= 'object-detection'¶ Detection of pattern in images
-
Regression
= 'regression'¶ Prediction using regression problem, for when the output variable is a real or continuous value
-
TextSimilarity
= 'text-similarity'¶ Ranking of texts by keywords
-
-
class
previsionio.usecase_config.
UsecaseState
¶ Possible state of a Usecase in Prevision.io
-
Done
= 'done'¶ The usecase finished properly
-
Failed
= 'failed'¶ The usecase finished with an error
-
Pending
= 'pending'¶ The usecase is waiting for hardware ressources
-
Running
= 'running'¶ The usecase is still running
-
-
class
previsionio.usecase_config.
YesOrNo
¶ An enumeration.
-
class
previsionio.usecase_config.
YesOrNoOrAuto
¶ An enumeration.