nnlib
GPU-accelerated, C/C++ neural network library.
|
Source file defining the methods of the BinaryAccuracy class. More...
Functions | |
bool | isCorrectPrediction (const float expected, const float actual) |
Returns true if the sample is correctly classified. More... | |
Source file defining the methods of the BinaryAccuracy class.
bool isCorrectPrediction | ( | const float | expected, |
const float | actual | ||
) |
Returns true if the sample is correctly classified.
Values of actual
< 0.5 are assigned to class 0 while actual
>= 0.5 are assigned to class 1.
expected | The expected class. |
actual | The prediction (any real value from [0, 1]) |