subrolesΒΆ

Subroles allow for more fine-granular control of how certain columns will be used by the pipeline.

A column can have no subrole, one subrole or several subroles.

Example:
# The Relboost feature learning algorithm will
# ignore this column.
my_data_frame.set_subroles(
    "my_column", getml.data.subroles.exclude.relboost)

# The Substring preprocessor will be applied to this column.
# But other preprocessors, feature learners or predictors
# are not excluded from using it as well.
my_data_frame.set_subroles(
    "ucc", getml.data.subroles.include.substring)

# Only the EmailDomain preprocessor will be applied
# to "emails". All other preprocessors, feature learners,
# feature selectors and predictors will ignore this column.
my_data_frame.set_subroles("emails", getml.data.subroles.only.email)