io.siddhi.extension.execution.streamingml.bayesian.util

## Class SoftmaxRegression

- java.lang.Object
- - io.siddhi.extension.execution.streamingml.bayesian.util.BayesianModel
  - - io.siddhi.extension.execution.streamingml.bayesian.util.SoftmaxRegression

- All Implemented Interfaces:
    Serializable

      public class SoftmaxRegression
      extends BayesianModel

  implements Bayesian Softmax regression model.

  minimize the negative ELBO ELBO = E[log(P(yIn|xIn,weights)] - D_KL[weights,prior]

  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class io.siddhi.extension.execution.streamingml.bayesian.util.BayesianModel

      `BayesianModel.OptimizerType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SoftmaxRegression(int numberOfClasses)`
    `SoftmaxRegression(SoftmaxRegression model)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `evaluate(double[] features, Object expected)`
    `String` | `getClassLabel(Number index)`
    `protected double[][]` | `getUpdatedWeights()` implements the model specific gradient updates.
    `void` | `setNoOfClasses(int val)`
    `double[]` | `update(double[] features, String target)`

    - ### Methods inherited from class io.siddhi.extension.execution.streamingml.bayesian.util.BayesianModel

      `getLearningRate, getNumFeatures, getNumSamples, getOptimizerType, initiateModel, predict, predictWithStd, setAddBias, setLearningRate, setNumFeatures, setNumSamples, setOptimizerType, setPredictionSamples, update`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SoftmaxRegression

          public SoftmaxRegression(int numberOfClasses)

    - #### SoftmaxRegression

          public SoftmaxRegression(SoftmaxRegression model)

  - ### Method Detail

    - #### getUpdatedWeights

          protected double[][] getUpdatedWeights()

      Description copied from class: `BayesianModel`
      implements the model specific gradient updates.
      Specified by:
        `getUpdatedWeights` in class `BayesianModel`
      Returns:
        var means and stds

    - #### evaluate

          public double evaluate(double[] features,
                                 Object expected)

      Specified by:
        `evaluate` in class `BayesianModel`

    - #### setNoOfClasses

          public void setNoOfClasses(int val)

    - #### update

          public double[] update(double[] features,
                                 String target)

    - #### getClassLabel

          public String getClassLabel(Number index)

Copyright © 2019 WSO2. All rights reserved.