public abstract class CostSensitiveASEvaluation extends ASEvaluation implements OptionHandler, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static int |
MATRIX_ON_DEMAND
load cost matrix on demand
|
static int |
MATRIX_SUPPLIED
use explicit cost matrix
|
static Tag[] |
TAGS_MATRIX_SOURCE
Specify possible sources of the cost matrix
|
| Constructor and Description |
|---|
CostSensitiveASEvaluation() |
| Modifier and Type | Method and Description |
|---|---|
void |
buildEvaluator(Instances data)
Generates a attribute evaluator.
|
java.lang.String |
costMatrixSourceTipText() |
java.lang.String |
costMatrixTipText() |
java.lang.String |
defaultEvaluatorString()
Return the name of the default evaluator.
|
java.lang.String |
evaluatorTipText()
Returns the tip text for this property
|
Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
CostMatrix |
getCostMatrix()
Gets the misclassification cost matrix.
|
SelectedTag |
getCostMatrixSource()
Gets the source location method of the cost matrix.
|
ASEvaluation |
getEvaluator()
Get the evaluator used as the base evaluator.
|
java.io.File |
getOnDemandDirectory()
Returns the directory that will be searched for cost files when
loading on demand.
|
java.lang.String[] |
getOptions()
Gets the current settings of the subset evaluator.
|
java.lang.String |
getRevision()
Returns the revision string.
|
int |
getSeed()
Gets the seed for the random number generations.
|
java.lang.String |
globalInfo() |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
java.lang.String |
onDemandDirectoryTipText() |
int[] |
postProcess(int[] attributeSet)
Provides a chance for a attribute evaluator to do any special
post processing of the selected attribute set.
|
java.lang.String |
seedTipText()
Returns the tip text for this property
|
void |
setCostMatrix(CostMatrix newCostMatrix)
Sets the misclassification cost matrix.
|
void |
setCostMatrixSource(SelectedTag newMethod)
Sets the source location of the cost matrix.
|
void |
setEvaluator(ASEvaluation newEvaluator)
Set the base evaluator.
|
void |
setOnDemandDirectory(java.io.File newDir)
Sets the directory that will be searched for cost files when
loading on demand.
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setSeed(int seed)
Set the seed for random number generation.
|
java.lang.String |
toString()
Output a representation of this evaluator
|
clean, forName, makeCopiespublic static final int MATRIX_ON_DEMAND
public static final int MATRIX_SUPPLIED
public static final Tag[] TAGS_MATRIX_SOURCE
public java.util.Enumeration listOptions()
listOptions in interface OptionHandlerpublic void setOptions(java.lang.String[] options)
throws java.lang.Exception
-C <cost file name> File name of a cost matrix to use. If this is not supplied, a cost matrix will be loaded on demand. The name of the on-demand file is the relation name of the training data plus ".cost", and the path to the on-demand file is specified with the -N option.
-N <directory> Name of a directory to search for cost files when loading costs on demand (default current directory).
-cost-matrix <matrix> The cost matrix in Matlab single line format.
-S <integer> The seed to use for random number generation.
-W Full name of base evaluator. (default: weka.attributeSelection.CfsSubsetEval)Options after -- are passed to the designated evaluator.
setOptions in interface OptionHandleroptions - the list of options as an array of stringsjava.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlerpublic java.lang.String globalInfo()
public java.lang.String defaultEvaluatorString()
public java.lang.String costMatrixSourceTipText()
public SelectedTag getCostMatrixSource()
public void setCostMatrixSource(SelectedTag newMethod)
newMethod - the cost matrix location method.public java.lang.String onDemandDirectoryTipText()
public java.io.File getOnDemandDirectory()
public void setOnDemandDirectory(java.io.File newDir)
newDir - The cost file search directory.public java.lang.String costMatrixTipText()
public CostMatrix getCostMatrix()
public void setCostMatrix(CostMatrix newCostMatrix)
newCostMatrix - the cost matrixpublic java.lang.String seedTipText()
public void setSeed(int seed)
seed - the seedpublic int getSeed()
public java.lang.String evaluatorTipText()
public void setEvaluator(ASEvaluation newEvaluator) throws java.lang.IllegalArgumentException
newEvaluator - the evaluator to use.java.lang.IllegalArgumentException - if the evaluator is of the wrong typepublic ASEvaluation getEvaluator()
public Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class ASEvaluationCapabilitiespublic void buildEvaluator(Instances data) throws java.lang.Exception
buildEvaluator in class ASEvaluationdata - set of instances serving as training datajava.lang.Exception - if the evaluator has not been
generated successfullypublic int[] postProcess(int[] attributeSet)
throws java.lang.Exception
postProcess in class ASEvaluationattributeSet - the set of attributes found by the searchjava.lang.Exception - if postprocessing fails for some reasonpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class ASEvaluation