Package weka.knowledgeflow.steps
Class ClassifierPerformanceEvaluator
java.lang.Object
weka.knowledgeflow.steps.BaseStep
weka.knowledgeflow.steps.ClassifierPerformanceEvaluator
- All Implemented Interfaces:
Serializable,BaseStepExtender,Step
@KFStep(name="ClassifierPerformanceEvaluator",
category="Evaluation",
toolTipText="Evaluates batch classifiers",
iconPath="weka/gui/knowledgeflow/icons/ClassifierPerformanceEvaluator.gif")
public class ClassifierPerformanceEvaluator
extends BaseStep
Step that implements batch classifier evaluation
- Version:
- $Revision: $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet the cost matrix to use as a stringReturn the fully qualified name of a custom editor component (JComponent) to use for editing the properties of the step.booleanGet whether the size of plot data points will be proportional to the prediction marginbooleanGet whether to evaluate with respoect to costsGet the evaluation metrics to output (as a comma-separated list).Get a list of incoming connection types that this step can accept.Get a list of outgoing connection types that this step can produce.booleanbooleanbooleanvoidprocessIncoming(Data data) Process an incoming data payload (if the step accepts incoming connections)voidsetCollectPredictionsForVisAndAUC(boolean collectPredictionsForVisAndAUC) voidSet the cost matrix to use as a stringvoidsetErrorPlotPointSizeProportionalToMargin(boolean e) Set whether the size of plot data points will be proportional to the prediction marginvoidsetEvaluateWithRespectToCosts(boolean useCosts) Set whether to evaluate with respoect to costsvoidSet the evaluation metrics to output (as a comma-separated list).voidsetOutputConfusionMatrix(boolean outputConfusionMatrix) voidsetOutputEntropyMetrics(boolean outputEntropyMetrics) voidsetOutputPerClassStats(boolean perClassStats) voidstepInit()Initialize the step.voidstop()Request that processing be stopped.Methods inherited from class weka.knowledgeflow.steps.BaseStep
environmentSubstitute, getDefaultSettings, getInteractiveViewers, getInteractiveViewersImpls, getName, getStepManager, globalInfo, isResourceIntensive, isStopRequested, outputStructureForConnectionType, outputStructureForConnectionType, setName, setStepIsResourceIntensive, setStepManager, setStepMustRunSingleThreaded, start, stepMustRunSingleThreaded
-
Constructor Details
-
ClassifierPerformanceEvaluator
public ClassifierPerformanceEvaluator()Constructor
-
-
Method Details
-
setOutputPerClassStats
public void setOutputPerClassStats(boolean perClassStats) -
getOutputPerClassStats
@OptionMetadata(displayName="Output per-class stats", description="Output precision/recall and true/false positives for each class", displayOrder=1) public boolean getOutputPerClassStats() -
setOutputConfusionMatrix
@OptionMetadata(displayName="Output confusion matrix", description="Output the matrix containing class confusions", displayOrder=2) public void setOutputConfusionMatrix(boolean outputConfusionMatrix) -
getOutputConfusionMatrix
public boolean getOutputConfusionMatrix() -
setOutputEntropyMetrics
@OptionMetadata(displayName="Output entropy evaluation measures", description="Output entropy-based evaluation measures", displayOrder=3) public void setOutputEntropyMetrics(boolean outputEntropyMetrics) -
getOutputEntropyMetrics
public boolean getOutputEntropyMetrics() -
setCollectPredictionsForVisAndAUC
@OptionMetadata(displayName="Collect test data and predictions for visualization", description="Collect data and predictions in order to output visualizableError and thresholdData data", displayOrder=4) public void setCollectPredictionsForVisAndAUC(boolean collectPredictionsForVisAndAUC) -
getCollectPredictionsForVisAndAUC
public boolean getCollectPredictionsForVisAndAUC() -
getErrorPlotPointSizeProportionalToMargin
@OptionMetadata(displayName="Error plot point size proportional to margin", description="Set the point size proportional to the prediction margin for classification error plots") public boolean getErrorPlotPointSizeProportionalToMargin()Get whether the size of plot data points will be proportional to the prediction margin- Returns:
- true if plot data points will be rendered proportional to the size of the prediction margin
-
setErrorPlotPointSizeProportionalToMargin
public void setErrorPlotPointSizeProportionalToMargin(boolean e) Set whether the size of plot data points will be proportional to the prediction margin- Parameters:
e- true if plot data points will be rendered proportional to the size of the prediction margin
-
getEvaluationMetricsToOutput
Get the evaluation metrics to output (as a comma-separated list).- Returns:
- the evaluation metrics to output
-
setEvaluationMetricsToOutput
Set the evaluation metrics to output (as a comma-separated list).- Parameters:
m- the evaluation metrics to output
-
setEvaluateWithRespectToCosts
Set whether to evaluate with respoect to costs- Parameters:
useCosts- true to use cost-sensitive evaluation
-
getEvaluateWithRespectToCosts
public boolean getEvaluateWithRespectToCosts()Get whether to evaluate with respoect to costs- Returns:
- true to use cost-sensitive evaluation
-
setCostMatrixString
Set the cost matrix to use as a string- Parameters:
cms- the cost matrix to use
-
getCostMatrixString
Get the cost matrix to use as a string- Returns:
- the cost matrix
-
getIncomingConnectionTypes
Get a list of incoming connection types that this step can accept. Ideally (and if appropriate), this should take into account the state of the step and any existing incoming connections. E.g. a step might be able to accept one (and only one) incoming batch data connection.- Returns:
- a list of incoming connections that this step can accept given its current state
-
getOutgoingConnectionTypes
Get a list of outgoing connection types that this step can produce. Ideally (and if appropriate), this should take into account the state of the step and the incoming connections. E.g. depending on what incoming connection is present, a step might be able to produce a trainingSet output, a testSet output or neither, but not both.- Returns:
- a list of outgoing connections that this step can produce
-
stepInit
Description copied from interface:StepInitialize the step.- Throws:
WekaException- if a problem occurs during initialization
-
stop
public void stop()Description copied from class:BaseStepRequest that processing be stopped. Subclasses should callisStopRequested()periodically to see if they should stop processing. -
processIncoming
Process an incoming data payload (if the step accepts incoming connections)- Specified by:
processIncomingin interfaceBaseStepExtender- Specified by:
processIncomingin interfaceStep- Overrides:
processIncomingin classBaseStep- Parameters:
data- the payload to process- Throws:
WekaException- if a problem occurs
-
getCustomEditorForStep
Return the fully qualified name of a custom editor component (JComponent) to use for editing the properties of the step. This method can return null, in which case the system will dynamically generate an editor using the GenericObjectEditor- Specified by:
getCustomEditorForStepin interfaceStep- Overrides:
getCustomEditorForStepin classBaseStep- Returns:
- the fully qualified name of a step editor component
-