|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cmu.minorthird.classify.experiments.Evaluation
public class Evaluation
Stores some detailed results of evaluating a classifier on data.
Nested Class Summary | |
---|---|
static class |
Evaluation.ConfusionMatrixViewer
|
static class |
Evaluation.ElevenPointPrecisionViewer
|
static class |
Evaluation.Matrix
|
class |
Evaluation.MyTableCellRenderer
|
static class |
Evaluation.PropertyViewer
|
static class |
Evaluation.ROCViewer
|
class |
Evaluation.SummaryViewer
|
Field Summary | |
---|---|
static int |
DEFAULT_PARTITION_ID
|
static java.lang.String |
EVAL_EXT
|
static java.lang.String |
EVAL_FORMAT_NAME
|
Constructor Summary | |
---|---|
Evaluation(ExampleSchema schema)
Create an evaluation for databases with this schema |
Method Summary | |
---|---|
double |
averageLogLoss()
Average logloss on all examples. |
double |
averagePrecision()
Non-interpolated average precision. |
Evaluation.Matrix |
confusionMatrix()
Return a confusion matrix. |
double[] |
elevenPointPrecision()
Return eleven-point interpolated precision. |
double |
errorRate()
Error rate. |
double |
errorRateBalanced()
Balanced Error rate. |
double[] |
errorRateByClass()
Error rate by Class. |
double |
errorRateNeg()
Error rate on Negative examples. |
double |
errorRatePos()
Error rate on Positive examples. |
double |
errors()
Weighted total errors. |
double |
errors(int ID)
Weighted total errors on examples with partitionID = ID.. |
double[] |
errorsByClass()
Weighted total errors for classes 1 to K. |
double[] |
errorsByClass(int ID)
Weighted total errors for classes 1 to K on examples with partitionID = ID. |
double |
errorsNeg()
Weighted total errors on NEGATIVE examples. |
double |
errorsNeg(int ID)
Weighted total errors on NEGATIVE examples with partitionID = ID. |
double |
errorsPos()
Weighted total errors on POSITIVE examples. |
double |
errorsPos(int ID)
Weighted total errors on POSITIVE examples with partitionID = ID. |
void |
extend(Classifier c,
Dataset d,
int cvID)
Test the classifier on the examples in the dataset and store the results. |
void |
extend(ClassLabel predicted,
Example example,
int cvID)
Record the result of predicting the give class label on the given example |
void |
extend(SemiSupervisedClassifier c,
SemiSupervisedDataset d,
int cvID)
Test the classifier on the examples in the dataset and store the results. |
void |
extend(SequenceClassifier c,
SequenceDataset d)
Test the SequenceClassifier on the examples in the dataset and store the results. |
void |
extend4SGM(StackedGraphicalLearner.StackedGraphicalClassifier c,
RealRelationalDataset d,
int cvID)
Test the classifier on the examples in the relational dataset and store the results. |
double |
f1()
|
ClassLabel |
getActual(int i)
|
java.lang.String[] |
getClasses()
|
java.lang.String |
getExtensionFor(java.lang.String format)
Recomended extension for the format with the given name. |
java.lang.String[] |
getFormatNames()
List of formats in which the object can be saved. |
ClassLabel |
getPrediction(int i)
|
java.lang.String |
getProperty(java.lang.String prop)
|
ExampleSchema |
getSchema()
Returns whether the ExampleSchema this Evaluation is based upon |
boolean |
isBinary()
Returns whether this Evaluation refers to a binary classifier |
boolean |
isCorrect(int i)
|
double |
kappa()
|
static Evaluation |
load(java.io.File file)
|
static void |
main(java.lang.String[] args)
|
double |
maxF1()
Max f1 values at any cutoff. |
double |
maxF1(double minThreshold)
Max f1 values for any threshold above the specified cutoff. |
double[] |
numberOfExamplesByClass()
Total weight of examples in all classes 1 to K. |
double[] |
numberOfExamplesByClass(int ID)
Total weight of examples in all classes 1 to K with partitionID = ID. |
double |
numberOfInstances()
Total weight of all instances. |
double |
numberOfInstances(int ID)
Total weight of all instances. |
double |
numberOfNegativeExamples()
Total weight of all NEGATIVE examples. |
double |
numberOfNegativeExamples(int ID)
Total weight of all NEGATIVE examples with partitionID = ID. |
double |
numberOfPositiveExamples()
Total weight of all POSITIVE examples. |
double |
numberOfPositiveExamples(int ID)
Total weight of all POSITIVE examples with partitionID = ID. |
double |
numErrors()
|
int |
numExamples()
|
double |
precision()
|
Evaluation.Matrix |
precisionRecallScore()
Return array of precision,recall,logitScore. |
double |
recall()
|
double |
recallTopK(int k,
double minScore)
Recall in the top K, excluding items with score |
java.lang.Object |
restore(java.io.File file)
Restore the object from a file. |
void |
save(java.io.File file)
|
void |
save(java.io.PrintStream out)
|
void |
saveAs(java.io.File file,
java.lang.String formatName)
Save this object to the given file, in the given format. |
void |
setProperty(java.lang.String prop,
java.lang.String value)
|
double |
stDevErrors()
standard deviation of total errors. |
double[] |
stDevErrorsByClass()
standard deviation of total errors for classes 1 to K. |
double |
stDevErrorsNeg()
standard deviation of total errors on NEGATIVE examples. |
double |
stDevErrorsPos()
standard deviation of total errors on POSITIVE examples. |
void |
summarize()
Print summary statistics |
java.lang.String[] |
summaryStatisticNames()
|
double[] |
summaryStatistics()
|
Evaluation.Matrix |
thousandPointROC()
Return actual ROC curve. |
Viewer |
toGUI()
Create a view of this object |
java.lang.String |
toString()
Detailed view. |
Evaluation.Matrix |
TPfractionFPfractionScore()
Return array of true positive,false positive,logitScore. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_PARTITION_ID
public static final java.lang.String EVAL_FORMAT_NAME
public static final java.lang.String EVAL_EXT
Constructor Detail |
---|
public Evaluation(ExampleSchema schema)
Method Detail |
---|
public void extend4SGM(StackedGraphicalLearner.StackedGraphicalClassifier c, RealRelationalDataset d, int cvID)
public void extend(Classifier c, Dataset d, int cvID)
public void extend(SequenceClassifier c, SequenceDataset d)
public void extend(SemiSupervisedClassifier c, SemiSupervisedDataset d, int cvID)
public void extend(ClassLabel predicted, Example example, int cvID)
public void setProperty(java.lang.String prop, java.lang.String value)
public java.lang.String getProperty(java.lang.String prop)
public ClassLabel getPrediction(int i)
public ClassLabel getActual(int i)
public boolean isCorrect(int i)
public double errors()
public double errors(int ID)
public double[] errorsByClass()
public double[] errorsByClass(int ID)
public double errorsPos()
public double errorsPos(int ID)
public double errorsNeg()
public double errorsNeg(int ID)
public double stDevErrors()
public double[] stDevErrorsByClass()
public double stDevErrorsPos()
public double stDevErrorsNeg()
public double numberOfInstances()
public double numberOfInstances(int ID)
public double[] numberOfExamplesByClass()
public double[] numberOfExamplesByClass(int ID)
public double numberOfPositiveExamples()
public double numberOfPositiveExamples(int ID)
public double numberOfNegativeExamples()
public double numberOfNegativeExamples(int ID)
public double errorRate()
public double[] errorRateByClass()
public double errorRatePos()
public double errorRateNeg()
public double errorRateBalanced()
public double recallTopK(int k, double minScore)
public double averagePrecision()
public double maxF1()
public double maxF1(double minThreshold)
public double kappa()
public int numExamples()
public double averageLogLoss()
public double precision()
public double recall()
public double f1()
public double[] summaryStatistics()
public java.lang.String[] summaryStatisticNames()
public Evaluation.Matrix confusionMatrix()
public double numErrors()
public java.lang.String[] getClasses()
public Evaluation.Matrix TPfractionFPfractionScore()
public Evaluation.Matrix thousandPointROC()
public Evaluation.Matrix precisionRecallScore()
public double[] elevenPointPrecision()
public java.lang.String toString()
toString
in class java.lang.Object
public void summarize()
public Viewer toGUI()
Visible
toGUI
in interface Visible
public java.lang.String[] getFormatNames()
Saveable
getFormatNames
in interface Saveable
public java.lang.String getExtensionFor(java.lang.String format)
Saveable
getExtensionFor
in interface Saveable
public void saveAs(java.io.File file, java.lang.String formatName) throws java.io.IOException
Saveable
saveAs
in interface Saveable
java.io.IOException
public java.lang.Object restore(java.io.File file) throws java.io.IOException
Saveable
restore
in interface Saveable
java.io.IOException
public void save(java.io.File file) throws java.io.IOException
java.io.IOException
public void save(java.io.PrintStream out) throws java.io.IOException
java.io.IOException
public static Evaluation load(java.io.File file) throws java.io.IOException
java.io.IOException
public boolean isBinary()
public ExampleSchema getSchema()
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |