public interface LossFunction
Modifier and Type | Method and Description |
---|---|
float[] |
addPatternError(float[] predictedOutput,
float[] targetOutput)
Calculates pattern error for singe pattern for the specified predicted and target outputs,
adds the error to total error, and returns the pattern error.
|
void |
addRegularizationSum(float regSum)
Adds specified regularization sum to total loss.
|
float |
getTotal()
Returns the total error calculated by this loss function.
|
void |
reset()
Resets the total error and pattern counter.
|
default float |
valueFor(NeuralNetwork nnet,
javax.visrec.ml.data.DataSet<? extends MLDataItem> dataSet)
Calculates and returns loss function value for the given neural network and data set.
|
float[] addPatternError(float[] predictedOutput, float[] targetOutput)
predictedOutput
- predicted/actual network output vectortargetOutput
- target network output vectorvoid addRegularizationSum(float regSum)
regSum
- regularization sumfloat getTotal()
void reset()
default float valueFor(NeuralNetwork nnet, javax.visrec.ml.data.DataSet<? extends MLDataItem> dataSet)
nnet
- dataSet
- Copyright © 2022. All rights reserved.