Package com.jml.losses
Interface Function
public interface Function
Functional Interface for a loss function. A loss function takes two parameters y and yPred. The loss function
is defined to be a function L such that L(y, yPred) >= 0.
-
Method Summary
Modifier and TypeMethodDescriptionlinalg.Matrix
compute(linalg.Matrix y, linalg.Matrix yPred)
Evaluates a loss function which takes features and targets for a model and weights as parameters.
-
Method Details
-
compute
linalg.Matrix compute(linalg.Matrix y, linalg.Matrix yPred)Evaluates a loss function which takes features and targets for a model and weights as parameters.- Parameters:
y
- True values.yPred
- Expected values.- Returns:
- The loss between the expected and actual data values.
-