gradDescentR.learn: GradDescent Learning Function

Description Usage Arguments Details Value See Also Examples

Description

A top-level funtion to generate/learn the model from numerical data using a selected gradient descent method.

Usage

1
2
3
gradDescentR.learn(dataSet, featureScaling = TRUE,
  scalingMethod = "VARIANCE", learningMethod = "GD", control = list(),
  seed = NULL)

Arguments

dataSet

a data.frame that representing training data (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. dataTrain must have at least two columns and ten rows of data that contain only numbers (integer or float).

featureScaling

a boolean value that decide to do feature scaling on dataset. The default value is TRUE, which the function will do feature scaling.

scalingMethod

a string value that represent the feature scaling method to be used. There are two option for this arguments: "VARIANCE" and "MINMAX". The default value is "VARIANCE", which the function will do Variance Scaling/ Standardization to dataset.

learningMethod

a string value that represent the learning method to do model building. There are ten option for this arguments: "GD", "MBGD", "SGD", "SAGD", "MGD", "AGD", "ADAGRAD", "ADADELTA", "RMSPROP", "ADAM", "SSGD", "SVRG", "SARAH" and "SARAHPlus". The default value is "GD", which the function will to Gradient Descent learning.

control

a list containing all arguments, depending on the learning algorithm to use. The following list are parameters required for each methods.

  • alpha: a float value in interval of [0,1] that represent the step-size or learning rate of the learning. The default value is 0.1.

  • maxIter: a integer value that represent the iteration/loop/epoch of the learning. The default value is 10, which the function will do 10 times learning calculation.

seed

a integer value for static random. Default value is NULL, which the the function will not do static random.

Details

This function makes accessible all learning methods that are implemented in this package. All of the methods use this function as interface for the learning stage, so users do not need to call other functions in the learning phase. In order to obtain good results, users need to adjust some parameters such as the number of labels, the type of the shape of the membership function, the maximal number of iterations, the step size of the gradient descent, or other method-dependent parameters which are collected in the control parameter. After creating the model using this function, it can be used to predict new data with predict.

Value

The gradDescentRObject.

See Also

predict

Examples

1
2
3
4
5
6
7
8
##################################
## Learning and Build Model with GD
## load R Package data
data(gradDescentRData)
## get z-factor data
dataSet <- gradDescentRData$CompressilbilityFactor
## train dataset
modelObject <- gradDescentR.learn(dataSet)

gradDescent documentation built on May 2, 2019, 9:42 a.m.