|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | ||||||||
java.lang.ObjectClassifier
coser.classifiers.trees.CostJ48graft
public class CostJ48graft extends Classifier
Class for generating a grafted (pruned or unpruned)
C4.5 decision tree. For more information, see
Geoff Webb: Decision Tree Grafting From the All-Tests-But-One Partition. In:
, San Francisco, CA, 1999.
@inproceedings{Webb1999,
address = {San Francisco, CA},
author = {Geoff Webb},
publisher = {Morgan Kaufmann},
title = {Decision Tree Grafting From the All-Tests-But-One Partition},
year = {1999}
}
Valid options are:
-U Use unpruned tree.
-C <pruning confidence> Set confidence threshold for pruning. (default 0.25)
-M <minimum number of instances> Set minimum number of instances per leaf. (default 2)
-B Use binary splits only.
-S Don't perform subtree raising.
-L Do not clean up after the tree has been built.
-A Laplace smoothing for predicted probabilities. (note: this option only affects initial tree; grafting process always uses laplace).
-E Relabel when grafting.
| 修饰符 和 类型 | 字段 和 描述 |
|---|---|
(专用软件包) static long |
serialVersionUID
for serialization |
| 构造函数 和 描述 |
|---|
CostJ48graft()
|
| 修饰符 和 类型 | 方法 和 描述 |
|---|---|
java.lang.String |
binarySplitsTipText()
Returns the tip text for this property |
void |
buildClassifier(Instances instances)
Generates the classifier. |
double |
classifyInstance(Instance instance)
Classifies an instance. |
java.lang.String |
confidenceFactorTipText()
Returns the tip text for this property |
double[] |
distributionForInstance(Instance instance)
Returns class probabilities for an instance. |
java.util.Enumeration<java.lang.String> |
enumerateMeasures()
Returns an enumeration of the additional measure names |
boolean |
getBinarySplits()
Get the value of binarySplits. |
Capabilities |
getCapabilities()
Returns default capabilities of the classifier. |
float |
getConfidenceFactor()
Get the value of CF. |
int |
getM_numFolds()
|
double |
getMeasure(java.lang.String additionalMeasureName)
Returns the value of the named measure |
int |
getMinNumObj()
Get the value of minNumObj. |
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier. |
boolean |
getRelabel()
Get the value of relabelling |
java.lang.String |
getRevision()
Returns the revision string. |
boolean |
getSaveInstanceData()
Check whether instance data is to be saved. |
boolean |
getSubtreeRaising()
Get the value of subtreeRaising. |
TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on. |
boolean |
getUnpruned()
Get the value of unpruned. |
boolean |
getUseLaplace()
Get the value of useLaplace. |
java.lang.String |
globalInfo()
Returns a string describing classifier |
java.lang.String |
graph()
Returns graph describing the tree. |
int |
graphType()
Returns the type of graph this classifier represents. |
java.util.Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options. |
static void |
main(java.lang.String[] argv)
Main method for testing this class |
double |
measureNumLeaves()
Returns the number of leaves |
double |
measureNumRules()
Returns the number of rules (same as number of leaves) |
double |
measureTreeSize()
Returns the size of the tree |
java.lang.String |
minNumObjTipText()
Returns the tip text for this property |
java.lang.String |
prefix()
Returns tree in prefix order. |
java.lang.String |
relabelTipText()
Returns the tip text for this property |
java.lang.String |
saveInstanceDataTipText()
Returns the tip text for this property |
void |
setBinarySplits(boolean v)
Set the value of binarySplits. |
void |
setConfidenceFactor(float v)
Set the value of CF. |
void |
setM_numFolds(int m_numFolds)
|
void |
setMinNumObj(int v)
Set the value of minNumObj. |
void |
setOptions(java.lang.String[] options)
Parses a given list of options |
void |
setRelabel(boolean v)
Set the value of relabelling. |
void |
setSaveInstanceData(boolean v)
Set whether instance data is to be saved. |
void |
setSubtreeRaising(boolean v)
Set the value of subtreeRaising. |
void |
setUnpruned(boolean v)
Set the value of unpruned. |
void |
setUseLaplace(boolean newuseLaplace)
Set the value of useLaplace. |
java.lang.String |
subtreeRaisingTipText()
Returns the tip text for this property |
java.lang.String |
toSource(java.lang.String className)
Returns tree as an if-then statement. |
java.lang.String |
toString()
Returns a description of the classifier. |
java.lang.String |
toSummaryString()
Returns a superconcise version of the model |
java.lang.String |
unprunedTipText()
Returns the tip text for this property |
java.lang.String |
useLaplaceTipText()
Returns the tip text for this property |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 字段详细信息 |
|---|
static final long serialVersionUID
| 构造方法详细信息 |
|---|
public CostJ48graft()
| 方法详细信息 |
|---|
public java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
public Capabilities getCapabilities()
public void buildClassifier(Instances instances)
throws java.lang.Exception
instances - the data to train the classifier withjava.lang.Exception - if classifier can't be built successfully
public double classifyInstance(Instance instance)
throws java.lang.Exception
instance - the instance to classifyjava.lang.Exception - if instance can't be classified successfully
public final double[] distributionForInstance(Instance instance)
throws java.lang.Exception
instance - the instance to calculate the class probabilities forjava.lang.Exception - if distribution can't be computed successfullypublic int graphType()
public java.lang.String graph()
throws java.lang.Exception
java.lang.Exception - if graph can't be computed
public java.lang.String prefix()
throws java.lang.Exception
java.lang.Exception - if something goes wrong
public java.lang.String toSource(java.lang.String className)
throws java.lang.Exception
className - the name of the Java classjava.lang.Exception - if something goes wrongpublic java.util.Enumeration<Option> listOptions()
-U
Use unpruned tree.
-C confidence
Set confidence threshold for pruning. (Default: 0.25)
-M number
Set minimum number of instances per leaf. (Default: 2)
-B
Use binary splits for nominal attributes.
-S
Don't perform subtree raising.
-L
Do not clean up after the tree has been built.
-A
If set, Laplace smoothing is used for predicted probabilites. (note: this
option only affects initial tree; grafting process always uses laplace).
-E
Allow relabelling when grafting.
public void setOptions(java.lang.String[] options)
throws java.lang.Exception
-U Use unpruned tree.
-C <pruning confidence> Set confidence threshold for pruning. (default 0.25)
-M <minimum number of instances> Set minimum number of instances per leaf. (default 2)
-B Use binary splits only.
-S Don't perform subtree raising.
-L Do not clean up after the tree has been built.
-A Laplace smoothing for predicted probabilities. (note: this option only affects initial tree; grafting process always uses laplace).
-E Relabel when grafting.
options - the list of options as an array of stringsjava.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
public java.lang.String useLaplaceTipText()
public boolean getUseLaplace()
public void setUseLaplace(boolean newuseLaplace)
newuseLaplace - Value to assign to useLaplace.public java.lang.String toString()
public java.lang.String toSummaryString()
public double measureTreeSize()
public double measureNumLeaves()
public double measureNumRules()
public java.util.Enumeration<java.lang.String> enumerateMeasures()
public double getMeasure(java.lang.String additionalMeasureName)
additionalMeasureName - the name of the measure to query for its valuejava.lang.IllegalArgumentException - if the named measure is not supportedpublic java.lang.String unprunedTipText()
public boolean getUnpruned()
public void setUnpruned(boolean v)
v - Value to assign to unpruned.public java.lang.String relabelTipText()
public boolean getRelabel()
public void setRelabel(boolean v)
v - Value to assign to relabelling flag.public java.lang.String confidenceFactorTipText()
public float getConfidenceFactor()
public void setConfidenceFactor(float v)
v - Value to assign to CF.public java.lang.String minNumObjTipText()
public int getMinNumObj()
public void setMinNumObj(int v)
v - Value to assign to minNumObj.public java.lang.String binarySplitsTipText()
public boolean getBinarySplits()
public void setBinarySplits(boolean v)
v - Value to assign to binarySplits.public java.lang.String subtreeRaisingTipText()
public boolean getSubtreeRaising()
public void setSubtreeRaising(boolean v)
v - Value to assign to subtreeRaising.public java.lang.String saveInstanceDataTipText()
public boolean getSaveInstanceData()
public void setSaveInstanceData(boolean v)
v - true if instance data is to be savedpublic java.lang.String getRevision()
public static void main(java.lang.String[] argv)
argv - the commandline optionspublic int getM_numFolds()
public void setM_numFolds(int m_numFolds)
|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | ||||||||