|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | ||||||||
java.lang.Objectcoser.classifiers.trees.BuildAndTestTree
public class BuildAndTestTree 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.
| 修饰符 和 类型 | 字段 和 描述 |
|---|---|
(专用软件包) int[] |
algorithmsWinArray
All lambda settings, cost-gain, and best training approach. |
(专用软件包) boolean |
comparePruneStrategies
Compare different prune strategies or not. |
(专用软件包) boolean |
compareWithBalance
Balance or not. |
(专用软件包) double |
costInTrainingSet
The average cost in training set. |
(专用软件包) int |
cvFolds
Number of folds for cross-validation. |
(专用软件包) double[] |
misclassificationCostSumArray
If all algorithms, these elements correspond with no prune, preprune, postprune. |
(专用软件包) int |
numberOfLambdas
Number of lambda. |
(专用软件包) int |
numberOfOmegas
Number of omega. |
(专用软件包) int |
numberOfSchemes
For different lambdas, cost-gain and competition approaches. |
(专用软件包) int |
testStrategy
Test strategy, use training set, split-in-two, or cross-validation. |
(专用软件包) double |
trainingPercentage
The percentage of the training. |
| 构造函数 和 描述 |
|---|
BuildAndTestTree(BothCostsNominalDecisionSystem paraSystem,
double paraTrainingPercentage,
int paraTestStrategy,
int paraNumberOfLambdas,
int paraNumberOfOmegas,
int paraCvFolds,
boolean paraCompareWithBalance,
boolean paraComparePruneStrategies)
The only constructor. |
| 修饰符 和 类型 | 方法 和 描述 |
|---|---|
int[] |
getAlgorithmWinsArray()
Get the algorithm wins array. |
double[] |
getCostSumArray()
Get the cost sum array. |
java.lang.String |
oneRunAllAlgorithms(double paraLambdaLowerBound,
double paraLambdaStepLength,
double paraOmegaLowerBound,
double paraOmegaLength,
int paraPruneStrategy)
One run, compare all lambda settings. |
double |
oneRunCV(int paraAlgorithm,
double paraLambda,
int paraPruneStrategy,
boolean paraBalance)
One run, cross-validation. |
java.lang.String |
oneRunPruneCompare(double paraLambdaLowerBound,
double paraLambdaUpperBound,
double paraLambdaStepLength,
boolean paraBalance)
One run, compare prune strategies. |
double |
oneRunSplitInTwo(int paraAlgorithm,
double paraLambda,
int paraPruneStrategy,
boolean paraBalance)
One run, split in two. |
double |
oneRunTrainingSet(int paraAlgorithm,
double paraLambda,
int paraPruneStrategy,
boolean paraBalance)
One run, test on the training set. |
void |
refreshTestCost()
Refresh test cost. |
void |
refreshTrainingTestingSets()
Refresh the training test set. |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
double trainingPercentage
int testStrategy
int cvFolds
double costInTrainingSet
double[] misclassificationCostSumArray
int[] algorithmsWinArray
int numberOfLambdas
int numberOfOmegas
boolean compareWithBalance
boolean comparePruneStrategies
int numberOfSchemes
| 构造方法详细信息 |
|---|
public BuildAndTestTree(BothCostsNominalDecisionSystem paraSystem,
double paraTrainingPercentage,
int paraTestStrategy,
int paraNumberOfLambdas,
int paraNumberOfOmegas,
int paraCvFolds,
boolean paraCompareWithBalance,
boolean paraComparePruneStrategies)
paraSystem - The BothCostsNominalDecisionSystem 测试代价和误分类代价决策系统paraTrainingPercentage - The percentage of the training set. 训练集百分比paraTestStrategy - The strategy of the test. 测试策略paraNumberOfLambdas - The number of lambda values. 兰布达值的个数paraNumberOfOmegas - The number of omega values. 欧米伽值的个数paraCvFolds - The folds of cross validation. 交叉验证的折数paraCompareWithBalance - 平衡或者不是。当它为真的时候,两种方法都将被测试。| 方法详细信息 |
|---|
public void refreshTestCost()
throws java.lang.Exception
java.lang.Exceptionpublic double[] getCostSumArray()
public int[] getAlgorithmWinsArray()
public java.lang.String oneRunAllAlgorithms(double paraLambdaLowerBound,
double paraLambdaStepLength,
double paraOmegaLowerBound,
double paraOmegaLength,
int paraPruneStrategy)
throws java.lang.Exception
paraLambdaLowerBound - The lower bound of lambda values 兰布达值的下界paraLambdaStepLength - The step length of lambda values 兰布达值的步长paraOmegaLowerBound - The lower bound of omega values 欧米伽值的下界paraOmegaLength - The step length of omega values 欧米伽值的步长paraPruneStrategy - The strategy of pruning tree 决策树剪枝策略java.lang.Exception
public java.lang.String oneRunPruneCompare(double paraLambdaLowerBound,
double paraLambdaUpperBound,
double paraLambdaStepLength,
boolean paraBalance)
throws java.lang.Exception
java.lang.Exception
public double oneRunTrainingSet(int paraAlgorithm,
double paraLambda,
int paraPruneStrategy,
boolean paraBalance)
throws java.lang.Exception
java.lang.Exception
public void refreshTrainingTestingSets()
throws java.lang.Exception
java.lang.Exception
public double oneRunSplitInTwo(int paraAlgorithm,
double paraLambda,
int paraPruneStrategy,
boolean paraBalance)
throws java.lang.Exception
java.lang.Exception
public double oneRunCV(int paraAlgorithm,
double paraLambda,
int paraPruneStrategy,
boolean paraBalance)
throws java.lang.Exception
java.lang.Exception
|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | ||||||||