WassersteinGenerativeAdversarialImitationLearning allows an agent to learn from experts’ trajectories.
The ReinforcementLearning and Discriminator models must be created separately. Then use setReinforcementLearningModel() and setDiscriminatorModel() to put it inside the GenerativeAdversarialImitationLearning model.
ReinforcementLearning and Discriminator models must be a part of NeuralNetwork model. If you decide to use linear regression or logistic regression, then it must be constructed using NeuralNetwork model.
Ensure the output layer of the Discriminator model has only one neuron and its activation function set to “Sigmoid”. It is the default setting for all Discriminator models in research papers.
The number of neurons at the ReinforcementLearning’s output layer must be equal to the number of neurons at the Discriminator’s input layer.
It is recommended that the learning rate for the ReinforcementLearning is higher than the Discriminator.
Create new model object. If any of the arguments are nil, default argument values for that argument will be used.
WassersteinGenerativeAdversarialImitationLearning.new(numberOfStepsPerEpisode: number): ModelObject
Set model’s parameters. When any of the arguments are nil, previous argument values for that argument will be used.
WassersteinGenerativeAdversarialImitationLearning:setParameters(numberOfStepsPerEpisode: number)
Sets the ReinforcementLearning into the model.
WassersteinGenerativeAdversarialImitationLearning:setReinforcementLearningModel(ReinforcementLearningModel: Model)
Sets the Discriminator into the model.
WassersteinGenerativeAdversarialImitationLearning:setDiscriminatorModel(DiscriminatorModel: Model)
Gets the ReinforcementLearning from the model.
WassersteinGenerativeAdversarialImitationLearning:getReinforcementLearningModel(): Model
Gets the Discriminator from the model.
WassersteinGenerativeAdversarialImitationLearning:getDiscriminatorModel(): Model
OneVsAll:setClassesList(ClassesList: [])
OneVsAll:getClassesList(): []
Categorically trains the model.
WassersteinGenerativeAdversarialImitationLearning:categoricalTrain(previousFeatureMatrix: matrix, expertActionMatrix: matrix, currentFeatureMatrix: matrix)
previousFeatureMatrix: The matrix containing the feature environment values.
expertActionMatrix: The matrix containing the action values generated by an expert.
currentFeatureMatrix: The matrix containing the feature environment values after an action has been taken by the expert.
Diagonally Gaussian trains the model.
WassersteinGenerativeAdversarialImitationLearning:diagonalGaussianTrain(previousFeatureMatrix: matrix, expertActionMeanMatrix: matrix, expertStandardDeviationMatrix: matrix,currentFeatureMatrix: matrix)
previousFeatureMatrix: The matrix containing the feature environment values.
expertActionMeanMatrix: The matrix containing the action mean values generated by an expert.
expertStandardDeviationMatrix: The matrix containing the action standard deviation values generated by an expert.
currentFeatureMatrix: The matrix containing the feature environment values after an action has been taken by the expert.
Generates the output from Discriminator.
WassersteinGenerativeAdversarialImitationLearning:evaluate(featureMatrix: matrix): matrix
Generates the output from Generator.
WassersteinGenerativeAdversarialImitationLearning:generate(featureMatrix: matrix, returnOriginalOutput: boolean): matrix
-OR-