public class EvaluationUtils extends Object
Constructor and Description |
---|
EvaluationUtils() |
Modifier and Type | Method and Description |
---|---|
static org.nd4j.linalg.primitives.Pair<org.nd4j.linalg.api.ndarray.INDArray,org.nd4j.linalg.api.ndarray.INDArray> |
extractNonMaskedTimeSteps(org.nd4j.linalg.api.ndarray.INDArray labels,
org.nd4j.linalg.api.ndarray.INDArray predicted,
org.nd4j.linalg.api.ndarray.INDArray outputMask) |
static double |
falseNegativeRate(long fnCount,
long tpCount,
double edgeCase)
Calculate the false negative rate from the false negative counts and true positive count
|
static double |
falsePositiveRate(long fpCount,
long tnCount,
double edgeCase)
Calculate the false positive rate from the false positive count and true negative count
|
static double |
fBeta(double beta,
double precision,
double recall)
Calculate the F-beta value from precision and recall
|
static double |
fBeta(double beta,
long tp,
long fp,
long fn)
Calculate the F beta value from counts
|
static double |
gMeasure(double precision,
double recall)
Calculate the G-measure from precision and recall
|
static double |
matthewsCorrelation(long tp,
long fp,
long fn,
long tn)
Calculate the binary Matthews correlation coefficient from counts
|
static double |
precision(long tpCount,
long fpCount,
double edgeCase)
Calculate the precision from true positive and false positive counts
|
static double |
recall(long tpCount,
long fnCount,
double edgeCase)
Calculate the recall from true positive and false negative counts
|
static org.nd4j.linalg.api.ndarray.INDArray |
reshapeTimeSeriesTo2d(org.nd4j.linalg.api.ndarray.INDArray labels) |
public static double precision(long tpCount, long fpCount, double edgeCase)
tpCount
- True positive countfpCount
- False positive countedgeCase
- Edge case value use to avoid 0/0public static double recall(long tpCount, long fnCount, double edgeCase)
tpCount
- True positive countfnCount
- False negative countedgeCase
- Edge case values used to avoid 0/0public static double falsePositiveRate(long fpCount, long tnCount, double edgeCase)
fpCount
- False positive counttnCount
- True negative countedgeCase
- Edge case values are used to avoid 0/0public static double falseNegativeRate(long fnCount, long tpCount, double edgeCase)
fnCount
- False negative counttpCount
- True positive countedgeCase
- Edge case value to use to avoid 0/0public static double fBeta(double beta, long tp, long fp, long fn)
beta
- Beta of value to usetp
- True positive countfp
- False positive countfn
- False negative countpublic static double fBeta(double beta, double precision, double recall)
beta
- Beta value to useprecision
- Precisionrecall
- Recallpublic static double gMeasure(double precision, double recall)
precision
- Precision valuerecall
- Recall valuepublic static double matthewsCorrelation(long tp, long fp, long fn, long tn)
tp
- True positive countfp
- False positive countsfn
- False negative countstn
- True negative countpublic static org.nd4j.linalg.api.ndarray.INDArray reshapeTimeSeriesTo2d(org.nd4j.linalg.api.ndarray.INDArray labels)
public static org.nd4j.linalg.primitives.Pair<org.nd4j.linalg.api.ndarray.INDArray,org.nd4j.linalg.api.ndarray.INDArray> extractNonMaskedTimeSteps(org.nd4j.linalg.api.ndarray.INDArray labels, org.nd4j.linalg.api.ndarray.INDArray predicted, org.nd4j.linalg.api.ndarray.INDArray outputMask)
Copyright © 2017. All rights reserved.