coser.datamodel.decisionsystem
类 BothCostsDecisionSystemNormalError

java.lang.Object
  继承者 Instances
      继承者 coser.datamodel.decisionsystem.RoughDecisionSystem
          继承者 coser.datamodel.decisionsystem.CostSensitiveDecisionSystem
              继承者 coser.datamodel.decisionsystem.NumericDecisionSystem
                  继承者 coser.datamodel.decisionsystem.DecisionSystemNeighborhood
                      继承者 coser.datamodel.decisionsystem.DecisionSystemNormalError
                          继承者 coser.datamodel.decisionsystem.BothCostsDecisionSystemNormalError

public class BothCostsDecisionSystemNormalError
extends DecisionSystemNormalError

Summary: Keep the balance between test cost and misclassification cost. Cost data are defined in class CostSenstiveDecisionSystem. For more information of the data model please refer to our papers:
\@INPROCEEDINGS{MinZhu11MinimalCost,
author = {Fan Min and William Zhu},
title = {Minimal cost attribute reduction through backtracking},
booktitle = {Proceedings of International Conference on Database Theory and Application},
series = {FGIT-DTA/BSBT, CCIS},
volume = {258},
year = {2011},
pages = {100--107}
}

Author: Fan Min, Hong Zhao 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: The optimal feature subset can be obtained now.
Written time: Feburary 23, 2012.
Last modify time: October. 20, 2012.


字段摘要
修饰符 和 类型 字段 和 描述
(专用软件包)  double currentReductAverageCost
           
(专用软件包)  double optimalAverageCost
          The optimal average cost.
 
从类 coser.datamodel.decisionsystem.DecisionSystemNormalError 继承的字段
errorRandomMode, individualErrorRandom, sigma
 
从类 coser.datamodel.decisionsystem.DecisionSystemNeighborhood 继承的字段
candidateReductsArray, neighborhoodSizeArray, numberOfCandidateReducts, seed
 
从类 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, numberOfCandidateSubreducts, numberOfConditions, numberOfInstances, optimalReduct, POSITIVE_REGION, runTimeInformation, startTime, totalEntropy, totalMajority, totalPositiveRegion
 
构造方法摘要
构造函数 和 描述
BothCostsDecisionSystemNormalError(BothCostsDecisionSystemNormalError paraDecisionSystem)
          Copy everything.
BothCostsDecisionSystemNormalError(java.io.Reader reader)
          Construct the decision system.
 
方法摘要
修饰符 和 类型 方法 和 描述
 double computeExceedingFactor(boolean[] paraTestSet)
          Get the exceeding factor.
 BothCostsDecisionSystemNormalError[] divideInTwo(double paraPercentage)
          Divide the decision system in two according to the given percentage.
 double getOptimalAverageCost()
          Get the total test cost of the current reduct.
 boolean[] getOptimalFeatureSubset()
          Get optimal feature subset.
 boolean[] inconsistencyBasedLambdaReduction(double paraLambda)
          Find a (possibly) minimal feature subset using the inconsistency based lambda weighted approach.
 void oneOptimalBacktrack(Instances[] paraImpureInstancesArray, boolean[] paraSelectedTests, int paraTestLowerBound, double paraExistingMisclassificationCost, double paraExistingTestCost, boolean paraFast)
          Compute one optimal feature subset using backtrack.
 void oneOptimalBacktrackAdaptiveBC(Instances[] paraImpureInstancesArray, boolean[] paraSelectedTests, int paraTestLowerBound, double paraExistingMisclassificationCost, double paraExistingTestCost, boolean paraFast)
          Compute one optimal feature subset using backtrack.
 double optimalCostReductBacktrack(boolean paraFast)
          Compute the optimal cost feature subset through backtracking.
 double optimalCostReductBacktrackAdaptiveBC(boolean paraFast)
          Compute the optimal cost feature subset based on adaptive both costs through backtracking.
 java.lang.String toString()
          Print the object message.
 
从类 coser.datamodel.decisionsystem.DecisionSystemNormalError 继承的方法
computeErrorSizeArray, creatNormalError, getAverageErrorRangeSizeArray, getAverageValueNormalErrorSize, getNormalErrorSizeArray, normalDistributionQuantile, setIndividualTestCostArray, setNormalErrorSize, setNormalErrorSizeArray, setNormalErrorSizeArray
 
从类 coser.datamodel.decisionsystem.DecisionSystemNeighborhood 继承的方法
addAttribute, averageMisclassificationCost, buildCandidatesBacktrack, computeAllReductsBacktrack, computeExceedingFactor, computeNeighborhood, computeOptimalReductTestCostBacktrack, computeOptimalTestCost, getNeighborhoodSizeArray, inconsistencyDecrease, isConsistent, isCurrentReductOptimal, oneOptimalBacktrack, removeSuperReducts, setMisclassificationCostMatrix, setNeighborhoodSizeArray, totalCost, totalCost
 
从类 coser.datamodel.decisionsystem.CostSensitiveDecisionSystem 继承的方法
averageMisclassificationCost, averageMisclassificationCost, bestClassValue, computeAdditiveCost, 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, sortByTestCost
 
从类 coser.datamodel.decisionsystem.RoughDecisionSystem 继承的方法
classEntropy, classEntropy, computeConsistency, computeConsistency, computeConsistency, computeCore, computeCore, conditionalEntropy, conditionalEntropy, conditionalEntropy, conditionalEntropy, copyForClone, delete, 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, majority, normalize, positiveRegion, 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
 

字段详细信息

optimalAverageCost

double optimalAverageCost
The optimal average cost.


currentReductAverageCost

double currentReductAverageCost
构造方法详细信息

BothCostsDecisionSystemNormalError

public BothCostsDecisionSystemNormalError(java.io.Reader reader)
                                   throws java.io.IOException,
                                          java.lang.Exception
Construct the decision system. Simply adopt everything of the super class.

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

BothCostsDecisionSystemNormalError

public BothCostsDecisionSystemNormalError(BothCostsDecisionSystemNormalError paraDecisionSystem)
                                   throws java.lang.Exception
Copy everything. Essentially clone.

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

divideInTwo

public BothCostsDecisionSystemNormalError[] divideInTwo(double paraPercentage)
                                                 throws java.lang.Exception
Divide the decision system in two according to the given percentage.

覆盖:
类 RoughDecisionSystem 中的 divideInTwo
参数:
paraPercentage - The percentage of instances in the first subset.
返回:
Two decision systems in an array.
抛出:
java.lang.Exception

getOptimalFeatureSubset

public boolean[] getOptimalFeatureSubset()
Get optimal feature subset.

返回:
optimal feature subset.

optimalCostReductBacktrack

public double optimalCostReductBacktrack(boolean paraFast)
                                  throws java.lang.Exception
Compute the optimal cost feature subset through backtracking.

参数:
paraFast - Whether or not use the fast version. This only influences the use of the third pruning technique.
返回:
The optimal (minimal) cost.
抛出:
java.lang.Exception - if the given string does not contain enough integers.

oneOptimalBacktrack

public void oneOptimalBacktrack(Instances[] paraImpureInstancesArray,
                                boolean[] paraSelectedTests,
                                int paraTestLowerBound,
                                double paraExistingMisclassificationCost,
                                double paraExistingTestCost,
                                boolean paraFast)
                         throws java.lang.Exception
Compute one optimal feature subset using backtrack. The only prune technique is to consider the test cost vs. the total cost of the currently best solution.

参数:
paraImpureInstancesArray - Inpure subtables.
paraSelectedTests - Already selected tests.
paraTestLowerBound - The lower bound of test index. We only need forward search.
paraExistingMisclassificationCost - The misclassification cost with the current test set.
paraExistingTestCost - The cost of already selected tests.
paraFast - Whether or not use the fast version. This only influences the use of the third pruning technique.
抛出:
java.lang.Exception

optimalCostReductBacktrackAdaptiveBC

public double optimalCostReductBacktrackAdaptiveBC(boolean paraFast)
                                            throws java.lang.Exception
Compute the optimal cost feature subset based on adaptive both costs through backtracking.

参数:
paraFast - Whether or not use the fast version. This only influences the use of the third pruning technique.
返回:
The optimal (minimal) cost.
抛出:
java.lang.Exception - if the given string does not contain enough integers.

oneOptimalBacktrackAdaptiveBC

public void oneOptimalBacktrackAdaptiveBC(Instances[] paraImpureInstancesArray,
                                          boolean[] paraSelectedTests,
                                          int paraTestLowerBound,
                                          double paraExistingMisclassificationCost,
                                          double paraExistingTestCost,
                                          boolean paraFast)
                                   throws java.lang.Exception
Compute one optimal feature subset using backtrack. The only prune technique is to consider the test cost vs. the total cost of the currently best solution. Both costs are computed according to error boundary.

参数:
paraImpureInstancesArray - Inpure subtables.
paraSelectedTests - Already selected tests.
paraTestLowerBound - The lower bound of test index. We only need forward search.
paraExistingMisclassificationCost - The misclassification cost with the current test set.
paraExistingTestCost - The cost of already selected tests.
paraFast - Whether or not use the fast version. This only influences the use of the third pruning technique.
抛出:
java.lang.Exception

inconsistencyBasedLambdaReduction

public boolean[] inconsistencyBasedLambdaReduction(double paraLambda)
                                            throws java.lang.Exception
Find a (possibly) minimal feature subset using the inconsistency based lambda weighted approach.

覆盖:
类 DecisionSystemNeighborhood 中的 inconsistencyBasedLambdaReduction
参数:
paraLambda - the lambda value.
返回:
the feature subset with the form of boolean vector.
抛出:
java.lang.Exception

getOptimalAverageCost

public double getOptimalAverageCost()
Get the total test cost of the current reduct.

返回:
the total test cost of the current reduct.

computeExceedingFactor

public double computeExceedingFactor(boolean[] paraTestSet)
                              throws java.lang.Exception
Get the exceeding factor.

返回:
the exceeding factor.
抛出:
exception - if the optimal feature subset is not obtained yet.
java.lang.Exception

toString

public java.lang.String toString()
Print the object message.

覆盖:
类 NumericDecisionSystem 中的 toString
返回:
object status.