public class LossFunctions extends Object
Modifier and Type | Class and Description |
---|---|
static class |
LossFunctions.LossFunction
MSE: Mean Squared Error: Linear Regression
EXPLL: Exponential log likelihood: Poisson Regression XENT: Cross Entropy: Binary Classification MCXENT: Multiclass Cross Entropy RMSE_XENT: RMSE Cross Entropy SQUARED_LOSS: Squared Loss NEGATIVELOGLIKELIHOOD: Negative Log Likelihood |
Constructor and Description |
---|
LossFunctions() |
Modifier and Type | Method and Description |
---|---|
static double |
score(INDArray labels,
LossFunctions.LossFunction lossFunction,
INDArray z,
double l2,
double l1,
boolean useRegularization)
Generic scoring function.
|
public static double score(INDArray labels, LossFunctions.LossFunction lossFunction, INDArray z, double l2, double l1, boolean useRegularization)
labels
- the labels to scorelossFunction
- the loss function to usez
- the output functionl2
- the l2 regularization term (0.5 * l2Coeff * sum w^2)l1
- the l1 regularization term (l1Coeff * sum |w|)useRegularization
- whether to use regularizationCopyright © 2017. All rights reserved.