Class: TableFeaturesTransformer

TableFeaturesTransformer()

Converts a set of inputs, represented as matrix X with columns corresponding to the different features, into a numeric matrix X'. Can handle missing values and categorical columns. The type of column is detected automatically.

Constructor

new TableFeaturesTransformer()

Source:

Methods

column_type(C) → {String}

Determine if the column is numeric, categorical, or other.
Parameters:
Name Type Description
C Array 1d array of values, represents single column.
Source:
Returns:
Type of the output. Could be either 'category' or 'number'.
Type
String

fit(X, y, feature_names)

Determines the type of columns, and calculates all the necessary parameters for imputation of missing values and conversion of categorical values, if any.
Parameters:
Name Type Default Description
X Array Matrix of raw inputs, where columns correspond to different features.
y Array A vector of outputs. A type of problem could be determined from the type of the output.
feature_names Array null An array that contains names of the features as strings.
Source:

get_column(X, i)

Select a single column of matrix X.
Parameters:
Name Type Description
X Array nested array, represents matrix of raw inputs.
i Integer Index of the column to select
Source:

transform(X, y)

Convert some inputs to purely numerical features, suitable for further use in ML pipelines.
Parameters:
Name Type Default Description
X Array Matrix of raw inputs. These should be of the same format as the inputs used to `fit` method.
y Array null Vector of raw inputs.
Source: