minmaxScaling: The Min-Max Feature Scaling Function

Description Usage Arguments Details Value See Also Examples

View source: R/gradDescentR.SupportFunctions.R

Description

A function to do feature scaling to dataset with min-max scaling method.

Usage

1
minmaxScaling(dataSet)

Arguments

dataSet

a data.frame that representing dataset (m \times n), where m is the number of instances and n is the number of variables where the last column is the output variable. dataSet must have at least two columns and ten rows of data that contain only numbers (integer or float).

Details

This function changes the value of dataset that represented by data.frame object into min-max scaled value that has interval between 0 to 1.

Value

a list contains feature scaled dataset and scaling parameter

See Also

minmaxDescaling

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
##################################
## Feature scaling with Min-Max Scaling Method
## load R Package data
data(gradDescentRData)
## get z-factor Data
dataSet <- gradDescentRData$CompressilbilityFactor
## do min-max scaling to dataset
featureScalingResult <- minmaxScaling(dataSet)
## show result
print(featureScalingResult$scaledDataSet)
print(featureScalingResult$scalingParameter)

computer-science-upi/gradDescent documentation built on May 29, 2019, 4:46 a.m.