Documentation of 'jsat.classifiers.neuralnetwork.regularizers.Max2NormRegularizer' Java class
Max2NormRegularizer
jsat.classifiers.neuralnetwork.regularizers

Class Max2NormRegularizer

  • All Implemented Interfaces:
    java.io.Serializable, WeightRegularizer


    public class Max2NormRegularizer
    extends java.lang.Object
    implements WeightRegularizer
    This regularizer restricts the norm of each neuron's weights to be bounded by a fixed constant, and rescaled when the norm is exceeded.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      Max2NormRegularizer(double maxNorm) 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void applyRegularization(Matrix W, Vec b)
      Applies regularization to one matrix, where the rows of the matrix correspond tot he weights associated to one neuron's input.
      void applyRegularization(Matrix W, Vec b, java.util.concurrent.ExecutorService ex)
      Applies regularization to one matrix, where the rows of the matrix correspond tot he weights associated to one neuron's input.
      double applyRegularizationToRow(Vec w, double b)
      Applies the regularization to one row of the weight matrix, where the row corresponds to the weights into one neuron.
      Max2NormRegularizer clone() 
      double getMaxNorm() 
      void setMaxNorm(double maxNorm)
      Sets the maximum allowed 2 norm for a single neuron's weights
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Max2NormRegularizer

        public Max2NormRegularizer(double maxNorm)
    • Method Detail

      • setMaxNorm

        public void setMaxNorm(double maxNorm)
        Sets the maximum allowed 2 norm for a single neuron's weights
        Parameters:
        maxNorm - the maximum norm per neuron's weights
      • getMaxNorm

        public double getMaxNorm()
        Returns:
        the maximum allowed 2 norm for a single neuron's weights
      • applyRegularization

        public void applyRegularization(Matrix W,
                                        Vec b)
        Description copied from interface: WeightRegularizer
        Applies regularization to one matrix, where the rows of the matrix correspond tot he weights associated to one neuron's input. The vector of bias terms must then have the same length as the number of rows in the given matrix.
        Specified by:
        applyRegularization in interface WeightRegularizer
        Parameters:
        W - the matrix to apply regularization to
        b - the vector of bias terms to apply regularization to
      • applyRegularization

        public void applyRegularization(Matrix W,
                                        Vec b,
                                        java.util.concurrent.ExecutorService ex)
        Description copied from interface: WeightRegularizer
        Applies regularization to one matrix, where the rows of the matrix correspond tot he weights associated to one neuron's input. The vector of bias terms must then have the same length as the number of rows in the given matrix.
        Specified by:
        applyRegularization in interface WeightRegularizer
        Parameters:
        W - the matrix to apply regularization to
        b - the vector of bias terms to apply regularization to
        ex - the source of threads for parallel computation
      • applyRegularizationToRow

        public double applyRegularizationToRow(Vec w,
                                               double b)
        Description copied from interface: WeightRegularizer
        Applies the regularization to one row of the weight matrix, where the row corresponds to the weights into one neuron.
        Specified by:
        applyRegularizationToRow in interface WeightRegularizer
        Parameters:
        w - the weight row to be altered depending on the regularization method
        b - the original bias input to this row
        Returns:
        the new bias value, or the same value if no change in the bias has occurred

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.