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.
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
Set model’s parameters. When any of the arguments are nil, previous argument values for that argument will be used.
DistributedModelParameters:setParameters(totalNumberOfChildModelUpdatesToUpdateMainModel: number)
DistributedModelParameters:addModel(Model: ModelObject)
Sets the ModelParametersMerger into the DistributedModelParameters.
DistributedModelParameters:setModelParametersMerger(ModelParametersMerger: ModelParametersMergerObject)
ModelParametersMerger: A ModelParametersMerger object to be used by the DistributedModelParameters object
DistributedModelParameters:setMainModelParameters(MainModelParameters: any)
DistributedModelParameters:getMainModelParameters(): any
Train a model for a given model number.
DistributedModelParameters:train(featureMatrix: Matrix, labelVector/labelMatrix: matrix, modelNumber: number): []
featureMatrix: Matrix containing all data.
labelVector / labelMatrix: A (n x 1) / (n x o) matrix containing values related to featureMatrix. When using the label matrix, the number of columns must be equal to number of classes.
modelNumber: The model number for a model to be trained.
Predict values for the given data using the specified model number.
DistributedModelParameters:predict(featureMatrix: Matrix, returnOriginalOutput: boolean, modelNumber: number): Matrix, Matrix -OR- Matrix
featureMatrix: Matrix containing all data.
returnOriginalOutput: Set whether or not to return predicted matrix instead of value with highest probability.
modelNumber: The model number for a model to return the prediction.
predictedlabelVector: A vector tcontaining predicted labels generated from the model.
valueVector: A vector that contains the values of predicted labels.
-OR-
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
currentFeatureVector: Matrix containing data from the current state.
rewardValue: The reward value added/subtracted from the current state (recommended value between -1 and 1, but can be larger than these values).
returnOriginalOutput: Set whether or not to return predicted vector instead of value with highest probability.
modelNumber: The model number for a model to be reinforced.
predictedLabel: A label that is predicted by the model.
value: The value of predicted label.
-OR-
DistributedModelParameters:getCurrentTotalNumberOfChildModelUpdatesToUpdateMainModel(): number
Reset the main model’s stored values (excluding the parameters).
DistributedModelParameters:reset()
Destroys the model object.
DistributedModelParameters:destroy()