DataPredict

API Reference - Models - ReinforcementLearningBaseModel

ReinforcementLearningBaseModel is a base class for reinforcement learning neural network models.

Constructors

new()

Creates a new base model object. If any of the arguments are nil, default argument values for that argument will be used.

ReinforcementLearningBaseModel.new(discountFactor: number): ModelObject

Parameters:

Returns:

Functions

setParameters()

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

ReinforcementLearningBaseModel:setParameters(discountFactor: number)

setModel()

Sets the model.

ReinforcementLearningBaseModel:setModel(Model: ModelObject)

Parameters:

getModel()

Gets the model.

ReinforcementLearningBaseModel:getModel(): ModelObject

Returns:

setCategoricalUpdateFunction()

Sets the model’s categorical policy update function.

ReinforcementLearningBaseModel:setCategoricalUpdateFunction(categoricalUpdateFunction)

Parameters:

setDiagonalGaussianUpdateFunction()

Sets the model’s diagonal Gausian policy update function.

ReinforcementLearningBaseModel:setDiagonalGaussianUpdateFunction(diagonalGaussianUpdateFunction)

Parameters:

setEpisodeUpdateFunction()

Sets the model’s episode update function.

ReinforcementLearningBaseModel:setEpisodeUpdateFunction(episodeUpdateFunction)

Parameters:

categoricalUpdate()

Updates the model parameters using categoricalUpdateFunction().

ReinforcementLearningBaseModel:categoricalUpdate(previousFeatureVector: featureVector, action: number/string, rewardValue: number, currentFeatureVector: featureVector)

Parameters:

diagonalGaussianUpdate()

Updates the model parameters using diagonalGaussianUpdateFunction().

ReinforcementLearningBaseModel:diagonalGaussianUpdate(previousFeatureVector: featureVector, actionMeanVector: vector, actionStandardDeviationVector, rewardValue: number, currentFeatureVector: featureVector)

Parameters:

episodeUpdate()

Updates the model parameters using episodeUpdateFunction().

ReinforcementLearningBaseModel:episodeUpdate()

setResetFunction()

Sets a new function on reset alongside with the current reset() function.

ReinforcementLearningBaseModel:setResetFunction(resetFunction)

Parameters:

reset()

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

ReinforcementLearningBaseModel:reset()