normalize: Normalize features

Description Usage Arguments Details Value Author(s) Examples

View source: R/normalize.R

Description

Normalize input data so that the values for all features cover the same range -1 to 1.

Usage

1
normalize(rawfeatures, meta = NULL)

Arguments

rawfeatures

data frame with the feature values to normalize.

meta

meta data to use for the normalization. If supplied should be a list with members minValues that contains the minimum values for all features and maxValues that contains the maximum values for all features. Will be computed if not supplied.

Details

normalize subtracts the minimum (supplied or computed) from all values of a feature, divides by the difference between maximum and minimum, multiplies by 2 and subtracts 1. The range of the values for all features will be -1 to 1.

Value

features

the normalized feature vectors.

meta

the minimum and maximum values for each feature before normalization. Can be used in subsequent calls to normalize for new data.

Author(s)

Lars Kotthoff

Examples

1
2
3
4
5
6
if(Sys.getenv("RUN_EXPENSIVE") == "true") {
data(satsolvers)
folds = cvFolds(satsolvers)

cluster(clusterer=makeLearner("cluster.XMeans"), data=folds, pre=normalize)
}

llama documentation built on March 17, 2021, 1:06 a.m.