/** * Get the actual negative count (accounting for any masking) for the specified output/column * * @param outputNum Index of the class */ public long getCountActualNegative(int outputNum) { assertIndex(outputNum); return underlying[outputNum].getCountActualNegative(); }
/** * Get the (one vs. all) ROC curve for the specified class * @param classIdx Class index to get the ROC curve for * @return ROC curve for the given class */ public RocCurve getRocCurve(int classIdx) { assertIndex(classIdx); return underlying[classIdx].getRocCurve(); }
/** * Calculate the macro-average (one-vs-all) AUC for all classes */ public double calculateAverageAUC() { assertIndex(0); double sum = 0.0; for (int i = 0; i < underlying.length; i++) { sum += calculateAUC(i); } return sum / underlying.length; }
/** * Get the actual positive count (accounting for any masking) for the specified class * * @param outputNum Index of the class */ public long getCountActualPositive(int outputNum) { assertIndex(outputNum); return underlying[outputNum].getCountActualPositive(); }
/** * Get the (one vs. all) Precision-Recall curve for the specified class * @param classIdx Class to get the P-R curve for * @return Precision recall curve for the given class */ public PrecisionRecallCurve getPrecisionRecallCurve(int classIdx) { assertIndex(classIdx); return underlying[classIdx].getPrecisionRecallCurve(); }
/** * Calculate the AUC - Area Under ROC Curve<br> * Utilizes trapezoidal integration internally * * @return AUC */ public double calculateAUC(int classIdx) { assertIndex(classIdx); return underlying[classIdx].calculateAUC(); }
/** * Calculate the AUPRC - Area Under Curve Precision Recall <br> * Utilizes trapezoidal integration internally * * @return AUC */ public double calculateAUCPR(int classIdx) { assertIndex(classIdx); return underlying[classIdx].calculateAUCPR(); }