Main Content

nssTrainingOptions

Create training options object for neural state-space systems

    Description

    Returns either an Adam or SGDM options set object to train a idNeuralStateSpace network using nlssest.

    example

    adamOpts = nssTrainingOptions("adam") returns a default optimizer option set to train an idNeuralStateSpace object using the Adam solver. Use dot notation to access the object properties.

    example

    sgdmOpts = nssTrainingOptions("sgdm") returns a default optimizer option set to train an idNeuralStateSpace object using the stochastic gradient descent with momentum solver. Use dot notation to access the object properties.

    Examples

    collapse all

    Use nssTrainingOptions to return an options set object to train an idNeuralStateSpace system.

    adamOpts = nssTrainingOptions("adam")
    adamOpts = 
      nssTrainingADAM with properties:
    
                      UpdateMethod: "ADAM"
               GradientDecayFactor: 0.9000
        SquaredGradientDecayFactor: 0.9990
                           LossFcn: "MeanAbsoluteError"
                       PlotLossFcn: 1
                         LearnRate: 1.0000e-03
                         MaxEpochs: 100
                     MiniBatchSize: 100
                  ODESolverOptions: [1×1 idoptions.nssDLODE45]
                   ValidationDataU: []
                   ValidationDataX: []
                   ValidationDataY: []
               ValidationFrequency: 10
          InputInterpolationMethod: "zoh"
    
    

    Use dot notation to access the object properties.

    adamOpts.PlotLossFcn = false;

    You can now use adamOpts as the value of a name-value pair input argument to nlssest to specify the training options for the state (StateOptions=adamOpts) or the output (OutputOptions=adamOpts) network of an idNeuralStateSpace object.

    Use nssTrainingOptions to return an options set object to train an idNeuralStateSpace system.

    adamOpts = nssTrainingOptions("sgdm")
    adamOpts = 
      nssTrainingSGDM with properties:
    
                    UpdateMethod: "SGDM"
                        Momentum: 0.9500
                         LossFcn: "MeanAbsoluteError"
                     PlotLossFcn: 1
                       LearnRate: 1.0000e-03
                       MaxEpochs: 100
                   MiniBatchSize: 100
                ODESolverOptions: [1×1 idoptions.nssDLODE45]
                 ValidationDataU: []
                 ValidationDataX: []
                 ValidationDataY: []
             ValidationFrequency: 10
        InputInterpolationMethod: "zoh"
    
    

    Use dot notation to access the object properties.

    adamOpts.LearnRate = 0.01;

    You can now use sgdmOpts as the value of a name-value pair input argument to nlssest to specify the training options for the state (StateOptions=sgdmOpts) or the output (OutputOptions=sgdmOpts) network of an idNeuralStateSpace object.

    Output Arguments

    collapse all

    Adam options set object, specified as a nssTrainingADAM object.

    SGDM options set object, specified as a nssTrainingSGDM object.

    Version History

    Introduced in R2022b