Source code for watson_machine_learning_client.utils.autoai.enums

from enum import Enum

__all__ = [
    "ClassificationAlgorithms",
    "RegressionAlgorithms",
    "PredictionType",
    "Metrics",
    "DataConnectionTypes",
    "RunStateTypes",
    "PipelineTypes",
    "Directions",
    "TShirtSize",
    "MetricsToDirections"
]


[docs]class ClassificationAlgorithms(Enum): """Classification algorithms that AutoAI could use.""" EX_TREES = "ExtraTreesClassifierEstimator" GB = "GradientBoostingClassifierEstimator" LGBM = "LGBMClassifierEstimator" LR = "LogisticRegressionEstimator" RF = "RandomForestClassifierEstimator" XGB = "XGBClassifierEstimator" DT = "DecisionTreeClassifierEstimator"
[docs]class RegressionAlgorithms(Enum): """Regression algorithms that AutoAI could use.""" RF = "RandomForestRegressorEstimator" RIDGE = "RidgeEstimator" EX_TREES = "ExtraTreesRegressorEstimator" GB = "GradientBoostingRegressorEstimator" LR = "LinearRegressionEstimator" XGB = "XGBRegressorEstimator" LGBM = "LGBMRegressorEstimator" DT = "DecisionTreeRegressorEstimator"
[docs]class PredictionType: """ Supported types of learning. OneOf: [CLASSIFICATION, REGRESSION] """ CLASSIFICATION = "classification" REGRESSION = "regression"
[docs]class Metrics: """ Supported types of classification and regression metrics in autoai. """ ACCURACY_SCORE = "accuracy" AVERAGE_PRECISION_SCORE = "average_precision" F1_SCORE = "f1" LOG_LOSS = "neg_log_loss" PRECISION_SCORE = "precision" RECALL_SCORE = "recall" ROC_AUC_SCORE = "roc_auc" F1_SCORE_MICRO = "f1_micro" F1_SCORE_MACRO = "f1_macro" F1_SCORE_WEIGHTED = "f1_weighted" PRECISION_SCORE_MICRO = "precision_micro" PRECISION_SCORE_MACRO = "precision_macro" PRECISION_SCORE_WEIGHTED = "precision_weighted" RECALL_SCORE_MICRO = "recall_micro" RECALL_SCORE_MACRO = "recall_macro" RECALL_SCORE_WEIGHTED = "recall_weighted" EXPLAINED_VARIANCE_SCORE = "explained_variance" MEAN_ABSOLUTE_ERROR = "neg_mean_absolute_error" MEAN_SQUARED_ERROR = "neg_mean_squared_error" MEAN_SQUARED_LOG_ERROR = "neg_mean_squared_log_error" MEDIAN_ABSOLUTE_ERROR = "neg_median_absolute_error" ROOT_MEAN_SQUARED_ERROR = "neg_root_mean_squared_error" ROOT_MEAN_SQUARED_LOG_ERROR = "neg_root_mean_squared_log_error" R2_SCORE = "r2"
[docs]class DataConnectionTypes: """ Supported types of DataConnection. OneOf: [s3, FS] """ S3 = "s3" FS = 'fs' DS = 'data_asset'
[docs]class RunStateTypes: """ Supported types of AutoAI fit/run. """ COMPLETED = "completed" FAILED = "failed"
[docs]class PipelineTypes: """ Supported types of Pipelines. """ LALE = "lale" SKLEARN = "sklearn"
[docs]class Directions: """Possible metrics directions""" ASCENDING = "ascending" DESCENDING = "descending"
[docs]class TShirtSize: """ Possible sizes of the AutoAI POD Depends on the POD size, AutoAI could support different data sets sizes. S - small (2vCPUs and 8GB of RAM) M - Medium (4vCPUs and 16GB of RAM) L - Large (8vCPUs and 32GB of RAM)) XL - Extra Large (16vCPUs and 64GB of RAM) """ S = 's' M = 'm' L = 'l' XL = 'xl'
[docs]class MetricsToDirections(Enum): """Map of metrics directions.""" ROC_AUC = Directions.ASCENDING NORMALIZED_GINI_COEFFICIENT = Directions.ASCENDING PRECISION = Directions.ASCENDING AVERAGE_PRECISION = Directions.ASCENDING NEG_LOG_LOSS = Directions.DESCENDING RECALL = Directions.ASCENDING ACCURACY = Directions.ASCENDING F1 = Directions.ASCENDING PRECISION_MICRO = Directions.ASCENDING PRECISION_MACRO = Directions.ASCENDING PRECISION_WEIGHTED = Directions.ASCENDING F1_MICRO = Directions.ASCENDING F1_MACRO = Directions.ASCENDING F1_WEIGHTED = Directions.ASCENDING RECALL_MICRO = Directions.ASCENDING RECALL_MACRO = Directions.ASCENDING RECALL_WEIGHTED = Directions.ASCENDING NEG_ROOT_MEAN_SQUARED_ERROR = Directions.DESCENDING EXPLAINED_VARIANCE = Directions.ASCENDING NEG_MEAN_ABSOLUTE_ERROR = Directions.DESCENDING NEG_MEAN_SQUARED_ERROR = Directions.DESCENDING NEG_MEAN_SQUARED_LOG_ERROR = Directions.DESCENDING NEG_MEDIAN_ABSOLUTE_ERROR = Directions.DESCENDING NEG_ROOT_MEAN_SQUARED_LOG_ERROR = Directions.DESCENDING R2 = Directions.ASCENDING