|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | ||||||||
java.lang.Objectcoser.classifiers.trees.BuildAndTestTreeCostC45
public class BuildAndTestTreeCostC45 extends java.lang.Object
Summary: Build and test decision tree. Run different algorithms.
Author: Fan Min minfanphd@163.com
Copyright: The source code and all documents are open and free. PLEASE keep
this header while revising the program.
Organization: Lab of Granular Computing,
Zhangzhou Normal University, Fujian 363000, China.
Project: The cost-sensitive rough sets project.
Progress: Half done.
Written time: November 5, 2011.
Last modify time: January 27, 2012.
| 修饰符 和 类型 | 字段 和 描述 |
|---|---|
static boolean[] |
attributeTested
The attributes which are tested. |
static int[] |
attributeTestedCounts
The tested counts of each attribute |
int[][] |
costMatrix
The misclassification cost matrix |
static int[] |
individualTestCostArray
The test cost of the decision system. |
| 构造函数 和 描述 |
|---|
BuildAndTestTreeCostC45(BothCostsNominalDecisionSystem paraNominalDecisionSystem,
double paraLambdaLowerBound,
double paraLambdaUpperBound,
double paraLambdaStepLength,
int paraPruneStrategy,
int paraTestStrategy,
double paraTrainsetProportion,
boolean paraDetail)
The third constructor |
BuildAndTestTreeCostC45(BothCostsNominalDecisionSystem paraBothCostsNominalDecisionSystem,
double paraLambda,
int paraPruneStrategy,
int paraTestStrategy,
double paraTrainsetProportion,
boolean paraDetail)
The first constructor |
BuildAndTestTreeCostC45(BothCostsNumericDecisionSystem paraNumericDecisionSystem,
double paraLambdaLowerBound,
double paraLambdaUpperBound,
double paraLambdaStepLength,
int paraPruneStrategy,
int paraTestStrategy,
double paraTrainsetProportion,
boolean paraDetail)
The fourth constructor |
BuildAndTestTreeCostC45(BothCostsNumericDecisionSystem paraBothCostsNumericDecisionSystem,
double paraLambda,
int paraPruneStrategy,
int paraTestStrategy,
double paraTrainsetProportion,
boolean paraDetail)
The second constructor |
| 修饰符 和 类型 | 方法 和 描述 |
|---|---|
java.lang.String |
batchDecisionTreeC45(double paraLambdaLowerBound,
double paraLambdaUpperBound,
double paraLambdaStepLength,
int paraExperiments)
Batch experiments |
java.lang.String |
batchDecisionTreeC45Rank(double paraLambdaLowerBound,
double paraLambdaUpperBound,
double paraLambdaStepLength,
int paraExperiments)
Batch decision tree experiments with competition ranking. |
java.lang.String |
batchDecisionTreeMisCostVariety(double paraLambdaLowerBound,
double paraLambdaUpperBound,
double paraLambdaStepLength,
int paraExperiments)
Batch decision tree experiments considering the variety of the misclassification matrix. |
CostJ48 |
buildDecisionTree()
Build the decision tree. |
double |
evaluateCost(CostJ48 paraCostJ48,
Instances paraTest)
Evaluate the cost of the generated decision tree. |
double |
evaluateDecisionTree(CostJ48 paraCostJ48,
Instances paraTest)
Evaluate the decistion tree on the test data set. |
void |
postPrune(coser.classifiers.trees.csj48.ClassifierTree paraRoot)
Post prune |
void |
postPruneNumeric(coser.classifiers.trees.csj48.ClassifierTree paraRoot)
Post prune the numeric cost-sensitive decision tree. |
boolean |
postPruneNumericHalf()
Post prune the numeric cost-sensitive decision tree. |
void |
postPruneSymbolic(coser.classifiers.trees.csj48.ClassifierTree paraRoot)
Post prune the symbolic cost-sensitive decision tree. |
void |
setTrainsetProportion(double paraTrainsetProportion)
Set the train set proportion |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
public static int[] individualTestCostArray
public int[][] costMatrix
public static boolean[] attributeTested
public static int[] attributeTestedCounts
| 构造方法详细信息 |
|---|
public BuildAndTestTreeCostC45(BothCostsNominalDecisionSystem paraBothCostsNominalDecisionSystem,
double paraLambda,
int paraPruneStrategy,
int paraTestStrategy,
double paraTrainsetProportion,
boolean paraDetail)
paraBothCostsNominalDecisionSystem - The given nominal decision systemparaLambda - The parameter lambdaparaPruneStrategy - The pruning stragyparaTestStrategy - The testing strategyparaTrainsetProportion - The proportion of training data setparaDetail - If reveal the running details
public BuildAndTestTreeCostC45(BothCostsNumericDecisionSystem paraBothCostsNumericDecisionSystem,
double paraLambda,
int paraPruneStrategy,
int paraTestStrategy,
double paraTrainsetProportion,
boolean paraDetail)
paraBothCostsNumericDecisionSystem - The given both costs numeric decision systemparaLambda - The parameter lambdaparaPruneStrategy - The pruning stragyparaTestStrategy - The testing strategyparaTrainsetProportion - The proportion of training data setparaDetail - If reveal the running details
public BuildAndTestTreeCostC45(BothCostsNominalDecisionSystem paraNominalDecisionSystem,
double paraLambdaLowerBound,
double paraLambdaUpperBound,
double paraLambdaStepLength,
int paraPruneStrategy,
int paraTestStrategy,
double paraTrainsetProportion,
boolean paraDetail)
paraNominalDecisionSystem - The given both costs nominal decision systemparaLambdaLowerBound - The lower bound of parameter lambdaparaLambdaUpperBound - The upper bound of parameter lambdaparaLambdaStepLength - The step length of parameter lambdaparaPruneStrategy - The pruning strategyparaTestStrategy - The testing strategyparaTrainsetProportion - The proportion of training data setparaDetail - If reveal running details
public BuildAndTestTreeCostC45(BothCostsNumericDecisionSystem paraNumericDecisionSystem,
double paraLambdaLowerBound,
double paraLambdaUpperBound,
double paraLambdaStepLength,
int paraPruneStrategy,
int paraTestStrategy,
double paraTrainsetProportion,
boolean paraDetail)
paraNumericDecisionSystem - The given both costs nominal decision systemparaLambdaLowerBound - The lower bound of parameter lambdaparaLambdaUpperBound - The upper bound of parameter lambdaparaLambdaStepLength - The step length of parameter lambdaparaPruneStrategy - The pruning strategyparaTestStrategy - The testing strategyparaTrainsetProportion - The proportion of training data setparaDetail - If reveal running details| 方法详细信息 |
|---|
public CostJ48 buildDecisionTree()
public java.lang.String batchDecisionTreeC45(double paraLambdaLowerBound,
double paraLambdaUpperBound,
double paraLambdaStepLength,
int paraExperiments)
throws java.lang.Exception
paraLambdaLowerBound - The lower bound of lambdaparaLambdaUpperBound - The upper bound of lambdaparaLambdaStepLength - The step length of lambdaparaExperiments - The experiment countsjava.lang.Exception - Exceptions
public java.lang.String batchDecisionTreeC45Rank(double paraLambdaLowerBound,
double paraLambdaUpperBound,
double paraLambdaStepLength,
int paraExperiments)
throws java.lang.Exception
paraLambdaLowerBound - The lower bound of lambdaparaLambdaUpperBound - The upper bound of lambdaparaLambdaStepLength - The step length of lambdaparaExperiments - The experiment countsjava.lang.Exception - Exceptions
public java.lang.String batchDecisionTreeMisCostVariety(double paraLambdaLowerBound,
double paraLambdaUpperBound,
double paraLambdaStepLength,
int paraExperiments)
throws java.lang.Exception
paraLambdaLowerBound - The lower bound of lambda valueparaLambdaUpperBound - The upper bound of lambda valueparaLambdaStepLength - The lambda step lengthparaExperiments - The number of experimentsjava.lang.Exception
public double evaluateDecisionTree(CostJ48 paraCostJ48,
Instances paraTest)
paraCostJ48 - The cost J48 to be evaluted.paraTest - The testing data set.
public double evaluateCost(CostJ48 paraCostJ48,
Instances paraTest)
paraCostJ48 - The cost J48 to be evaluted.paraTest - The testing data set.public void postPrune(coser.classifiers.trees.csj48.ClassifierTree paraRoot)
paraRoot - The classifier tree root.public void postPruneSymbolic(coser.classifiers.trees.csj48.ClassifierTree paraRoot)
paraRoot - The classifier tree root.public void postPruneNumeric(coser.classifiers.trees.csj48.ClassifierTree paraRoot)
paraRoot - The classifier tree root.public boolean postPruneNumericHalf()
public void setTrainsetProportion(double paraTrainsetProportion)
paraTrainsetProportion - The proportion of the training set.
|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | ||||||||