Z_score: Z_score standardization

Description Usage Arguments Value Author(s) Source Examples

View source: R/Standardization.R

Description

Z-score method is used to calculate the standardization value of data.The formula is (x-mean(x))/var(x). It can compress the data into the (0,1).

Usage

1
Z_score(data, dataframe = FALSE)

Arguments

data

Your input data, which can be numerci or data.frame

dataframe

Wether the data is dataframe. The default is False(numeric)

Value

Calculate the Z_score standardization of the dataset by the formula: (x-mean(x))/var(x)

Author(s)

Zongrui Dai

Source

https://github.com/Zongrui-Dai/Kernel-lasso-feature-expansion

Examples

1
2
3
4
5
6
7
8
##For the numeric data
data(iris,package = 'datasets')
w<-Z_score(iris[,1])
print(w)

##For the data.frame data
w1<-Z_score(iris[,-5],dataframe=TRUE)
print(w1)

KLexp documentation built on Aug. 21, 2021, 5:07 p.m.

Related to Z_score in KLexp...