coser.datamodel.decisionsystem
类 TestCostNominalDecisionSystemGAWithES

java.lang.Object
  继承者 Instances
      继承者 coser.datamodel.decisionsystem.RoughDecisionSystem
          继承者 coser.datamodel.decisionsystem.CostSensitiveDecisionSystem
              继承者 coser.datamodel.decisionsystem.NominalDecisionSystem
                  继承者 coser.datamodel.decisionsystem.TestCostNominalDecisionSystem
                      继承者 coser.datamodel.decisionsystem.TestCostNominalDecisionSystemGA
                          继承者 coser.datamodel.decisionsystem.TestCostNominalDecisionSystemGAWithES

public class TestCostNominalDecisionSystemGAWithES
extends TestCostNominalDecisionSystemGA

Summary: Test cost sensitive decision system with modified genetic algorithms. The methods might be merged into TestCostDecisionSystem. They are written independently because those programs belong to different authors.
\@INPROCEEDINGS{PanMinZhu11Genetic,
author = {Jiabin Liu and Fan Min and William Zhu},
title = {A modified genetic algorithm to the minimal test cost reduct problem},
booktitle = {Proceedings of {IEEE} International Conference on Granular Computing},
year = {2012},
pages = {539--544}
}

Author: Jiabin Liu liujb418@163.com

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.
Project: The cost-sensitive rough sets project.

Progress: Test-cost-sensitive attribute reduction based on genetic algorithms implemented.
Written time: March 10, 2012.
Last modify time: March 30, 2012.


字段摘要
修饰符 和 类型 字段 和 描述
(专用软件包)  long bestChromosome
          The best fitness value of the chromosome.
(专用软件包)  double bestFitnessValue
          The best fitness value of the group of chromosomes.
(专用软件包)  boolean[][] chromosomes
          The population.
(专用软件包)  int d
          The Haimin distatnce threshold;
(专用软件包)  java.lang.String distributionString
          The name of distribution.
(专用软件包)  java.lang.String GAFilename
          The gred filename.
(专用软件包)  int generations
          The max generation.
(专用软件包)  int numberOfChromosomes
          The number of Chromosomes.
(专用软件包)  double r
          The diffusion rate;
 
从类 coser.datamodel.decisionsystem.TestCostNominalDecisionSystem 继承的字段
lambda, weighting
 
从类 coser.datamodel.decisionsystem.NominalDecisionSystem 继承的字段
ATTRIBUTES_COMBINATIONS, BACKTRACK, EXPONENTIAL, reductMinimalSize
 
从类 coser.datamodel.decisionsystem.CostSensitiveDecisionSystem 继承的字段
alpha, COMPLEX_COMMON_TEST_COST, COST_TYPE_MONEY, COST_TYPE_TESTING_TIME, COST_TYPE_WAITING_TIME, currentReductCost, currentReductTime, currentReductTotalTestCost, DEFAULT_AVERAGE_NUMBER_OF_TESTS_PER_GROUP, groupCommonTestCostArray, groupInclusionArray, groupInclusionMatrix, IMPOSSIBLE_COST, individualCostDistributions, individualCostLowerBounds, individualCostMatrix, individualCostRandom, individualCostUpperBounds, minimalTestCostReduct, minimalTimeReduct, misclassificationCostMatrix, misclassificationCostSumArray, NORMAL, optimalReductTestCost, optimalReductTime, PARETO, randomMode, SIMPLE_COMMON_TEST_COST, TEST_COST_INDEPENDENT, TEST_COST_TYPES, testCostConstraint, testCostRelationship, testingOrderMatrix, timeParts, totalTimeConstraint, unifiedMisclassificationCost, UNIFORM
 
从类 coser.datamodel.decisionsystem.RoughDecisionSystem 继承的字段
allConditions, allReducts, allReductsFilename, allSubreducts, allSubreductsFilename, arffFilename, backtrackSteps, candidateReductArray, candidateSubreductArray, candidateSubreductConsistencyArray, classSize, CONDITIONAL_ENTROPY, consistency, core, currentReduct, currentSelectedAttributes, endTime, MAJORITY, minimalReductSize, numberOfCandidateReducts, numberOfCandidateSubreducts, numberOfConditions, numberOfInstances, optimalReduct, POSITIVE_REGION, runTimeInformation, startTime, totalEntropy, totalMajority, totalPositiveRegion
 
构造方法摘要
构造函数 和 描述
TestCostNominalDecisionSystemGAWithES(TestCostNominalDecisionSystem paraDecisionSystem)
          Construct the decision system.
 
方法摘要
修饰符 和 类型 方法 和 描述
 double computeFitnessValueOfCHC(boolean[] paraChromosome, int paraMaxPositiveRegion, double paraLambda)
          Compute the fitness of the given chromosome
 boolean[][] crossoverOperationOfCHC(boolean[][] paraChromosomes, boolean[] fitChange)
          Uniform crossover.
 void geneticAlgorithmBasedTCSAttributeReductionOfCHC(double paraLambda)
          The first version of the genetic algorithm.
 java.lang.String getGAFilename()
          Get gred filename.
 boolean[] initializeChromosome(boolean[] paraAllAttributes)
          Initialize a chromosome.
 boolean[][] initializeChromosomes(boolean[] paraAllAttributes)
          Initialize a group of chromosomes.
 void initializePartOfChromosomesToTrue()
          If no chromosome is a solution, then initialize a part of chromosomes(one tenth) to all true.
 void initializePopulation()
          Initialize a population.
 boolean[][] mutationOperationOfCHC(boolean[][] paraChromosomes, boolean[] fitChange)
          Mutation operation.
 int searchPairsOfChromosomes(boolean[] paraCheckChromosome)
          Select a chromosomes for crossover.
 boolean[][] selectionOperationWheel(double[] fitness, boolean[] fitChange)
          Select new the group of chromosomes by wheel algorithm.
 void setGAFilename()
          Set the filename such that it can store results produced by GABasedTCSAttributeReduction.
 void setGeneration(int paraGenerations)
          Set the number of generation.
 void setNumberOfChromosomes(int paraNumberOfChromosome)
          Set the number of chromosome.
 
从类 coser.datamodel.decisionsystem.TestCostNominalDecisionSystemGA 继承的方法
bestInsteadOfWorst, computeFitnessValue_FirstVersion, computeFitnessValue_SecondVersion, computeFitnessValue, crossoverOperation, GABasedMinimalAttributeReduction, GABasedMinimalAttributeReduction, geneticAlgorithmBasedTCSAttributeReduction_FirstVersion, geneticAlgorithmBasedTCSAttributeReduction_SecondVersion, geneticAlgorithmBasedTCSAttributeReduction, getDistributionString, mutationOperation, removeRedundantReducts, selectionOperation_FirstVersion, selectionOperation_SecondVersion, selectionOperation, setDistributionString
 
从类 coser.datamodel.decisionsystem.TestCostNominalDecisionSystem 继承的方法
computeOptimalReductBacktrack, entropyBasedLambdaWeightedReduction, isCurrentReductOptimal, optimalReductBacktrack, removeRedundantAttributes, setLambda, setWeighting, sortByTestCost, toString
 
从类 coser.datamodel.decisionsystem.NominalDecisionSystem 继承的方法
buildCandidateReducts, computeAllReductsBacktrack, computeAllReductsBacktrack, computeAllReductsExhaustive, computeAllReductsExhaustive, computeAllReductsExhaustive, computeAllReductsExhaustiveExponential, computeAllSubreducts, computeConsistency, computeCore, conditionalEntropy, entropyBasedReduction, informationGain, informationGain, main, majority, majority, positiveRegion, positiveRegion, removeRedundantSubreducts, splitData, splitData, splitData
 
从类 coser.datamodel.decisionsystem.CostSensitiveDecisionSystem 继承的方法
averageMisclassificationCost, averageMisclassificationCost, averageMisclassificationCost, averageMisclassificationCost, bestClassValue, computeAdditiveCost, computeExceedingFactor, computeOptimalTestCost, computeReductTestCost, computeReductWaitingTime, computeTestCost, computeTestCost, copyForClone, generateIndividualCosts, generateOneCost, getClassificationCost, getDistributionString, getIndividualCost, getIndividualTestCost, getIndividualTestCostArray, getMisclassificationCostMatrix, getOptimalReductTestCost, getReductTotalTestCost, initializeForReduction, refreshTestCost, setAlpha, setComplexCommonTestCostArrays, setCostRandomMode, setIndividualCostArray, setIndividualCostBounds, setIndividualCostDistribution, setMisclassificationCostMatrix, setMisclassificationCostMatrix, setSimpleCommonTestCostArrays, setTestCostsRelationShip, setUnifiedMisclassificationCost
 
从类 coser.datamodel.decisionsystem.RoughDecisionSystem 继承的方法
classEntropy, classEntropy, computeConsistency, computeConsistency, computeCore, conditionalEntropy, conditionalEntropy, copyForClone, delete, divideInTwo, entropyReciprocal, entropyReciprocal, entropyReciprocal, entropyReciprocal, entropyReciprocal, getAllReductsFilename, getAllReductsString, getAllSubreductsFilename, getArffFilename, getArffSource, getBacktrackSteps, getCandidateSubreductConsistencyArray, getCurrentReduct, getCurrentReductIndex, getMeasure, getNumberOfConditions, getOptimalReduct, getReductionTime, getReductString, getRunTimeInformation, hasMissingValue, isNominal, isNormalized, isNumeric, majority, majority, normalize, positiveRegion, positiveRegion, printAllReducts, readAllReducts, readAllReducts, readAllSubreducts, readAllSubreducts, setAllReductsFilename, setAllReductsFilename, setAllSubreductsFilename, setAllSubreductsFilename, setArffFilename, setCurrentReduct, setCurrentReduct, setMeasure, writeAllReducts
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

numberOfChromosomes

int numberOfChromosomes
The number of Chromosomes.


generations

int generations
The max generation.


bestFitnessValue

double bestFitnessValue
The best fitness value of the group of chromosomes.


bestChromosome

long bestChromosome
The best fitness value of the chromosome.


chromosomes

boolean[][] chromosomes
The population.


d

int d
The Haimin distatnce threshold;


r

double r
The diffusion rate;


distributionString

java.lang.String distributionString
The name of distribution.


GAFilename

java.lang.String GAFilename
The gred filename.

构造方法详细信息

TestCostNominalDecisionSystemGAWithES

public TestCostNominalDecisionSystemGAWithES(TestCostNominalDecisionSystem paraDecisionSystem)
                                      throws java.io.IOException,
                                             java.lang.Exception
Construct the decision system. Simply adopt everything of the super class.

抛出:
java.io.IOException
java.lang.Exception
方法详细信息

setNumberOfChromosomes

public void setNumberOfChromosomes(int paraNumberOfChromosome)
Set the number of chromosome.

覆盖:
类 TestCostNominalDecisionSystemGA 中的 setNumberOfChromosomes
参数:
paraNumberOfChromosome - The number you need.

setGeneration

public void setGeneration(int paraGenerations)
Set the number of generation.

覆盖:
类 TestCostNominalDecisionSystemGA 中的 setGeneration
参数:
paraGenerations - The number you need.

setGAFilename

public void setGAFilename()
Set the filename such that it can store results produced by GABasedTCSAttributeReduction.

覆盖:
类 TestCostNominalDecisionSystemGA 中的 setGAFilename

getGAFilename

public java.lang.String getGAFilename()
Get gred filename.

覆盖:
类 TestCostNominalDecisionSystemGA 中的 getGAFilename

initializePopulation

public void initializePopulation()
                          throws java.lang.Exception
Initialize a population.

覆盖:
类 TestCostNominalDecisionSystemGA 中的 initializePopulation
抛出:
java.lang.Exception

initializeChromosome

public boolean[] initializeChromosome(boolean[] paraAllAttributes)
                               throws java.lang.Exception
Initialize a chromosome.

覆盖:
类 TestCostNominalDecisionSystemGA 中的 initializeChromosome
参数:
paraAllAttributes - All conditional attribubes.
返回:
tempChromosome A boolean array denoting a solution.
抛出:
java.lang.Exception

initializeChromosomes

public boolean[][] initializeChromosomes(boolean[] paraAllAttributes)
                                  throws java.lang.Exception
Initialize a group of chromosomes.

覆盖:
类 TestCostNominalDecisionSystemGA 中的 initializeChromosomes
参数:
paraAllAttributes - The given attributes are not core.
返回:
A group of chromosomes.
抛出:
java.lang.Exception

initializePartOfChromosomesToTrue

public void initializePartOfChromosomesToTrue()
                                       throws java.lang.Exception
If no chromosome is a solution, then initialize a part of chromosomes(one tenth) to all true.

覆盖:
类 TestCostNominalDecisionSystemGA 中的 initializePartOfChromosomesToTrue
抛出:
java.lang.Exception

geneticAlgorithmBasedTCSAttributeReductionOfCHC

public void geneticAlgorithmBasedTCSAttributeReductionOfCHC(double paraLambda)
                                                     throws java.lang.Exception
The first version of the genetic algorithm.

参数:
paraLambda - The given lambda value.
抛出:
java.lang.Exception

selectionOperationWheel

public boolean[][] selectionOperationWheel(double[] fitness,
                                           boolean[] fitChange)
                                    throws java.lang.Exception
Select new the group of chromosomes by wheel algorithm.

参数:
fitness - The fitness of the corresponding chromosomes.
fitChange - Judge the chromosome is or not changed.
返回:
A new group of chromosomes.
抛出:
java.lang.Exception

computeFitnessValueOfCHC

public double computeFitnessValueOfCHC(boolean[] paraChromosome,
                                       int paraMaxPositiveRegion,
                                       double paraLambda)
                                throws java.lang.Exception
Compute the fitness of the given chromosome

参数:
paraChromosome - The given chromosome.
paraMaxPositiveRegion - The candinality of the positive region of the decision.
paraLambda - The lambad value.
返回:
A fitness value of the chromosome.
抛出:
java.lang.Exception

crossoverOperationOfCHC

public boolean[][] crossoverOperationOfCHC(boolean[][] paraChromosomes,
                                           boolean[] fitChange)
                                    throws java.lang.Exception
Uniform crossover.

参数:
paraChromosomes - The given group of chromosomes.
fitChange - The alter of the corresponding chromosomes.
返回:
A new population after crossover operation.
抛出:
java.lang.Exception

searchPairsOfChromosomes

public int searchPairsOfChromosomes(boolean[] paraCheckChromosome)
                             throws java.lang.Exception
Select a chromosomes for crossover.

覆盖:
类 TestCostNominalDecisionSystemGA 中的 searchPairsOfChromosomes
参数:
paraCheckChromosome - The given checked of chromosomes.
返回:
The index of selected chromosome.
抛出:
java.lang.Exception

mutationOperationOfCHC

public boolean[][] mutationOperationOfCHC(boolean[][] paraChromosomes,
                                          boolean[] fitChange)
                                   throws java.lang.Exception
Mutation operation.

参数:
paraChromosomes - The given chromosomes.
fitChange - The alter of the corresponding chromosomes.
返回:
The chromosomes.
抛出:
java.lang.Exception