Package me.yixqiao.jlearn.metrics
Class Metric
- java.lang.Object
-
- me.yixqiao.jlearn.metrics.Metric
-
- All Implemented Interfaces:
java.io.Serializable
public abstract class Metric extends java.lang.Object implements java.io.Serializable
Class for a metric.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Metric()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.String
getFormatString()
Get the string to format the metric.abstract double
getMetric(java.util.ArrayList<Matrix> output, java.util.ArrayList<Matrix> expected)
Get the value of the metric.double
getMetric(Matrix out, Matrix y)
Get the value of the metric.
-
-
-
Method Detail
-
getMetric
public abstract double getMetric(java.util.ArrayList<Matrix> output, java.util.ArrayList<Matrix> expected)
Get the value of the metric.- Parameters:
output
- output of networkexpected
- expected output- Returns:
- the metric value
-
getFormatString
public abstract java.lang.String getFormatString()
Get the string to format the metric.Return a string that can be used with printf in conjunction with the metric.
Example:"M: %.2f"
- Returns:
- the string
-
-