coser.datamodel.decisionsystem
类 TestCostNominalDecisionSystemACO

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

public class TestCostNominalDecisionSystemACO
extends TestCostNominalDecisionSystem

Project: The cost-sensitive rough sets project.

Summary: The Test Cost Sensitive Decision System with Ant Colony Optimization Author: Zilong Xu E-main: xzl-wy163@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.

Progress: Test-cost-sensitive attribute reduction based on Ant Colony Optimization implemented.
Written time: February, 2012
Last modify time: December 26, 2012


字段摘要
修饰符 和 类型 字段 和 描述
 double alpha
          The exponent of pheromone.
 Ant[] ants
          The Ant Colony
 int antsCounts
          The ants quantity.
 double beta
          The exponent of test cost.
 int currentAntNo
          The number of each ant.
 TestCostNominalDecisionSystem currnetDecisionSystem
          The current TestCostConstraintDecisionSystem
 double exceedingFactor
          The exceeding factor
 int minTestCost
          The minimal total test cost obtained by this algorithm
(专用软件包)  boolean[] minTestCostReduct
          The array of minimal test cost reduction.
 int optimalTestCost
          The optimal test cost
 double[][] pheromoneMatrix
          The matrix of pheromone.
(专用软件包)  int posAllConditions
          The number of positive region.
(专用软件包)  java.util.Random ran
          Random numbers generator
(专用软件包)  long reductionEndTime
          The end time of reduction
(专用软件包)  long reductionStartTime
          The starting time of reduction
(专用软件包) static int stepsOfACO
          The total steps of ants.
 boolean workState
          The work state of ant colony
 
从类 coser.datamodel.decisionsystem.TestCostNominalDecisionSystem 继承的字段
lambda, weighting
 
从类 coser.datamodel.decisionsystem.NominalDecisionSystem 继承的字段
ATTRIBUTES_COMBINATIONS, BACKTRACK, EXPONENTIAL, reductMinimalSize
 
从类 coser.datamodel.decisionsystem.CostSensitiveDecisionSystem 继承的字段
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
 
构造方法摘要
构造函数 和 描述
TestCostNominalDecisionSystemACO(TestCostNominalDecisionSystem paraDecisionSystem)
          The Construct Method 1
TestCostNominalDecisionSystemACO(TestCostNominalDecisionSystem paraDecisionSystem, int paraAntsCounts, double paraAlpha, double paraBeta)
          The Construct Method 2
 
方法摘要
修饰符 和 类型 方法 和 描述
 double exceedingFactor()
          Compute and print the exceeding factor.
 java.lang.String getResult()
          Get the results string
 void initialize()
          Initialize
 void minimalTestCost()
          Select the subset with minimal test cost among subsets obtained by last k ants as the final result to output.
 void minimalTestCostReductACO()
          The Ant Colony Optimization to minimal test cost reduction problem.
 boolean optimalTestCost()
          Return if the minimal test cost.
 void pheromoneRefresh(Ant paraAnt)
          Refresh pheromone of each edge.
 void setAlphaValue(double paraAlpha)
          Set the parameter alpha.
 void setAntCounts(int paraAntCounts)
          Set the number of ant
 void setBetaValue(double paraBeta)
          Set the parameter beta.
 
从类 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
 

字段详细信息

currnetDecisionSystem

public TestCostNominalDecisionSystem currnetDecisionSystem
The current TestCostConstraintDecisionSystem


ants

public Ant[] ants
The Ant Colony


antsCounts

public int antsCounts
The ants quantity.


currentAntNo

public int currentAntNo
The number of each ant.


pheromoneMatrix

public double[][] pheromoneMatrix
The matrix of pheromone.


alpha

public double alpha
The exponent of pheromone.


beta

public double beta
The exponent of test cost.


minTestCost

public int minTestCost
The minimal total test cost obtained by this algorithm


workState

public boolean workState
The work state of ant colony


posAllConditions

int posAllConditions
The number of positive region.


ran

java.util.Random ran
Random numbers generator


optimalTestCost

public int optimalTestCost
The optimal test cost


exceedingFactor

public double exceedingFactor
The exceeding factor


stepsOfACO

static int stepsOfACO
The total steps of ants.


minTestCostReduct

boolean[] minTestCostReduct
The array of minimal test cost reduction.


reductionStartTime

long reductionStartTime
The starting time of reduction


reductionEndTime

long reductionEndTime
The end time of reduction

构造方法详细信息

TestCostNominalDecisionSystemACO

public TestCostNominalDecisionSystemACO(TestCostNominalDecisionSystem paraDecisionSystem)
                                 throws java.io.IOException,
                                        java.lang.Exception
The Construct Method 1

抛出:
java.io.IOException
java.lang.Exception

TestCostNominalDecisionSystemACO

public TestCostNominalDecisionSystemACO(TestCostNominalDecisionSystem paraDecisionSystem,
                                        int paraAntsCounts,
                                        double paraAlpha,
                                        double paraBeta)
                                 throws java.io.IOException,
                                        java.lang.Exception
The Construct Method 2

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

initialize

public void initialize()
Initialize


minimalTestCostReductACO

public void minimalTestCostReductACO()
The Ant Colony Optimization to minimal test cost reduction problem.


pheromoneRefresh

public void pheromoneRefresh(Ant paraAnt)
Refresh pheromone of each edge.


minimalTestCost

public void minimalTestCost()
Select the subset with minimal test cost among subsets obtained by last k ants as the final result to output.
从最后若干蚂蚁选择的属性集合中选出最小测试代价约简


optimalTestCost

public boolean optimalTestCost()
Return if the minimal test cost.

返回:
whether or not the obtained test cost is optimal.

exceedingFactor

public double exceedingFactor()
Compute and print the exceeding factor.


setAlphaValue

public void setAlphaValue(double paraAlpha)
Set the parameter alpha.

参数:
paraAlpha - The exponent of the pheromone in the heuristic function.

setBetaValue

public void setBetaValue(double paraBeta)
Set the parameter beta.

参数:
paraBeta - The expoent of the test cost in heuristic function.

setAntCounts

public void setAntCounts(int paraAntCounts)
Set the number of ant

参数:
paraAntCounts - The number of ants in the ant colony.

getResult

public java.lang.String getResult()
Get the results string

返回:
The results string