Skip to content

Commit

Permalink
Add enumerations for primitive types
Browse files Browse the repository at this point in the history
  • Loading branch information
roquelopez committed Mar 15, 2024
1 parent d71eecc commit 70303c8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions alpha_automl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import numpy as np
import pandas as pd
import torch
from enum import Enum
from sklearn.compose import ColumnTransformer
from sklearn.preprocessing import LabelEncoder
from sklearn.model_selection import ShuffleSplit, train_test_split
Expand All @@ -24,6 +25,25 @@
RANDOM_SEED = 0


class PrimitiveType(Enum):
IMPUTER = 'IMPUTER'
CATEGORICAL_ENCODER = 'CATEGORICAL_ENCODER'
DATETIME_ENCODER = 'DATETIME_ENCODER'
TEXT_ENCODER = 'TEXT_ENCODER'
IMAGE_ENCODER = 'IMAGE_ENCODER'
FEATURE_SCALER = 'FEATURE_SCALER'
FEATURE_SELECTOR = 'FEATURE_SELECTOR'
COLUMN_TRANSFORMER = 'COLUMN_TRANSFORMER'
TIME_SERIES_FORECASTER = 'TIME_SERIES_FORECASTER'
CLASSIFIER = 'CLASSIFIER'
REGRESSOR = 'REGRESSOR'
CLUSTERER = 'CLUSTERER'
SINGLE_ENSEMBLER = 'SINGLE_ENSEMBLER'
MULTI_ENSEMBLER = 'MULTI_ENSEMBLER'
SEMISUPERVISED_SELFTRAINER = 'SEMISUPERVISED_SELFTRAINER'
SEMISUPERVISED_LABELPROPAGATOR = 'SEMISUPERVISED_LABELPROPAGATOR'


def create_object(import_path, class_params=None):
if class_params is None:
class_params = {}
Expand Down

0 comments on commit 70303c8

Please sign in to comment.