Example usage for Java weka.classifiers Evaluation fields, constructors, methods, implement or subclass
The text is from its open source code.
double | areaUnderPRC(int classIndex) Returns the area under precision-recall curve (AUPRC) for those predictions that have been collected in the evaluateClassifier(Classifier, Instances) method. |
double | areaUnderROC(int classIndex) Returns the area under ROC for those predictions that have been collected in the evaluateClassifier(Classifier, Instances) method. |
double | avgCost() Gets the average cost, that is, total cost of misclassifications (incorrect plus unclassified) over the total number of instances. |
double[][] | confusionMatrix() Returns a copy of the confusion matrix. |
double | correct() Gets the number of instances correctly classified (that is, for which a correct prediction was made). |
double | correlationCoefficient() Returns the correlation coefficient if the class is numeric. |
double | coverageOfTestCasesByPredictedRegions() Gets the coverage of the test cases by the predicted regions at the confidence level specified when evaluation was performed. |
void | crossValidateModel(Classifier classifier, Instances data, int numFolds, Random random) Performs a (stratified if class is nominal) cross-validation for a classifier on a set of instances. |
void | crossValidateModel(Classifier classifier, Instances data, int numFolds, Random random, Object... forPredictionsPrinting) Performs a (stratified if class is nominal) cross-validation for a classifier on a set of instances. |
void | crossValidateModel(String classifierString, Instances data, int numFolds, String[] options, Random random) Performs a (stratified if class is nominal) cross-validation for a classifier on a set of instances. |
double | errorRate() Returns the estimated error rate or the root mean squared error (if the class is numeric). |
double[] | evaluateModel(Classifier classifier, Instances data, Object... forPredictionsPrinting) Evaluates the classifier on a given set of instances. |
String | evaluateModel(String classifierString, String[] options) Evaluates a classifier with the options given in an array of strings. |
String | evaluateModel(Classifier classifier, String[] options) Evaluates a classifier with the options given in an array of strings. |
double | evaluateModelOnceAndRecordPrediction(Classifier classifier, Instance instance) Evaluates the classifier on a single instance and records the prediction. |
double | evaluateModelOnceAndRecordPrediction(double[] dist, Instance instance) Evaluates the supplied distribution on a single instance. |
double | evaluationForSingleInstance(double[] dist, Instance instance, boolean storePredictions) Evaluates the supplied distribution on a single instance. |
double | falseNegativeRate(int classIndex) Calculate the false negative rate with respect to a particular class. |
double | falsePositiveRate(int classIndex) Calculate the false positive rate with respect to a particular class. |
double | fMeasure(int classIndex) Calculate the F-Measure with respect to a particular class. |
Instances | getHeader() Returns the header of the underlying dataset. |
AbstractEvaluationMetric | getPluginMetric(String name) Get the named plugin evaluation metric |
double | incorrect() Gets the number of instances incorrectly classified (that is, for which an incorrect prediction was made). |
double | kappa() Returns value of kappa statistic if class is nominal. |
double | KBInformation() Return the total Kononenko & Bratko Information score in bits. |
double | KBMeanInformation() Return the Kononenko & Bratko Information score in bits per instance. |
double | KBRelativeInformation() Return the Kononenko & Bratko Relative Information score. |
double | matthewsCorrelationCoefficient(int classIndex) Calculates the matthews correlation coefficient (sometimes called phi coefficient) for the supplied class |
double | meanAbsoluteError() Returns the mean absolute error. |
double | meanPriorAbsoluteError() Returns the mean absolute error of the prior. |
double | numFalseNegatives(int classIndex) Calculate number of false negatives with respect to a particular class. |
double | numFalsePositives(int classIndex) Calculate number of false positives with respect to a particular class. |
double | numInstances() Gets the number of test instances that had a known class value (actually the sum of the weights of test instances with known class value). |
double | numTrueNegatives(int classIndex) Calculate the number of true negatives with respect to a particular class. |
double | numTruePositives(int classIndex) Calculate the number of true positives with respect to a particular class. |
double | pctCorrect() Gets the percentage of instances correctly classified (that is, for which a correct prediction was made). |
double | pctIncorrect() Gets the percentage of instances incorrectly classified (that is, for which an incorrect prediction was made). |
double | pctUnclassified() Gets the percentage of instances not classified (that is, for which no prediction was made by the classifier). |
double | precision(int classIndex) Calculate the precision with respect to a particular class. |
ArrayList | predictions() Returns the predictions that have been collected. |
double | priorEntropy() Calculate the entropy of the prior distribution. |
double | recall(int classIndex) Calculate the recall with respect to a particular class. |
double | relativeAbsoluteError() Returns the relative absolute error. |
double | rootMeanPriorSquaredError() Returns the root mean prior squared error. |
double | rootMeanSquaredError() Returns the root mean squared error. |
double | rootRelativeSquaredError() Returns the root relative squared error if the class is numeric. |
void | setDiscardPredictions(boolean value) Sets whether to discard predictions, ie, not storing them for future reference via predictions() method in order to conserve memory. |
void | setPriors(Instances train) Sets the class prior probabilities. |
double | SFEntropyGain() Returns the total SF, which is the null model entropy minus the scheme entropy. |
double | SFMeanEntropyGain() Returns the SF per instance, which is the null model entropy minus the scheme entropy, per instance. |
double | SFMeanPriorEntropy() Returns the entropy per instance for the null model. |
double | SFMeanSchemeEntropy() Returns the entropy per instance for the scheme. |
double | SFPriorEntropy() Returns the total entropy for the null model. |
double | SFSchemeEntropy() Returns the total entropy for the scheme. |
double | sizeOfPredictedRegions() Gets the average size of the predicted regions, relative to the range of the target in the training data, at the confidence level specified when evaluation was performed. |
String | toClassDetailsString() Generates a breakdown of the accuracy for each class (with default title), incorporating various information-retrieval statistics, such as true/false positive rate, precision/recall/F-Measure. |
String | toClassDetailsString(String title) Generates a breakdown of the accuracy for each class, incorporating various information-retrieval statistics, such as true/false positive rate, precision/recall/F-Measure. |
String | toCumulativeMarginDistributionString() Output the cumulative margin distribution as a string suitable for input for gnuplot or similar package. |
String | toMatrixString() Calls toMatrixString() with a default title. |
String | toMatrixString(String title) Outputs the performance statistics as a classification confusion matrix. |
String | toSummaryString() Calls toSummaryString() with no title and no complexity stats. |
String | toSummaryString(String title, boolean printComplexityStatistics) Outputs the performance statistics in summary form. |
String | toSummaryString(boolean printComplexityStatistics) Calls toSummaryString() with a default title. |
double | totalCost() Gets the total cost, that is, the cost of each prediction times the weight of the instance, summed over all instances. |
double | trueNegativeRate(int classIndex) Calculate the true negative rate with respect to a particular class. |
double | truePositiveRate(int classIndex) Calculate the true positive rate with respect to a particular class. |
double | unclassified() Gets the number of instances not classified (that is, for which no prediction was made by the classifier). |
double | unweightedMacroFmeasure() Unweighted macro-averaged F-measure. |
double | unweightedMicroFmeasure() Unweighted micro-averaged F-measure. |
double | weightedAreaUnderPRC() Calculates the weighted (by class size) AUPRC. |
double | weightedAreaUnderROC() Calculates the weighted (by class size) AUC. |
double | weightedFalseNegativeRate() Calculates the weighted (by class size) false negative rate. |
double | weightedFalsePositiveRate() Calculates the weighted (by class size) false positive rate. |
double | weightedFMeasure() Calculates the macro weighted (by class size) average F-Measure. |
double | weightedMatthewsCorrelation() Calculates the weighted (by class size) matthews correlation coefficient. |
double | weightedPrecision() Calculates the weighted (by class size) precision. |
double | weightedRecall() Calculates the weighted (by class size) recall. |
double | weightedTrueNegativeRate() Calculates the weighted (by class size) true negative rate. |
double | weightedTruePositiveRate() Calculates the weighted (by class size) true positive rate. |