znorm: Z-score normalization

Description Usage Arguments Details Value Author(s) References Examples

View source: R/znorm.R

Description

This is a function to apply z-Score normalization to a matrix or dataframe.

Usage

1

Arguments

data

The dataset to be normalized, including classes

Details

By using this type of normalization, the mean of the transformed set of data points is reduced to zero by subtracting the mean of each attribute from the values of the attributes and dividing the result by the standard deviation of the attribute. Uses the function scale found in the base library.

Removes classes before normalization, and returns normalized data set complete with classes rejoined.

Value

zdata

the normalized data set

Author(s)

Caroline Rodriguez and Edgar Acuna

References

Hann, J., Kamber, M. (2000). Data Mining: Concepts and Techniques. Morgan Kaufman Publishers.

Examples

1
2
3
4
5
6
7
##---- Z-norm normalization ----
data(diabetes)
diab.znorm=znorm(diabetes)
op=par(mfrow=c(2,1))
plot(diabetes[,1])
plot(diab.znorm[,1])
par(op)

Example output

Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 

dprep documentation built on May 29, 2017, 11:01 a.m.