max_min_scale {KLexp}R Documentation

max_min_scale

Description

max_min_scale is used to calculate the standardization value of data.The formula is (x-min(x))/(max(x)-min(x)). It can compress the data into the (0,1).

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 max-min standardization of the dataset by the formula: (max(x)-x)/(max(x)-min(x))

Author(s)

Zongrui Dai

Source

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

Examples

##For the numeric data
data(iris,package = 'datasets')
w<-max_min_scale(iris[,1])
print(w)

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

[Package KLexp version 1.0.0 Index]