public interface LossMC extends LossC
process(jsat.linear.Vec, jsat.linear.Vec)
on the raw
scores is a mandatory first step, and will transform the raw scores into a
usable form for the loss function. 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.
|
clone, getClassification, getDeriv, getDeriv2, getLoss
getDeriv2Max
double getLoss(Vec processed, int y)
processed
- the vector of raw predictions.y
- the true class label in [0, k-1] for k classesvoid process(Vec pred, Vec processed)
processed
and derivs
may be the same object, and will
simply have all its values altered if so.pred
- the vector of raw predictionsprocessed
- the location to store the processed predictions.void deriv(Vec processed, Vec derivs, int y)
processed
and derivs
may be the same object, and will
simply have all its values altered if so.processed
- the processed predictionsderivs
- the vector to place the derivative of the loss to.y
- the true class label in [0, k-1] for k classesCategoricalResults getClassification(Vec processed)
processed
predictions, returns the classification results for said predictions.processed
- the processed score/prediction vectorCopyright © 2017. All rights reserved.