public class SoftmaxLoss extends LogisticLoss implements LossMC
Logistic loss
.Constructor and Description |
---|
SoftmaxLoss() |
Modifier and Type | Method and Description |
---|---|
void |
deriv(Vec processed,
Vec derivs,
int y)
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. |
CategoricalResults |
getClassification(Vec processed)
Given the
processed
predictions, returns the classification results for said predictions. |
double |
getLoss(Vec processed,
int y)
Computes the scalar loss for on the given example
|
void |
process(Vec pred,
Vec processed)
Given the vector of raw outputs for each class, transform it into a new
vector.
|
classify, clone, deriv, deriv2, getClassification, getDeriv, getDeriv2, getDeriv2Max, getLoss, loss
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone, getClassification, getDeriv, getDeriv2, getLoss
getDeriv2Max
public double getLoss(Vec processed, int y)
LossMC
public void process(Vec pred, Vec processed)
LossMC
processed
and derivs
may be the same object, and will
simply have all its values altered if so.public void deriv(Vec processed, Vec derivs, int y)
LossMC
processed
and derivs
may be the same object, and will
simply have all its values altered if so.public CategoricalResults getClassification(Vec processed)
LossMC
processed
predictions, returns the classification results for said predictions.getClassification
in interface LossMC
processed
- the processed score/prediction vectorCopyright © 2017. All rights reserved.