rolesΒΆ

A role determines if and how columns are handled during the construction of the DataModel and used by the feature learning algorithm (see feature_learning).

Example:
data_frame = getml.DataFrame.from_db(
    name=name,
    table_name=table_name,
    conn=conn
)

data_frame.set_role(
    ["store_nbr", "item_nbr"], getml.data.roles.join_key)
data_frame.set_role("date", getml.data.roles.time_stamp)
data_frame.set_role("units", getml.data.roles.target)

Attributes

categorical

Marks categorical columns.

join_key

Marks join keys.

numerical

Marks numerical columns.

target

Marks the column(s) we would like to predict.

text

Marks text columns.

time_stamp

Marks time stamps.

unused_float

Marks a FloatColumn as unused.

unused_string

Marks a StringColumn as unused.