|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.attributeSelection.ASEvaluation
weka.attributeSelection.CostSensitiveASEvaluation
public abstract class CostSensitiveASEvaluation
Abstract base class for cost-sensitive subset and attribute evaluators.
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
CostSensitiveASEvaluation()
|
|
| Method Summary | |
|---|---|
void |
buildEvaluator(Instances data)
Generates a attribute evaluator. |
String |
costMatrixSourceTipText()
|
String |
costMatrixTipText()
|
String |
defaultEvaluatorString()
Return the name of the default evaluator. |
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. |
File |
getOnDemandDirectory()
Returns the directory that will be searched for cost files when loading on demand. |
String[] |
getOptions()
Gets the current settings of the subset evaluator. |
String |
getRevision()
Returns the revision string. |
int |
getSeed()
Gets the seed for the random number generations. |
String |
globalInfo()
|
Enumeration |
listOptions()
Returns an enumeration describing the available options. |
String |
onDemandDirectoryTipText()
|
int[] |
postProcess(int[] attributeSet)
Provides a chance for a attribute evaluator to do any special post processing of the selected attribute set. |
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(File newDir)
Sets the directory that will be searched for cost files when loading on demand. |
void |
setOptions(String[] options)
Parses a given list of options. |
void |
setSeed(int seed)
Set the seed for random number generation. |
String |
toString()
Output a representation of this evaluator |
| Methods inherited from class weka.attributeSelection.ASEvaluation |
|---|
forName, makeCopies |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MATRIX_ON_DEMAND
public static final int MATRIX_SUPPLIED
public static final Tag[] TAGS_MATRIX_SOURCE
| Constructor Detail |
|---|
public CostSensitiveASEvaluation()
| Method Detail |
|---|
public Enumeration listOptions()
listOptions in interface OptionHandler
public void setOptions(String[] options)
throws 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 strings
Exception - if an option is not supportedpublic String[] getOptions()
getOptions in interface OptionHandlerpublic String globalInfo()
public String defaultEvaluatorString()
public String costMatrixSourceTipText()
public SelectedTag getCostMatrixSource()
public void setCostMatrixSource(SelectedTag newMethod)
newMethod - the cost matrix location method.public String onDemandDirectoryTipText()
public File getOnDemandDirectory()
public void setOnDemandDirectory(File newDir)
newDir - The cost file search directory.public String costMatrixTipText()
public CostMatrix getCostMatrix()
public void setCostMatrix(CostMatrix newCostMatrix)
newCostMatrix - the cost matrixpublic String seedTipText()
public void setSeed(int seed)
seed - the seedpublic int getSeed()
public String evaluatorTipText()
public void setEvaluator(ASEvaluation newEvaluator)
throws IllegalArgumentException
newEvaluator - the evaluator to use.
IllegalArgumentException - if the evaluator is of the wrong typepublic ASEvaluation getEvaluator()
public Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class ASEvaluationCapabilities
public void buildEvaluator(Instances data)
throws Exception
buildEvaluator in class ASEvaluationdata - set of instances serving as training data
Exception - if the evaluator has not been
generated successfully
public int[] postProcess(int[] attributeSet)
throws Exception
postProcess in class ASEvaluationattributeSet - the set of attributes found by the search
Exception - if postprocessing fails for some reasonpublic String toString()
toString in class Objectpublic String getRevision()
getRevision in interface RevisionHandlergetRevision in class ASEvaluation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||