fp_zscore: A feature preprocessor (FP) that z-score normalizes the data

Description Usage Details See Also Examples

View source: R/fp_zscore.R

Description

This feature preprocessor object finds the mean and standard deviation using the training data. The preprocessor then z-score transforms the training and test data using this mean and standard deviation by subtracting the mean and dividing by the standard deviation.

Usage

1

Details

This feature preprocessor object applies z-score normalization to each feature by calculating the mean and the standard deviation for each feature using the training data, and then subtracting the mean and dividing by the standard deviation for each feature in the training and test sets. This function is useful for preventing some classifiers from relying too heavily on particular features when different features can have very different ranges of values (for example, it is useful when decoding neural data because different neurons can have different ranges of firing rates).

See Also

Other feature_preprocessor: fp_select_k_features()

Examples

1
2
3
# The fp_zscore() constructor does not take any parameters. This object
# just needs to added to a list and passed to the cross-validator applied
fp <- fp_zscore()

emeyers/NDTr documentation built on Aug. 8, 2020, 3:41 p.m.