|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | ||||||||
java.lang.ObjectInstances
coser.datamodel.decisionsystem.RoughDecisionSystem
coser.datamodel.decisionsystem.CostSensitiveDecisionSystem
coser.datamodel.decisionsystem.NominalDecisionSystem
coser.datamodel.decisionsystem.TestCostNominalDecisionSystem
coser.datamodel.decisionsystem.TestCostConstraintNominalDecisionSystem
coser.datamodel.decisionsystem.TestCostConstraintNominalDecisionSystemGA
public class TestCostConstraintNominalDecisionSystemGA extends TestCostConstraintNominalDecisionSystem
Project: The cost-sensitive rough sets project.
Summary: Test cost constraint decision system with genetic algorithms. The methods might be merged into TestCostNominalDecisionSystemGA. They are written independently because those programs belong to different authors.
Author: Jiabin Liu
Copyright: The source code and all documents are open and free. PLEASE keep this header while revising the program.
Organizaion: Lab of Granular Computing, Zhangzhou Normal University, Fujian 363000, China.
Progress: The very beginning.
Written time: September 2, 2011.
Last modify time: May 26, 2012.
| 修饰符 和 类型 | 字段 和 描述 |
|---|---|
(专用软件包) int |
bestChromosomeIndex
The best chromosome of the group of chromosomes. |
(专用软件包) double |
bestFitnessValue
The best fitness value of the group of chromosomes. |
(专用软件包) boolean[][] |
chromosomes
The population. |
(专用软件包) double[] |
fitnessValues
Fitness value for chromosomes. |
(专用软件包) int |
generations
The max generation. |
static int |
MORE_ATTRIBUTES_ATTEMPTS
|
(专用软件包) int |
numberOfChromosomes
The number of Chromosomes. |
| 从类 coser.datamodel.decisionsystem.TestCostNominalDecisionSystem 继承的字段 |
|---|
lambda, weighting |
| 从类 coser.datamodel.decisionsystem.NominalDecisionSystem 继承的字段 |
|---|
ATTRIBUTES_COMBINATIONS, BACKTRACK, EXPONENTIAL, reductMinimalSize |
| 构造函数 和 描述 |
|---|
TestCostConstraintNominalDecisionSystemGA(TestCostNominalDecisionSystem paraDecisionSystem)
Construct the decision system. |
| 修饰符 和 类型 | 方法 和 描述 |
|---|---|
protected void |
chromosomeJustifyForConstraint(boolean[] paraChromosome)
Adjust the chromosome to be close to the constraint. |
protected double |
computeFitnessValue(boolean[] paraChromosome,
double paraLambda)
Compute the fitness of the given chromosome using the conditional entropy and the test cost. |
boolean |
constraintSatisfied(boolean[] paraSelectedTests)
Judge whether or not the given test set satisfy the constraint. |
protected void |
crossoverOperation()
Uniform crossover. |
protected double |
generateRandomChromosome(boolean[] paraChromosome,
double paraLambda)
Generate a random chromosome according to the test cost constraint. |
int |
getConstraint()
Get the test cost upper bound. |
void |
initializeForReduction(boolean paraWeighting,
int paraNumberOfChromosomes,
int paraNumberOfGeneration)
Initialize for reduction. |
protected void |
initializePopulation(double paraLambda)
Initialize a population. |
protected void |
mutationOperation(double paraLambda)
Mutation operation. |
protected int |
searchOneUnselectedChromosomes(int[] paraChromosomeIndices,
int paraNumberOfUnselectedChromosomes)
Select a chromosomes not selected yet for crossover. |
protected void |
selectionOperation(double paraLambda)
Select the new group of chromosomes from the existing group according to some probabilities. |
boolean[] |
testCostConstraintReductionGA(double paraLambda,
int paraConstraint)
Generate a test set by GA. |
| 从类 coser.datamodel.decisionsystem.TestCostNominalDecisionSystem 继承的方法 |
|---|
computeOptimalReductBacktrack, entropyBasedLambdaWeightedReduction, isCurrentReductOptimal, optimalReductBacktrack, removeRedundantAttributes, setLambda, setWeighting, sortByTestCost |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 字段详细信息 |
|---|
public static final int MORE_ATTRIBUTES_ATTEMPTS
int numberOfChromosomes
int generations
boolean[][] chromosomes
double[] fitnessValues
int bestChromosomeIndex
double bestFitnessValue
| 构造方法详细信息 |
|---|
public TestCostConstraintNominalDecisionSystemGA(TestCostNominalDecisionSystem paraDecisionSystem)
throws java.io.IOException,
java.lang.Exception
java.io.IOExceptionjava.lang.Exception| 方法详细信息 |
|---|
public void initializeForReduction(boolean paraWeighting,
int paraNumberOfChromosomes,
int paraNumberOfGeneration)
throws java.lang.Exception
paraWeighting - weighting or not, for lambda-weightingparaNumberOfChromosomes - number of chromosomes, only for GAparaNumberOfGeneration - number of generations, only for GAjava.lang.Exception - if the attribute or class is not nominal, or missing values
exists.public int getConstraint()
public boolean[] testCostConstraintReductionGA(double paraLambda,
int paraConstraint)
throws java.lang.Exception
paraLambda - Lambda is used to just the chromosome's test costparaConstraint - The test cost upper bound.java.lang.Exception
protected void initializePopulation(double paraLambda)
throws java.lang.Exception
java.lang.Exception
protected double generateRandomChromosome(boolean[] paraChromosome,
double paraLambda)
throws java.lang.Exception
paraChromosome - the given chromosome that will be changed in the method.paraLambda - the given lambda valuejava.lang.Exception
protected void selectionOperation(double paraLambda)
throws java.lang.Exception
paraLambda - The given lamda value.java.lang.Exception
protected double computeFitnessValue(boolean[] paraChromosome,
double paraLambda)
throws java.lang.Exception
paraChromosome - The given chromosome.paraLambda - The given lamda value.java.lang.Exception
protected void crossoverOperation()
throws java.lang.Exception
java.lang.Exception
protected int searchOneUnselectedChromosomes(int[] paraChromosomeIndices,
int paraNumberOfUnselectedChromosomes)
throws java.lang.Exception
paraChromosomeIndices - The index of chromosomes.paraNumberOfUnselectedChromosomes - The valid number of chromosomes.java.lang.Exception
protected void mutationOperation(double paraLambda)
throws java.lang.Exception
paraLambda - the lambda valuejava.lang.Exception
protected void chromosomeJustifyForConstraint(boolean[] paraChromosome)
throws java.lang.Exception
paraChromosome - The given chromosome.java.lang.Exception
public boolean constraintSatisfied(boolean[] paraSelectedTests)
throws java.lang.Exception
paraSelectedTests - Selected tests represented by a boolean array.java.lang.Exception - if it is thrown by computeTestCost().
|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | ||||||||