DataPredict

API Reference - Others - GradientDescentModifier

Modifies the model’s batch gradient descent to other modes.

Notes

Constructors

new()

Creates a new gradient descent modifier object. If any of the arguments are not given, default argument values for that argument will be used.

GradientDescentModifier.new(Model: ModelObject, gradientDescentType: string, batchSize: integer, showOutput: boolean): GradientDescentModifierObject

Parameters:

Returns:

Functions

setParameters()

Set modifier’s parameters. When any of the arguments are not given, previous argument values for that argument will be used.

GradientDescentModifier:setParameters(Model: ModelObject, gradientDescentType: string, batchSize: integer, showOutput: boolean)

Parameters:

train()

Trains the machine/deep learning model under specific gradient descent mode.

GradientDescentModifier:train(...): number[]

Parameters:

Returns:

predict()

Predict the values for given data.

GradientDescentModifier:predict(...): ...

Parameters:

…: The parameters are the same to the original model’s predict() function.

Returns:

…: The outputs are the same to the original model’s predict() function.

reinforce()

Reward or punish model based on the current state of the environment.

ActorCritic:reinforce(currentFeatureVector: Matrix, rewardValue: number, returnOriginalOutput: boolean): integer, number -OR- Matrix

Parameters: