View source: R/trans_norm_zscore.R
| zscore | R Documentation |
Standardize numeric columns to zero mean and unit variance, optionally rescaled to a target mean (nmean) and sd (nsd).
zscore(nmean = 0, nsd = 1)
nmean |
new mean for normalized data |
nsd |
new standard deviation for normalized data |
For each numeric column j, computes ((x - mean_j)/sd_j) * nsd + nmean. Constant columns become nmean.
zscore = (x - mean(x))/sd(x)
returns the z-score transformation object
Han, J., Kamber, M., Pei, J. (2011). Data Mining: Concepts and Techniques. (Standardization)
data(iris)
head(iris)
trans <- zscore()
trans <- fit(trans, iris)
tiris <- transform(trans, iris)
head(tiris)
itiris <- inverse_transform(trans, tiris)
head(itiris)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.