DataPredict

API Reference - Optimizers - BaseOptimizer

BaseOptimizer is a base for all optimizers.

Constructors

new()

Creates a new base optimizer object.

BaseOptimizer.new(optimizerName: string): BaseOptimizerObject

Parameters

Returns:

Functions

calculate()

Returns a modified cost function derivatives.

BaseOptimizer:calculate(learningRate: number, costFunctionDerivatives: matrix): matrix

Parameters:

Returns:

getOptimizerName()

Gets the optimizer’s name from the base optimizer.

BaseOptimizer:getOptimizerName()

Returns:

setCalculateFunction()

Sets a calculate function for the base optimizer.

BaseOptimizer:setCalculateFunction(calculateFunction: Function)

Parameters:

setLearningRateValueScheduler()

Sets a value scheduler for the learning rate.

BaseOptimizer:setLearningRateScheduler(LearningRateValueScheduler: ValueSchedulerObject)

Parameters:

LearningRateValueScheduler: The value scheduler object to be used by the learning rate.

getLearningRateValueScheduler()

Gets the value scheduler for the learning rate.

BaseOptimizer:getLearningRateScheduler(): ValueSchedulerObject

Returns:

LearningRateValueScheduler: The value scheduler object that was used by the learning rate.

getOptimizerInternalParameters()

Gets the optimizer’s internal parameters from the base optimizer.

BaseOptimizer:getOptimizerInternalParameters(doNotDeepCopy: boolean): {}

Parameters:

Returns:

setOptimizerInternalParameters()

Sets the optimizer’s internal parameters from the base optimizer.

BaseOptimizer:setOptimizerInternalParameters(optimizerInternalParameters: {}, doNotDeepCopy: boolean)

Parameters:

reset()

Reset optimizer’s stored values (excluding the parameters).

BaseOptimizer:reset()