public class ClassificationStatistics extends BaseStatistics
Modifier and Type | Field and Description |
---|---|
double |
Accuracy
Accuracy
|
double |
BaselineLogLoss
Log-loss of zero-r classifier.
|
java.lang.String[] |
ClassNames
Names of classes (used when printing)
|
int[][] |
ConfusionMatrix
Contingency table.
|
int[][] |
ContingencyTable
Description of how often instances are assigned to each class.
|
double |
F1
F1 Score
|
double |
FDR
False Detection Rate
|
int |
FN
Number of False Negatives
|
int |
FP
Number of False Positives
|
double |
FPR
False Positive Rate
|
double |
FractionCorrect
Fraction of entries assigned to correct class
|
double |
Kappa
Fraction correct modified such that 0 is random guessing and 1 is perfect classification
|
double |
LogLoss
Log-loss
|
double |
MCC
Matthews Correlation Coefficient
|
double |
MeasuredLargestClassFraction
Fraction of entries in the most-prevalent class
|
double |
NPV
Negative Predictive Value
|
int |
NumberCorrect
Number of entries assigned to the correct class
|
double |
PPV
Positive Predictive Value
|
double |
Sensitivity
Sensitivity (aka True Positive Rate
|
double |
Specificity
Specificity (True Negative Rate)
|
int |
TN
Number of True Negatives
|
int |
TP
Number of True Positives.
|
Measured, NumberTested, Predicted, ROC, ROC_AUC
Constructor and Description |
---|
ClassificationStatistics() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
protected static double |
computeLogLoss(int[] trueLabels,
double[][] probabilites)
Compute the log-loss for the classifier.
|
static int[] |
discretize(double[] x,
int n_classes)
Takes a continuous class variable and converts it to discrete values that range between
[0,nclass).
|
protected void |
evaluate_protected(Dataset data)
Internal method for acutally computing results.
|
java.util.Map<java.lang.String,java.lang.Double> |
getStatistics()
Retrieve list of statistics stored in this class.
|
java.lang.String |
printBaselineStats()
Print statistics about the measured class values.
|
java.lang.String |
printCommand(java.util.List<java.lang.String> Command)
Handles more complicated printing commands.
|
java.lang.String |
printContingencyTable()
Print out the contingency table
|
java.lang.String |
toString() |
about, evaluate, getROCCurve, getStatisticsNoNaNs, printDescription, printROCCurve, printUsage, runCommand, saveCommand, savePerformanceData, setOptions
public int NumberCorrect
public double FractionCorrect
public double Kappa
public int[][] ContingencyTable
public int[][] ConfusionMatrix
public int TP
public int FP
public int FN
public int TN
public double Sensitivity
public double FPR
public double Accuracy
public double Specificity
public double PPV
public double NPV
public double FDR
public double MCC
public double F1
public double LogLoss
public java.lang.String[] ClassNames
public double MeasuredLargestClassFraction
public double BaselineLogLoss
public static int[] discretize(double[] x, int n_classes)
x
- Array of continuous class variables to be adjustedn_classes
- Number of discrete classes knownprotected static double computeLogLoss(int[] trueLabels, double[][] probabilites)
trueLabels
- True labels for these predictionsprobabilites
- Probability of membership in each classprotected void evaluate_protected(Dataset data)
BaseStatistics
evaluate_protected
in class BaseStatistics
data
- Dataset to be evaluatedpublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class BaseStatistics
java.lang.CloneNotSupportedException
public java.lang.String printBaselineStats()
BaseStatistics
printBaselineStats
in class BaseStatistics
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Map<java.lang.String,java.lang.Double> getStatistics()
BaseStatistics
getStatistics
in class BaseStatistics
public java.lang.String printContingencyTable()
public java.lang.String printCommand(java.util.List<java.lang.String> Command) throws java.lang.Exception
Printable
printCommand
in interface Printable
printCommand
in class BaseStatistics
Command
- Command specifying what to printjava.lang.Exception
- If command not understood