Skip to main content

Module preprocessing

Module preprocessing 

Source
Expand description

Feature scaling, splitting and expansion.

See the book entry Foundations.

Structs§

MinMaxScaler
Rescales each column linearly onto [0, 1] (constant columns map to 0).
StandardScaler
Standardises each column to zero mean and unit variance (constant columns are only centred).

Functions§

polynomial_features
Polynomial feature expansion of a single column up to degree (columns x, x², ..., x^degree).
select
Selects entries of a vector.
select_labels
Selects entries of a label slice.
select_rows
Selects rows of a matrix.
train_test_split
Shuffles sample indices and splits them into (train, test) index lists, with test_fraction of the samples (at least one, and leaving at least one) in the test set.