Learn R Programming

KODAMA (version 0.0.1)

scaling: Scaling methods

Description

Collection of Different Scaling Methods.

Usage

scaling(Xtrain,Xtest=NULL, method = "autoscaling")

Arguments

Xtrain
a matrix of data (training data set).
Xtest
a matrix of data (test data set).(by default = NULL).
method
the scaling method to be used. Choices are "none", "centering", "autoscaling", "rangescaling", "paretoscaling" (by default = "autoscaling"). A partial string sufficient to uniquely identify the choice is permitted.

Value

The function returns a list with 1 item or 2 items (if a test data set is present):
newXtrain
a scaled matrix (training data set).
newXtest
a scale matrix (test data set).

Details

A number of different scaling methods are provided:
  • "none": no scaling method is applied.
  • "centering": it centers the mean to zero.
  • "autoscaling": it centers the mean to zero and scales data by dividing each variable by the variance.
  • "rangescaling": it centers the mean to zero and scales data by dividing each variable by the difference between the minimum and the maximum value.
  • "paretoscaling": it centers the mean to zero and scales data by dividing each variable by the square root of the standard deviation. Unit scaling divides each variable by the standard deviation so that each variance equal to 1.

References

van den Berg RA, Hoefsloot HCJ, Westerhuis JA, et al. Centering, scaling, and transformations: improving the biological information content of metabolomics data. BMC Genomics 2006;7(1):142.

See Also

normalization