Normalize input data so that the values for all features cover the same range -1 to 1.
normalize(rawfeatures, meta = NULL)
data frame with the feature values to normalize.
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.
the normalized feature vectors.
the minimum and maximum values for each feature before
normalization. Can be used in subsequent calls to normalize
for new
data.
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.
# NOT RUN {
if(Sys.getenv("RUN_EXPENSIVE") == "true") {
data(satsolvers)
folds = cvFolds(satsolvers)
cluster(clusterer=makeLearner("cluster.XMeans"), data=folds, pre=normalize)
}
# }
Run the code above in your browser using DataLab