coser.datamodel.decisionsystem
类 TestCostNominalDecisionSystem

java.lang.Object
  继承者 Instances
      继承者 coser.datamodel.decisionsystem.RoughDecisionSystem
          继承者 coser.datamodel.decisionsystem.CostSensitiveDecisionSystem
              继承者 coser.datamodel.decisionsystem.NominalDecisionSystem
                  继承者 coser.datamodel.decisionsystem.TestCostNominalDecisionSystem
直接已知子类:
PosConstraintNorminalDecisionSystem, SimpleCommonTestCostConstraintNominalDecisionSystem, TestCostConstraintNominalDecisionSystem, TestCostNominalDecisionSystemACO, TestCostNominalDecisionSystemFastRandom, TestCostNominalDecisionSystemGA

public class TestCostNominalDecisionSystem
extends NominalDecisionSystem

Summary: Define methods for test-cost-sensitive reduction. Data are already claimed in super-classes.

For minimal test-cost attribute reduction algorithms please refer to:
\@ARTICLE{MinHeQianZhu11Test,
author = {Fan Min and Huaping He and Yuhua Qian and William Zhu},
title = {Test-cost-sensitive attribute reduction},
journal = {Information Sciences},
year = {2011},
volume = {181},
issue = {22},
pages = {4928--4942}
}
This paper was the most read/downloaded one of Information Sciences during November-December, 2011

\@INPROCEEDINGS{HeMin11Accumulated,
author = {Huaping He and Fan Min},
title = {Accumulated cost based Test-cost-sensitive attribute reduction},
booktitle = {Proceedings of the 13th International Conference on Rough Sets, Fuzzy Sets, Data Mining and Granular Computing},
year = {2011},
volume = {6743},
series = {LNAI}
pages = {244--247},
}

\@INPROCEEDINGS{HeMinZhu11Attribute,
author = {Huaping He and Fan Min and William Zhu},
title = {Attribute reduction in test-cost-sensitive decision systems with common-test-costs},
booktitle = {Proceedings of the 3rd International Conference on Machine Learning and Computing, v1},
pages = {432--436},
year = {2011},
}

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: The lambda-weighted reduction algorithm \cite{MinHeQianZhu11Test} implemented. There is still needs to implement algorithms considering common-test-cost.
Written time: March 09, 2011.
Last modify time: March 14, 2011.


字段摘要
修饰符 和 类型 字段 和 描述
(专用软件包)  double lambda
          Labmda for weighted reduction.
(专用软件包)  boolean weighting
          Weighting or not.
 
从类 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
 
构造方法摘要
构造函数 和 描述
TestCostNominalDecisionSystem(Instances dataset)
          Construct the decision system.
TestCostNominalDecisionSystem(Instances dataset, int capacity)
          Construct the decision system.
TestCostNominalDecisionSystem(Instances source, int first, int toCopy)
          Construct the decision system.
TestCostNominalDecisionSystem(java.io.Reader reader)
          Construct the decision system.
TestCostNominalDecisionSystem(java.lang.String name, FastVector attInfo, int capacity)
          Construct the decision system.
TestCostNominalDecisionSystem(TestCostNominalDecisionSystem paraDataset, boolean[] paraSelectedAttributes)
          Construct the decision system.
 
方法摘要
修饰符 和 类型 方法 和 描述
 double computeOptimalReductBacktrack()
          Compute the optimal cost reduct through backtracking.
 boolean[] entropyBasedLambdaWeightedReduction(double paraLambda, boolean paraAccumulated)
          Find a (possibly) minimal test-cost reduct using the lambda-weighted reduction algorithm.
 boolean isCurrentReductOptimal()
          Is the current reduct optimal?
 void optimalReductBacktrack(Instances[] paraInstancesArray, long paraSelectedAttributes, int paraExistingTestCost, int paraAttributeLowerBound)
          Compute one optimal reduct using backtrack.
protected  int removeRedundantAttributes(int[] paraSequence)
          Remove redundant attributes from a super-reduct.
 void setLambda(double paraLambda)
          Set the lambda value for lambda-weighted reduction.
 void setWeighting(boolean paraWeighting)
          Set the weighting option for lambda-weighted reduction.
protected  void sortByTestCost(int[] paraSequence)
          Sort an index sequence according to the test-cost in a descending order.
 java.lang.String toString()
          For 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
 

字段详细信息

weighting

boolean weighting
Weighting or not.


lambda

double lambda
Labmda for weighted reduction.

构造方法详细信息

TestCostNominalDecisionSystem

public TestCostNominalDecisionSystem(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

TestCostNominalDecisionSystem

public TestCostNominalDecisionSystem(Instances dataset)
                              throws java.lang.Exception
Construct the decision system. Simply adopt everything of the super class.

抛出:
java.lang.Exception

TestCostNominalDecisionSystem

public TestCostNominalDecisionSystem(Instances dataset,
                                     int capacity)
                              throws java.lang.Exception
Construct the decision system. Simply adopt everything of the super class.

抛出:
java.lang.Exception

TestCostNominalDecisionSystem

public TestCostNominalDecisionSystem(Instances source,
                                     int first,
                                     int toCopy)
                              throws java.lang.Exception
Construct the decision system. Simply adopt everything of the super class.

抛出:
java.lang.Exception

TestCostNominalDecisionSystem

public TestCostNominalDecisionSystem(java.lang.String name,
                                     FastVector attInfo,
                                     int capacity)
                              throws java.lang.Exception
Construct the decision system. Simply adopt everything of the super class.

抛出:
java.lang.Exception

TestCostNominalDecisionSystem

public TestCostNominalDecisionSystem(TestCostNominalDecisionSystem paraDataset,
                                     boolean[] paraSelectedAttributes)
                              throws java.lang.Exception
Construct the decision system. Simply adopt everything of the super class.

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

sortByTestCost

protected void sortByTestCost(int[] paraSequence)
Sort an index sequence according to the test-cost in a descending order.

覆盖:
类 CostSensitiveDecisionSystem 中的 sortByTestCost
参数:
paraSequence - the given sequence. The sequence is changed in the method, and the return value is not needed.

removeRedundantAttributes

protected int removeRedundantAttributes(int[] paraSequence)
                                 throws java.lang.Exception
Remove redundant attributes from a super-reduct. Only invoked in entropyBasedLambdaWeightedReduction().

参数:
paraSequence - the given sequence of indices. Often decided by respective test-costs.
返回:
the number of redundant attributes.
抛出:
java.lang.Exception - if conditionalEntropy throws one.
另请参见:
entropyBasedLambdaWeightedReduction(double, boolean)

entropyBasedLambdaWeightedReduction

public boolean[] entropyBasedLambdaWeightedReduction(double paraLambda,
                                                     boolean paraAccumulated)
                                              throws java.lang.Exception
Find a (possibly) minimal test-cost reduct using the lambda-weighted reduction algorithm. This is the key algorithm of this class. Please refer to our paper for more detail: \cite{MinHeQianZhu11Test}

参数:
paraLambda - the lambda value.
paraAccumulated - use accumulated test-cost or test-cost of current attribute.
返回:
the reduct with the form of boolean vector. This reduct is also stored in the & object as currentReduct.
抛出:
java.lang.Exception

isCurrentReductOptimal

public boolean isCurrentReductOptimal()
                               throws java.lang.Exception
Is the current reduct optimal?

覆盖:
类 NominalDecisionSystem 中的 isCurrentReductOptimal
返回:
true if it is optimal.
抛出:
java.lang.Exception - if the reduct or the set of all reducts not computed yet.

setWeighting

public void setWeighting(boolean paraWeighting)
Set the weighting option for lambda-weighted reduction.


setLambda

public void setLambda(double paraLambda)
Set the lambda value for lambda-weighted reduction.


computeOptimalReductBacktrack

public double computeOptimalReductBacktrack()
                                     throws java.lang.Exception
Compute the optimal cost reduct through backtracking.

覆盖:
类 NominalDecisionSystem 中的 computeOptimalReductBacktrack
返回:
The optimal (minimal) cost.
抛出:
java.lang.Exception - if the given string does not contain enough integers.

optimalReductBacktrack

public void optimalReductBacktrack(Instances[] paraInstancesArray,
                                   long paraSelectedAttributes,
                                   int paraExistingTestCost,
                                   int paraAttributeLowerBound)
                            throws java.lang.Exception
Compute one optimal reduct using backtrack. The only prune technique is to consider the test cost vs. the total cost of the currently best solution.

覆盖:
类 NominalDecisionSystem 中的 optimalReductBacktrack
参数:
paraInstancesArray - Object subsets.
paraSelectedAttributes - Already selected attributes.
paraExistingTestCost - The cost of already selected tests.
paraAttributeLowerBound - The lower bound of test index. We only need forward search.
抛出:
java.lang.Exception

toString

public java.lang.String toString()
For toString(). See interface toString().

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