DataPredict

API Reference - Others - DistributedModelParameters

DistributedTraining is a base class for distributed learning. The individual child models will calculate their own model parameters and these will create a new main model parameters using average.

Notes:

Constructors

new()

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

DistributedModelParameters.new(totalNumberOfChildModelUpdatesToUpdateMainModel: number): DistributedLearningObject

Parameters:

Returns:

Functions

setParameters()

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

DistributedModelParameters:setParameters(totalNumberOfChildModelUpdatesToUpdateMainModel: number)

Parameters:

addModel()

DistributedModelParameters:addModel(Model: ModelObject)

Parameters:

setModelParametersMerger()

Sets the ModelParametersMerger into the DistributedModelParameters.

DistributedModelParameters:setModelParametersMerger(ModelParametersMerger: ModelParametersMergerObject)

ModelParametersMerger: A ModelParametersMerger object to be used by the DistributedModelParameters object

setMainModelParameters()

DistributedModelParameters:setMainModelParameters(MainModelParameters: any)

Parameters:

getMainModelParameters()

DistributedModelParameters:getMainModelParameters(): any

Returns:

train()

Train a model for a given model number.

DistributedModelParameters:train(featureMatrix: Matrix, labelVector/labelMatrix: matrix, modelNumber: number): []

Parameters:

Returns:

predict()

Predict values for the given data using the specified model number.

DistributedModelParameters:predict(featureMatrix: Matrix, returnOriginalOutput: boolean,  modelNumber: number): Matrix, Matrix -OR- Matrix

Parameters:

Returns:

-OR-

reinforce()

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

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

Parameters:

Returns:

-OR-

getCurrentTotalNumberOfChildModelUpdatesToUpdateMainModel()

DistributedModelParameters:getCurrentTotalNumberOfChildModelUpdatesToUpdateMainModel(): number

Returns:

reset()

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

DistributedModelParameters:reset()

destroy()

Destroys the model object.

DistributedModelParameters:destroy()