actableai.utils.preprocessors package

Submodules

actableai.utils.preprocessors.autogluon_preproc module

class actableai.utils.preprocessors.autogluon_preproc.CustomeDateTimeFeatureGenerator(features: list = ['year', 'month', 'day', 'dayofweek'], **kwargs)

Bases: autogluon.features.generators.datetime.DatetimeFeatureGenerator

class actableai.utils.preprocessors.autogluon_preproc.DMLFeaturizer(ct=None)

Bases: sklearn.base.TransformerMixin

fit(X, y=None)
transform(X)

actableai.utils.preprocessors.preprocessing module

class actableai.utils.preprocessors.preprocessing.CopyTransformer

Bases: sklearn.base.TransformerMixin, sklearn.base.BaseEstimator

fit(X)
transform(X, y=None)
class actableai.utils.preprocessors.preprocessing.MultiCountVectorizer(ngram_range=(1, 2), max_features=1000)

Bases: sklearn.base.TransformerMixin, sklearn.base.BaseEstimator

Repeated Count Vectorizer on multiple columns

Parameters
  • TransformerMixin (_type_) – _description_
  • BaseEstimator (_type_) – _description_
fit(X, y=None, **fit_params)
fit_transform(X, y=None, **fit_params)

Fit to data, then transform it.

Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X.

Parameters
  • X (array-like of shape (n_samples, n_features)) – Input samples.
  • y (array-like of shape (n_samples,) or (n_samples, n_outputs), default=None) – Target values (None for unsupervised transformations).
  • **fit_params (dict) – Additional fit parameters.
Returns

X_new – Transformed array.

Return type

ndarray array of shape (n_samples, n_features_new)

get_feature_names_out(input_features=None)
transform(X, y=None)
class actableai.utils.preprocessors.preprocessing.PercentageTransformer

Bases: sklearn.base._OneToOneFeatureMixin, sklearn.base.BaseEstimator, sklearn.base.TransformerMixin

Percentage Transformer that transforms strings with percentages into floats

Parameters
  • BaseEstimator (BaseEstimator) – SKLearn BaseEstimator
  • TransformerMixin (TransformerMixin) – SKLearn TransformerMixin
fit_transform(X, y=None, **fit_params)

Fit to data, then transform it.

Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X.

Parameters
  • X (array-like of shape (n_samples, n_features)) – Input samples.
  • y (array-like of shape (n_samples,) or (n_samples, n_outputs), default=None) – Target values (None for unsupervised transformations).
  • **fit_params (dict) – Additional fit parameters.
Returns

X_new – Transformed array.

Return type

ndarray array of shape (n_samples, n_features_new)

static selector(df)
transform(X, y=None)
class actableai.utils.preprocessors.preprocessing.SKLearnAGFeatureWrapperBase(ag_feature_generator)

Bases: sklearn.base.TransformerMixin, sklearn.base.BaseEstimator

SKLearn Transformer Wrapper around AutoGluonFeature Generator

Parameters
  • TransformerMixin (_type_) – _description_
  • BaseEstimator (_type_) – _description_
fit(X, **kwargs)
fit_transform(X, y=None, **fit_params)

Fit to data, then transform it.

Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X.

Parameters
  • X (array-like of shape (n_samples, n_features)) – Input samples.
  • y (array-like of shape (n_samples,) or (n_samples, n_outputs), default=None) – Target values (None for unsupervised transformations).
  • **fit_params (dict) – Additional fit parameters.
Returns

X_new – Transformed array.

Return type

ndarray array of shape (n_samples, n_features_new)

get_feature_names_out(input_features=None)
transform(X, y=None)
actableai.utils.preprocessors.preprocessing.impute_df(df, numeric_imputer=None, categorical_imputer=None)

Module contents