|
||||||||||
| 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.WeightedMultiClassPerformance
public class WeightedMultiClassPerformance
Measures the weighted mean of all per class recalls or per class precisions based on the weights defined in the performance evaluator.
| Field Summary | |
|---|---|
static java.lang.String[] |
DESCRIPTIONS
The descriptions of the criteria. |
static java.lang.String[] |
NAMES
The names of the criteria. |
static int |
UNDEFINED
Indicates an undefined type (should not happen). |
static int |
WEIGHTED_PRECISION
Indicates classification error. |
static int |
WEIGHTED_RECALL
Indicates accuracy. |
| Constructor Summary | |
|---|---|
WeightedMultiClassPerformance()
Creates a WeightedMultiClassPerformance with undefined type. |
|
WeightedMultiClassPerformance(int type)
Creates a WeightedMultiClassPerformance with the given type. |
|
WeightedMultiClassPerformance(WeightedMultiClassPerformance m)
|
|
| 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 |
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.awt.Component |
getVisualizationComponent(IOContainer ioContainer)
This implementation returns a confusion matrix viewer based on a JTable. |
static WeightedMultiClassPerformance |
newInstance(java.lang.String name)
Creates a WeightedMultiClassPerformance with the given type. |
void |
setWeights(double[] weights)
Sets the class weights. |
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, setAverageCount |
| Methods inherited from class com.rapidminer.operator.ResultObjectAdapter |
|---|
addAction, getActions, getResultIcon, isSavable, log, logError, logNote, logWarning, save, toHTML, toResultString |
| Methods inherited from class com.rapidminer.operator.AbstractIOObject |
|---|
copy, getLog, getSource, initWriting, 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 |
|---|
copy, getLog, getSource, setLoggingHandler, setSource, write |
| Field Detail |
|---|
public static final int UNDEFINED
public static final int WEIGHTED_RECALL
public static final int WEIGHTED_PRECISION
public static final java.lang.String[] NAMES
public static final java.lang.String[] DESCRIPTIONS
| Constructor Detail |
|---|
public WeightedMultiClassPerformance()
public WeightedMultiClassPerformance(int type)
public WeightedMultiClassPerformance(WeightedMultiClassPerformance m)
| Method Detail |
|---|
public static WeightedMultiClassPerformance newInstance(java.lang.String name)
public void setWeights(double[] weights)
setWeights in interface ClassWeightedPerformance
public void startCounting(ExampleSet eSet,
boolean useExampleWeights)
throws OperatorException
startCounting in class MeasuredPerformanceOperatorExceptionpublic void countExample(Example example)
countExample in class MeasuredPerformancepublic double getExampleCount()
PerformanceCriterion
getExampleCount in class PerformanceCriterionpublic 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.awt.Component getVisualizationComponent(IOContainer ioContainer)
getVisualizationComponent in interface ResultObjectgetVisualizationComponent in class Averagablepublic java.lang.String toString()
toString in interface ReadabletoString in class Averagable
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||