coser.datamodel.decisionsystem
类 TimeNominalDecisionSystem

java.lang.Object
  继承者 Instances
      继承者 coser.datamodel.decisionsystem.RoughDecisionSystem
          继承者 coser.datamodel.decisionsystem.CostSensitiveDecisionSystem
              继承者 coser.datamodel.decisionsystem.NominalDecisionSystem
                  继承者 coser.datamodel.decisionsystem.TimeNominalDecisionSystem
直接已知子类:
BcoTimeNominalDecisionSystem, LilyTimeNominalDecisionSystem, MultiObjectiveNominalDecisionSystem, TimeConstraintNominalDecisionSystem

public class TimeNominalDecisionSystem
extends NominalDecisionSystem

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

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 very beginning.
Written time: December 17, 2012.
Last modify time: December 25, 2012.


字段摘要
修饰符 和 类型 字段 和 描述
(专用软件包)  double lambda
          Lambda 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
 
构造方法摘要
构造函数 和 描述
TimeNominalDecisionSystem(Instances dataset)
          Construct the decision system.
TimeNominalDecisionSystem(Instances dataset, int capacity)
          Construct the decision system.
TimeNominalDecisionSystem(Instances source, int first, int toCopy)
          Construct the decision system.
TimeNominalDecisionSystem(java.io.Reader reader)
          Construct the decision system.
TimeNominalDecisionSystem(java.lang.String name, FastVector attInfo, int capacity)
          Construct the decision system.
TimeNominalDecisionSystem(TimeNominalDecisionSystem paraDataset, boolean[] paraSelectedAttributes)
          Construct the decision system.
 
方法摘要
修饰符 和 类型 方法 和 描述
 int computeFeatureSubsetTime(boolean[] paraFeatureSubset)
          Compute the time of a feature subset.
 int computeOptimalTimeCost()
          Compute the optimal time-cost.
 int featureSubsetCompare(boolean[] paraFirstSubset, boolean[] paraSecondSubset)
          Compare two feature subsets with respect to test cost (money) and testing time.
 boolean isCurrentReductOptimal()
          Is the current reduct optimal?
static void main(java.lang.String[] args)
          Only for testing.
 void readPartialOrderMatrix(java.lang.String paraFilename)
          Read the partial order matrix from a text file.
protected  void sortByWaitingTime(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, computeOptimalReductBacktrack, conditionalEntropy, entropyBasedReduction, informationGain, informationGain, majority, majority, optimalReductBacktrack, 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, sortByTestCost
 
从类 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
Lambda for weighted reduction.

构造方法详细信息

TimeNominalDecisionSystem

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

TimeNominalDecisionSystem

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

抛出:
java.lang.Exception

TimeNominalDecisionSystem

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

抛出:
java.lang.Exception

TimeNominalDecisionSystem

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

抛出:
java.lang.Exception

TimeNominalDecisionSystem

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

TimeNominalDecisionSystem

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

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

sortByWaitingTime

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

参数:
paraSequence - the given sequence. The sequence is changed in the method, and the return value is not needed.

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.

readPartialOrderMatrix

public void readPartialOrderMatrix(java.lang.String paraFilename)
                            throws java.io.IOException,
                                   java.lang.Exception
Read the partial order matrix from a text file. An example file is given below:
4
0,1,0,1
0,0,1,0
0,0,0,0
0,0,0,0
It indicates that the successor of node 0 are 1 and 3, and the successor of 1 is 2.

参数:
paraFilename - The filename of the partial order matrix.
抛出:
java.io.IOException - for file reading error.
java.lang.Exception - for file format error.

featureSubsetCompare

public int featureSubsetCompare(boolean[] paraFirstSubset,
                                boolean[] paraSecondSubset)
                         throws java.lang.Exception
Compare two feature subsets with respect to test cost (money) and testing time.

参数:
paraFirstSubset - the first subset
paraSecondSubset - the second subset
返回:
1 for the first one better than the second one. -1 for worse. 0 for equal or incomparable
抛出:
java.lang.Exception

computeFeatureSubsetTime

public int computeFeatureSubsetTime(boolean[] paraFeatureSubset)
                             throws java.lang.Exception
Compute the time of a feature subset. Both testing time and waiting time are considered.

参数:
paraFeatureSubset - the feature subset. The length should be equal to |C|.
返回:
the total time consumed
抛出:
java.lang.Exception

computeOptimalTimeCost

public int computeOptimalTimeCost()
                           throws java.lang.Exception
Compute the optimal time-cost. This is done through checking every reduct.

返回:
the optimal time-cost.
抛出:
exception - if the set of all reduct is not obtained yet.
java.lang.Exception

toString

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

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

main

public static void main(java.lang.String[] args)
Only for testing. Read the partial order file.