|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rapidminer.operator.AbstractIOObject
com.rapidminer.operator.ResultObjectAdapter
com.rapidminer.tools.math.Averagable
com.rapidminer.operator.performance.PerformanceCriterion
com.rapidminer.operator.performance.MeasuredPerformance
com.rapidminer.operator.performance.MultiClassificationPerformance
public class MultiClassificationPerformance
Measures the accuracy and classification error for both binary classification problems and multi class problems. Additionally, this performance criterion can also compute the kappa statistics for multi class problems. This is calculated as k = (P(A) - P(E)) / (1 - P(E)) with [ P(A) = diagonal sum / number of examples ] and [ P(E) = sum over i of ((sum of i-th row * sum of i-th column) / (n to the power of 2) ].
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.rapidminer.operator.AbstractIOObject |
|---|
AbstractIOObject.InputStreamProvider |
| Field Summary | |
|---|---|
static int |
ACCURACY
Indicates accuracy. |
static java.lang.String[] |
DESCRIPTIONS
The descriptions of the criteria. |
static int |
ERROR
Indicates classification error. |
static int |
KAPPA
Indicates kappa statistics. |
static java.lang.String[] |
NAMES
The names of the criteria. |
static int |
UNDEFINED
Indicates an undefined type (should not happen). |
| Constructor Summary | |
|---|---|
MultiClassificationPerformance()
Creates a MultiClassificationPerformance with undefined type. |
|
MultiClassificationPerformance(int type)
Creates a MultiClassificationPerformance with the given type. |
|
MultiClassificationPerformance(MultiClassificationPerformance m)
Clone constructor. |
|
| Method Summary | |
|---|---|
void |
buildSingleAverage(Averagable performance)
This method should build the average of this and another averagable of the same type. |
void |
countExample(Example example)
Increases the prediction value in the matrix. |
boolean |
formatPercent()
Returns true. |
java.lang.String[] |
getClassNames()
|
double[][] |
getCounter()
|
java.lang.String |
getDescription()
Returns the description. |
double |
getExampleCount()
Returns the number of data points which was used to determine the criterion value. |
double |
getFitness()
Returns the accuracy or 1 - error. |
double |
getMaxFitness()
Returns 1. |
double |
getMikroAverage()
Returns either the accuracy or the classification error. |
double |
getMikroVariance()
Returns the variance of the averagable. |
java.lang.String |
getName()
Returns the name. |
java.lang.String |
getTitle()
|
static MultiClassificationPerformance |
newInstance(java.lang.String name)
Creates a MultiClassificationPerformance with the given type. |
void |
startCounting(ExampleSet eSet,
boolean useExampleWeights)
Initializes the criterion and sets the label. |
java.lang.String |
toString()
|
| Methods inherited from class com.rapidminer.operator.performance.MeasuredPerformance |
|---|
startCounting |
| Methods inherited from class com.rapidminer.operator.performance.PerformanceCriterion |
|---|
compareTo |
| Methods inherited from class com.rapidminer.tools.math.Averagable |
|---|
buildAverage, clone, cloneAveragable, getAverage, getAverageCount, getExtension, getFileDescription, getMakroAverage, getMakroStandardDeviation, getMakroVariance, getMikroStandardDeviation, getStandardDeviation, getVariance, isInTargetEncoding, setAverageCount |
| Methods inherited from class com.rapidminer.operator.ResultObjectAdapter |
|---|
addAction, getActions, getAnnotations, getResultIcon, log, log, logError, logNote, logWarning, toHTML, toResultString |
| Methods inherited from class com.rapidminer.operator.AbstractIOObject |
|---|
appendOperatorToHistory, copy, getLog, getProcessingHistory, getSource, initWriting, read, read, read, read, setLoggingHandler, setSource, write |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.rapidminer.operator.IOObject |
|---|
appendOperatorToHistory, copy, getLog, getProcessingHistory, getSource, setLoggingHandler, setSource, write |
| Field Detail |
|---|
public static final int UNDEFINED
public static final int ACCURACY
public static final int ERROR
public static final int KAPPA
public static final java.lang.String[] NAMES
public static final java.lang.String[] DESCRIPTIONS
| Constructor Detail |
|---|
public MultiClassificationPerformance()
public MultiClassificationPerformance(int type)
public MultiClassificationPerformance(MultiClassificationPerformance m)
| Method Detail |
|---|
public static MultiClassificationPerformance newInstance(java.lang.String name)
public double getExampleCount()
PerformanceCriterion
getExampleCount in class PerformanceCriterion
public void startCounting(ExampleSet eSet,
boolean useExampleWeights)
throws OperatorException
startCounting in class MeasuredPerformanceOperatorExceptionpublic void countExample(Example example)
countExample in class MeasuredPerformancepublic double getMikroAverage()
getMikroAverage in class Averagablepublic boolean formatPercent()
formatPercent in class Averagablepublic double getMikroVariance()
Averagable
getMikroVariance in class Averagablepublic java.lang.String getName()
getName in interface ResultObjectgetName in class Averagablepublic java.lang.String getDescription()
getDescription in class PerformanceCriterionpublic double getFitness()
getFitness in class PerformanceCriterionpublic double getMaxFitness()
getMaxFitness in class PerformanceCriterionpublic void buildSingleAverage(Averagable performance)
AveragableAveragable.getMikroAverage() should return the
average of this and the given averagable. Hence, this method is used to build
the actual micro average value of two criteria. Please refer to
SimpleCriterion for a simple
implementation example.
buildSingleAverage in class Averagablepublic java.lang.String toString()
toString in interface ReadabletoString in class Averagablepublic java.lang.String getTitle()
public java.lang.String[] getClassNames()
public double[][] getCounter()
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||