List of usage examples for weka.classifiers.evaluation ThresholdCurve getNPointPrecision
public static double getNPointPrecision(Instances tcurve, int n)
From source file:cotraining.copy.Evaluation_D.java
License:Open Source License
/** * Returns the area under PRC for those predictions that have been collected * in the evaluateClassifier(Classifier, Instances) method. Returns * Instance.missingValue() if the area is not available. * * @param classIndex the index of the class to consider as "positive" * @return the area under the PRC curve or not a number * @author doina/*from ww w . j a v a 2s.co m*/ */ public double areaUnderPRC(int classIndex) { // Check if any predictions have been collected if (m_Predictions == null) { return Instance.missingValue(); } else { ThresholdCurve tc = new ThresholdCurve(); Instances result = tc.getCurve(m_Predictions, classIndex); return ThresholdCurve.getNPointPrecision(result, 11); } }