Package weka.knowledgeflow.steps
Class ClassifierPerformanceEvaluator
- java.lang.Object
-
- weka.knowledgeflow.steps.BaseStep
-
- weka.knowledgeflow.steps.ClassifierPerformanceEvaluator
-
- All Implemented Interfaces:
java.io.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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClassifierPerformanceEvaluator()Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetCollectPredictionsForVisAndAUC()java.lang.StringgetCostMatrixString()Get the cost matrix to use as a stringjava.lang.StringgetCustomEditorForStep()Return the fully qualified name of a custom editor component (JComponent) to use for editing the properties of the step.booleangetErrorPlotPointSizeProportionalToMargin()Get whether the size of plot data points will be proportional to the prediction marginbooleangetEvaluateWithRespectToCosts()Get whether to evaluate with respoect to costsjava.lang.StringgetEvaluationMetricsToOutput()Get the evaluation metrics to output (as a comma-separated list).java.util.List<java.lang.String>getIncomingConnectionTypes()Get a list of incoming connection types that this step can accept.java.util.List<java.lang.String>getOutgoingConnectionTypes()Get a list of outgoing connection types that this step can produce.booleangetOutputConfusionMatrix()booleangetOutputEntropyMetrics()booleangetOutputPerClassStats()voidprocessIncoming(Data data)Process an incoming data payload (if the step accepts incoming connections)voidsetCollectPredictionsForVisAndAUC(boolean collectPredictionsForVisAndAUC)voidsetCostMatrixString(java.lang.String cms)Set 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 costsvoidsetEvaluationMetricsToOutput(java.lang.String m)Set 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
-
-
-
-
Method Detail
-
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
@ProgrammaticProperty public java.lang.String getEvaluationMetricsToOutput()
Get the evaluation metrics to output (as a comma-separated list).- Returns:
- the evaluation metrics to output
-
setEvaluationMetricsToOutput
public void setEvaluationMetricsToOutput(java.lang.String m)
Set the evaluation metrics to output (as a comma-separated list).- Parameters:
m- the evaluation metrics to output
-
setEvaluateWithRespectToCosts
@ProgrammaticProperty public void setEvaluateWithRespectToCosts(boolean useCosts)
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
@ProgrammaticProperty public void setCostMatrixString(java.lang.String cms)
Set the cost matrix to use as a string- Parameters:
cms- the cost matrix to use
-
getCostMatrixString
public java.lang.String getCostMatrixString()
Get the cost matrix to use as a string- Returns:
- the cost matrix
-
getIncomingConnectionTypes
public java.util.List<java.lang.String> 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
public java.util.List<java.lang.String> 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
public void stepInit() throws WekaExceptionDescription 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
public void processIncoming(Data data) throws WekaException
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
public java.lang.String 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
-
-