learning_machine.engine#

Config#

create_engines_from_config(config)

Create engines from engine config list.

DataEngine#

DataEngine()

Data engine interface.

SequentialEngine(engines)

Apply engines sequentially.

Pandas utils#

ConcatDFs(engines)

Concat the outputs of the engines into pd.Dataframe

DropColumns(cols[, copy])

Drop columns from dataframe

DropNARow(cols[, copy])

Drop rows contain missing value in specific columns.

FillNaWithValue(cols, fillwith)

Fill nan rows with specific value.

FillNaFrom(col, from_col)

Fill nan value from another column.

Numerical operators#

BinaryOperator(col1, col2, operator, prefix)

Binary operate with two columns.

Add(col1, col2[, prefix])

Add two columns.

Sub(col1, col2[, prefix])

Subtract two columns.

Mul(col1, col2[, prefix])

Multiply two columns.

Div(col1, col2[, prefix])

Divide two columns.

Datetime#

StringToDatetime(col[, format])

String to pd.datetime object.

DatetimeDayOfYearSinCos(col[, prefix])

Periodically transforms the day of year.

DatetimeMonthOfYearSinCos(col[, prefix])

Periodically transform the month of year.

DatetimeDayOfMonthSinCos(col[, prefix, norm])

Periodically transform the day of month.

DatetimeDayOfWeekSinCos(col[, prefix])

Periodically transforms the day of week.

DatetimeDayOfYear(col[, prefix])

Get day of year from datetime column.

DatetimeMonthOfYear(col[, prefix])

Get month of year from datetime column.

DatetimeDayOfMonth(col[, prefix])

Get day of month from datetime column.

DatetimeDayOfWeek(col[, prefix])

Get day of week from datetime column.

DatetimeIsWeekend(col[, prefix, include_sat])

Get datetime is weekend.

Encoder#

OneHotEncoder(cols[, prefix, sparse_output])

Onehot encoder from scikit-learn.

LabelEncoder(col[, prefix])

Label encoder from scikit-learn.

Scaler#

StandardScaler(cols[, return_new, prefix])

Standard scaler from scikit-learn.

RobustScaler(cols[, return_new, prefix])

RobustScaler from scikit-learn.

MinMaxScaler(cols[, return_new, prefix])

MinMaxScaler from scikit-learn.