Documentation of 'jsat.lossfunctions.SoftmaxLoss' Java class
SoftmaxLoss
jsat.lossfunctions

Class SoftmaxLoss

    • Constructor Detail

      • SoftmaxLoss

        public SoftmaxLoss()
    • Method Detail

      • getLoss

        public double getLoss(Vec processed,
                              int y)
        Description copied from interface: LossMC
        Computes the scalar loss for on the given example
        Specified by:
        getLoss in interface LossMC
        Parameters:
        processed - the vector of raw predictions.
        y - the true class label in [0, k-1] for k classes
        Returns:
        the loss in [0, Inf)
      • process

        public void process(Vec pred,
                            Vec processed)
        Description copied from interface: LossMC
        Given the vector of raw outputs for each class, transform it into a new vector.
        processed and derivs may be the same object, and will simply have all its values altered if so.
        Specified by:
        process in interface LossMC
        Parameters:
        pred - the vector of raw predictions
        processed - the location to store the processed predictions.
      • deriv

        public void deriv(Vec processed,
                          Vec derivs,
                          int y)
        Description copied from interface: LossMC
        Computes the derivatives with respect to each output
        processed and derivs may be the same object, and will simply have all its values altered if so.
        Specified by:
        deriv in interface LossMC
        Parameters:
        processed - the processed predictions
        derivs - the vector to place the derivative of the loss to.
        y - the true class label in [0, k-1] for k classes
      • getClassification

        public CategoricalResults getClassification(Vec processed)
        Description copied from interface: LossMC
        Given the processed predictions, returns the classification results for said predictions.
        Specified by:
        getClassification in interface LossMC
        Parameters:
        processed - the processed score/prediction vector
        Returns:
        the classification results

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.