coser.datamodel.decisionsystem
类 CostSensitiveDecisionSystem

java.lang.Object
  继承者 Instances
      继承者 coser.datamodel.decisionsystem.RoughDecisionSystem
          继承者 coser.datamodel.decisionsystem.CostSensitiveDecisionSystem
直接已知子类:
NominalDecisionSystem, NumericDecisionSystem

public class CostSensitiveDecisionSystem
extends RoughDecisionSystem

Summary: Decision system with various types of tests however without algorithm implementation. Many cost data are considered, including:
1) test cost along with constraint;
2) waiting cost along with constraint; and
3) misclassification cost.
Since attributes can be either numeric or nominal, no algorithm is implemented. Therefore the class is essentially abstract.

For more information of the data model please refer to our papers:
\@ARTICLE{MinLiu09AHierarchical,
author = {Fan Min and Qihe Liu},
title = {A hierarchical model for test-cost-sensitive decision systems},
journal = {Information Sciences},
year = {2009},
volume = {179},
pages = {2442--2452},
number = {14}
}

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: Almost done. Can be enhanced in the future.
Written time: February 14, 2012.
Last modify time: December 28, 2012.


字段摘要
修饰符 和 类型 字段 和 描述
protected  int alpha
          The value to control the shape of the distribution.
static int COMPLEX_COMMON_TEST_COST
          Complex common-test-cost model.
static int COST_TYPE_MONEY
          Test cost, or money.
static int COST_TYPE_TESTING_TIME
          Testing time.
static int COST_TYPE_WAITING_TIME
          Waiting time.
protected  double currentReductCost
          Total cost of current reduct.
protected  int currentReductTime
          Total time of current reduct.
protected  int currentReductTotalTestCost
          Total test-cost of current reduct.
static int DEFAULT_AVERAGE_NUMBER_OF_TESTS_PER_GROUP
          Default average number of tests per group.
protected  int[] groupCommonTestCostArray
          Group common-test-cost.
protected  int[] groupInclusionArray
          Group inclusion vector.
protected  int[][] groupInclusionMatrix
          Group inclusion matrix.
static int IMPOSSIBLE_COST
          Impossible cost, only used for initialization.
protected  int[] individualCostDistributions
          Individual cost distribution, currently 3 types.
protected  int[] individualCostLowerBounds
          Individual money, testing/waiting time lower bounds.
protected  int[][] individualCostMatrix
          Individual cost matrix, currently 3 types.
protected  java.util.Random individualCostRandom
          Used to generate individual costs.
protected  int[] individualCostUpperBounds
          Individual money, testing/waiting time upper bounds.
protected  boolean[] minimalTestCostReduct
          A minimal test-cost reduct.
protected  boolean[] minimalTimeReduct
          A minimal time reduct.
protected  int[][] misclassificationCostMatrix
          The misclassification cost matrix.
protected  int[] misclassificationCostSumArray
          The misclassification cost sum array.
static int NORMAL
          Normal distribution.
protected  int optimalReductTestCost
          Total test-cost of the optimal reduct.
protected  int optimalReductTime
          Total time of the optimal reduct.
static int PARETO
          Bounded Pareto distribution.
protected  boolean randomMode
          Random mode.
static int SIMPLE_COMMON_TEST_COST
          Simple common-test-cost model.
static int TEST_COST_INDEPENDENT
          Test-costs are independent from each other.
static int TEST_COST_TYPES
          Test cost types, currently there are test cost (money), testing time, and waiting time.
protected  int testCostConstraint
          The constraint of the total test cost.
protected  int testCostRelationship
          Relationship among test-costs, TEST_COST_INDEPENDENT, SIMPLE_COMMON_TEST_COST, or COMPLEX_COMMON_TEST_COST.
(专用软件包)  boolean[][] testingOrderMatrix
          Indicate whether or not one test is before another.
protected  int timeParts
          The number of parts for time.
protected  int totalTimeConstraint
          The constraint of the total time.
protected  int unifiedMisclassificationCost
          The unified misclassification cost.
static int UNIFORM
          Uniform distribution.
 
从类 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
 
构造方法摘要
构造函数 和 描述
CostSensitiveDecisionSystem(CostSensitiveDecisionSystem paraDataset, boolean[] paraSelectedAttributes)
          Construct the decision system.
CostSensitiveDecisionSystem(Instances dataset)
          Construct the decision system.
CostSensitiveDecisionSystem(Instances dataset, int capacity)
          Construct the decision system.
CostSensitiveDecisionSystem(Instances source, int first, int toCopy)
          Construct the decision system.
CostSensitiveDecisionSystem(java.io.Reader reader)
          Construct the decision system.
CostSensitiveDecisionSystem(java.lang.String name, FastVector attInfo, int capacity)
          Construct the decision system.
 
方法摘要
修饰符 和 类型 方法 和 描述
 double averageMisclassificationCost()
          Compute the average misclassification cost of this dataset.
 double averageMisclassificationCost(boolean[] paraTestSet)
          Compute the average misclassification cost given a test set, it is essentially an abstract class because subsets cannot be produced in this class.
 double averageMisclassificationCost(Instances[] paraInstancesArray)
          Compute the average misclassification cost given a subset family.
 double averageMisclassificationCost(long paraTestSet)
          Compute the average misclassification cost given a test set.
 int bestClassValue()
          Compute the best class index for this dataset while no attribute is selected.
 int computeAdditiveCost(int paraCostType, boolean[] paraSelectedTests)
          Compute additive cost.
 double computeExceedingFactor()
          Get the exceeding factor.
 int computeOptimalTestCost()
          Compute the optimal test-cost.
 int computeReductTestCost()
          Compute the total test-cost of the current reduct.
 int computeReductWaitingTime()
          Compute the total test-cost of the current reduct.
 int computeTestCost(boolean[] paraSelectedTests)
          Compute the cost of selected tests.
 int computeTestCost(long paraSelectedTests)
          Compute the cost of selected tests.
protected  void copyForClone(CostSensitiveDecisionSystem paraDecisionSystem)
          Copy from the given decision system.
 void generateIndividualCosts(int paraCostType)
          Generate individual cost subject to the current distribution.
protected  int generateOneCost(int paramCostType)
          Generate an integer within a pair of bounds subject to a distribution.
 int getClassificationCost(int paraReal, int paraClassified)
          Get an element of the misclassification cost matrix.
 java.lang.String getDistributionString(int paraCostType)
          Get the distribution name.
 int getIndividualCost(int paraCostType, int paraIndex)
          Get a test-cost.
 int getIndividualTestCost(int paraIndex)
          Get a test-cost.
 int[] getIndividualTestCostArray()
          Get the test-cost array.
 int[][] getMisclassificationCostMatrix()
          Get the misclassification cost matrix.
 int getOptimalReductTestCost()
          Get the optimal test-cost reducts.
 int getReductTotalTestCost()
          Get the total test cost of the current reduct.
 void initializeForReduction()
          Initialize for reduction.
 void refreshTestCost()
          Refresh the test-cost settings.
 void setAlpha(int paraAlpha)
          Set the alpha value.
 void setComplexCommonTestCostArrays(int[][] paraGroupInclusionMatrix, int[] paraGroupCommonTestCostArray)
          Set the group inclusion matrix and the group common test-cost array.
 void setCostRandomMode(boolean paraRandomMode)
          Set the random mode and reset the Random object.
 void setIndividualCostArray(int paraCostType, int[] paraIndividualCostArray)
          Set the test-cost array.
 void setIndividualCostBounds(int paraCostType, int paraLowerBound, int paraUpperBound)
          Set the cost bounds.
 void setIndividualCostDistribution(int paraCostType, int paraDistribution)
          Set the distribution.
 void setMisclassificationCostMatrix(int[][] paraMatrix)
          Set the misclassification cost matrix.
 void setMisclassificationCostMatrix(java.lang.String paraMatrixString)
          Set the misclassification cost matrix.
 void setSimpleCommonTestCostArrays(int[] paraGroupInclusionArray, int[] paraGroupCommonTestCostArray)
          Set the group inclusion array and the group common test-cost array.
 void setTestCostsRelationShip(int paraRelationship)
          Set the test-cost relationship.
 void setUnifiedMisclassificationCost(int paraMisclassificationCost)
          Set the unified misclassification cost.
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.RoughDecisionSystem 继承的方法
classEntropy, classEntropy, computeConsistency, computeConsistency, computeConsistency, computeCore, computeCore, conditionalEntropy, conditionalEntropy, 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, 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
 

字段详细信息

IMPOSSIBLE_COST

public static int IMPOSSIBLE_COST
Impossible cost, only used for initialization.


randomMode

protected boolean randomMode
Random mode. TRUE for "real" random, and FALSE for the same random sequence.


individualCostRandom

protected java.util.Random individualCostRandom
Used to generate individual costs.


TEST_COST_TYPES

public static final int TEST_COST_TYPES
Test cost types, currently there are test cost (money), testing time, and waiting time.

另请参见:
常量字段值

COST_TYPE_MONEY

public static final int COST_TYPE_MONEY
Test cost, or money.

另请参见:
常量字段值

COST_TYPE_TESTING_TIME

public static final int COST_TYPE_TESTING_TIME
Testing time.

另请参见:
常量字段值

COST_TYPE_WAITING_TIME

public static final int COST_TYPE_WAITING_TIME
Waiting time.

另请参见:
常量字段值

individualCostDistributions

protected int[] individualCostDistributions
Individual cost distribution, currently 3 types.


UNIFORM

public static final int UNIFORM
Uniform distribution. Used to generate test costs or errors.

另请参见:
常量字段值

NORMAL

public static final int NORMAL
Normal distribution. Used to generate test costs or errors.

另请参见:
常量字段值

PARETO

public static final int PARETO
Bounded Pareto distribution. Used to generate test costs or errors.

另请参见:
常量字段值

individualCostLowerBounds

protected int[] individualCostLowerBounds
Individual money, testing/waiting time lower bounds.


individualCostUpperBounds

protected int[] individualCostUpperBounds
Individual money, testing/waiting time upper bounds.


individualCostMatrix

protected int[][] individualCostMatrix
Individual cost matrix, currently 3 types.


alpha

protected int alpha
The value to control the shape of the distribution. In our work "Test-cost-sensitive attribute reduction", the value is 8 for the Normal distribution and 2 for the Bounded Pareto distribution.


testCostConstraint

protected int testCostConstraint
The constraint of the total test cost.


currentReductTotalTestCost

protected int currentReductTotalTestCost
Total test-cost of current reduct.


currentReductCost

protected double currentReductCost
Total cost of current reduct.


minimalTestCostReduct

protected boolean[] minimalTestCostReduct
A minimal test-cost reduct.


optimalReductTestCost

protected int optimalReductTestCost
Total test-cost of the optimal reduct.


TEST_COST_INDEPENDENT

public static final int TEST_COST_INDEPENDENT
Test-costs are independent from each other.

另请参见:
常量字段值

SIMPLE_COMMON_TEST_COST

public static final int SIMPLE_COMMON_TEST_COST
Simple common-test-cost model.

另请参见:
常量字段值

COMPLEX_COMMON_TEST_COST

public static final int COMPLEX_COMMON_TEST_COST
Complex common-test-cost model.

另请参见:
常量字段值

testCostRelationship

protected int testCostRelationship
Relationship among test-costs, TEST_COST_INDEPENDENT, SIMPLE_COMMON_TEST_COST, or COMPLEX_COMMON_TEST_COST.


groupInclusionArray

protected int[] groupInclusionArray
Group inclusion vector. Only valid for simple-common-test-cost model.


groupInclusionMatrix

protected int[][] groupInclusionMatrix
Group inclusion matrix. Only valid for complex-common-test-cost model.


groupCommonTestCostArray

protected int[] groupCommonTestCostArray
Group common-test-cost.


DEFAULT_AVERAGE_NUMBER_OF_TESTS_PER_GROUP

public static final int DEFAULT_AVERAGE_NUMBER_OF_TESTS_PER_GROUP
Default average number of tests per group. For simple and complex common-test-cost models.

另请参见:
常量字段值

timeParts

protected int timeParts
The number of parts for time.


testingOrderMatrix

boolean[][] testingOrderMatrix
Indicate whether or not one test is before another. It is applicable while the number of tests is not big.


totalTimeConstraint

protected int totalTimeConstraint
The constraint of the total time.


optimalReductTime

protected int optimalReductTime
Total time of the optimal reduct.


minimalTimeReduct

protected boolean[] minimalTimeReduct
A minimal time reduct.


currentReductTime

protected int currentReductTime
Total time of current reduct.


misclassificationCostMatrix

protected int[][] misclassificationCostMatrix
The misclassification cost matrix. We do not include "misclassification" in the name since no test cost matrix exists.


misclassificationCostSumArray

protected int[] misclassificationCostSumArray
The misclassification cost sum array.


unifiedMisclassificationCost

protected int unifiedMisclassificationCost
The unified misclassification cost. All elements in the matrix except the diagonal have this value.

构造方法详细信息

CostSensitiveDecisionSystem

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

CostSensitiveDecisionSystem

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

抛出:
java.lang.Exception

CostSensitiveDecisionSystem

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

抛出:
java.lang.Exception

CostSensitiveDecisionSystem

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

抛出:
java.lang.Exception

CostSensitiveDecisionSystem

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

CostSensitiveDecisionSystem

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

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

copyForClone

protected void copyForClone(CostSensitiveDecisionSystem paraDecisionSystem)
Copy from the given decision system. This method is often invoked in subclasses.

参数:
paraDecisionSystem - the decision system that copy from.

initializeForReduction

public void initializeForReduction()
                            throws java.lang.Exception
Initialize for reduction.

覆盖:
类 RoughDecisionSystem 中的 initializeForReduction
抛出:
java.lang.Exception - if the attribute or class is not nominal, or missing values exists.

getDistributionString

public java.lang.String getDistributionString(int paraCostType)
Get the distribution name. By default it is Pareto.

参数:
paraCostType - the cost type, money, testing time, or waiting time.
返回:
the distribution name for display.

getReductTotalTestCost

public int getReductTotalTestCost()
Get the total test cost of the current reduct.

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

getOptimalReductTestCost

public int getOptimalReductTestCost()
Get the optimal test-cost reducts.

返回:
the optimal test-cost reducts.

setIndividualCostArray

public void setIndividualCostArray(int paraCostType,
                                   int[] paraIndividualCostArray)
                            throws java.lang.Exception
Set the test-cost array. After the assignment, the decision system type is TEST-COST-INDEPENDENT.

参数:
paraCostType - the cost type, currently three types are supported.
paraIndividualCostArray - the test-cost array.
抛出:
java.lang.Exception

getIndividualCost

public int getIndividualCost(int paraCostType,
                             int paraIndex)
Get a test-cost.

参数:
paraIndex - the index of the attribute
返回:
the test-cost array.

getIndividualTestCost

public int getIndividualTestCost(int paraIndex)
Get a test-cost. Will be deprecated.

参数:
paraIndex - the index of the attribute
返回:
the test-cost array.

getIndividualTestCostArray

public int[] getIndividualTestCostArray()
Get the test-cost array. Will be deprecated.

返回:
the test-cost array.

setSimpleCommonTestCostArrays

public void setSimpleCommonTestCostArrays(int[] paraGroupInclusionArray,
                                          int[] paraGroupCommonTestCostArray)
                                   throws java.lang.Exception
Set the group inclusion array and the group common test-cost array. After the assignment, the decision system type is SIMPLE_COMMON_TEST_COST.

参数:
paraGroupInclusionArray - the group inclusion array.
抛出:
java.lang.Exception - if the sizes of arrays do not match.

setComplexCommonTestCostArrays

public void setComplexCommonTestCostArrays(int[][] paraGroupInclusionMatrix,
                                           int[] paraGroupCommonTestCostArray)
                                    throws java.lang.Exception
Set the group inclusion matrix and the group common test-cost array. After the assignment, the decision system type is COMPLEX_COMMON_TEST_COST.

参数:
paraGroupInclusionMatrix - the group inclusion matrix.
paraGroupCommonTestCostArray - the group common test-cost array.
抛出:
java.lang.Exception - if the sizes of arrays/matrices do not match.

setTestCostsRelationShip

public void setTestCostsRelationShip(int paraRelationship)
                              throws java.lang.Exception
Set the test-cost relationship.

参数:
paraRelationship - the given relationship.
抛出:
java.lang.Exception - if the relationship is not supported.

setCostRandomMode

public void setCostRandomMode(boolean paraRandomMode)
Set the random mode and reset the Random object.

参数:
paraRandomMode - the given random mode.

setIndividualCostDistribution

public void setIndividualCostDistribution(int paraCostType,
                                          int paraDistribution)
                                   throws java.lang.Exception
Set the distribution.

参数:
paraCostType - the cost type, currently three types are supported. These are testing time, waiting time and money.
paraDistribution - the given distribution.
抛出:
java.lang.Exception - if the distribution is not supported.

setIndividualCostBounds

public void setIndividualCostBounds(int paraCostType,
                                    int paraLowerBound,
                                    int paraUpperBound)
Set the cost bounds.

参数:
paraCostType - the cost type, currently three types are supported. These are testing time, waiting time and money.
paraLowerBound - the given lower bound.
paraUpperBound - the given upper bound.

generateIndividualCosts

public void generateIndividualCosts(int paraCostType)
                             throws java.lang.Exception
Generate individual cost subject to the current distribution. Time will be generated according to time parts.

抛出:
java.lang.Exception - directly if it is thrown by an invoked method.

generateOneCost

protected int generateOneCost(int paramCostType)
                       throws java.lang.Exception
Generate an integer within a pair of bounds subject to a distribution.

参数:
paramCostType - the test type, 0 for testing time, and 1 for waiting time, and 2 for test cost,
抛出:
java.lang.Exception

setAlpha

public void setAlpha(int paraAlpha)
Set the alpha value.


refreshTestCost

public void refreshTestCost()
                     throws java.lang.Exception
Refresh the test-cost settings.

抛出:
java.lang.Exception

sortByTestCost

protected void sortByTestCost(int[] paraSequence)
Sort an index sequence according to the test-cost in a descending order. Each element paraSequence indicates the index of the test. Currently it is not invoked. It might be useful while removing attributes in the process of reduction.

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

computeOptimalTestCost

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

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

computeTestCost

public int computeTestCost(boolean[] paraSelectedTests)
                    throws java.lang.Exception
Compute the cost of selected tests.

参数:
paraSelectedTests - which tests are selected, represented by a boolean array
返回:
the cost of selected tests.
抛出:
exception - if length of the given array does not match that of the decision system.
java.lang.Exception

computeAdditiveCost

public int computeAdditiveCost(int paraCostType,
                               boolean[] paraSelectedTests)
                        throws java.lang.Exception
Compute additive cost. No common cost is considered.

参数:
paraCostType - the cost type. It might be money, testing time, or waiting time.
paraSelectedTests - which tests are selected, represented by a boolean array
返回:
the cost sum of selected tests.
抛出:
exception - if length of the given array does not match that of the decision system.
java.lang.Exception

computeTestCost

public int computeTestCost(long paraSelectedTests)
                    throws java.lang.Exception
Compute the cost of selected tests.

参数:
paraSelectedTests - which tests are selected, represented by an integer.
返回:
the cost of selected tests.
抛出:
exception - if the optimal reduct is not obtained yet.
java.lang.Exception
另请参见:
computeTestCost(boolean[])

computeReductTestCost

public int computeReductTestCost()
                          throws java.lang.Exception
Compute the total test-cost of the current reduct.

返回:
the reduct total test-cost.
抛出:
exception - if the optimal reduct is not obtained yet.
java.lang.Exception

computeReductWaitingTime

public int computeReductWaitingTime()
                             throws java.lang.Exception
Compute the total test-cost of the current reduct.

返回:
the reduct total test-cost.
抛出:
exception - if the optimal reduct is not obtained yet.
java.lang.Exception

computeExceedingFactor

public double computeExceedingFactor()
                              throws java.lang.Exception
Get the exceeding factor.

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

setMisclassificationCostMatrix

public void setMisclassificationCostMatrix(int[][] paraMatrix)
                                    throws java.lang.Exception
Set the misclassification cost matrix.

参数:
paraMatrix - the given matrix, which will be assigned directly.
抛出:
java.lang.Exception - if the sizes of the given matrix do not meet our requirement.

setMisclassificationCostMatrix

public void setMisclassificationCostMatrix(java.lang.String paraMatrixString)
                                    throws java.lang.Exception
Set the misclassification cost matrix.

参数:
paraMatrixString - the given matrix with the form of a string.
抛出:
java.lang.Exception - if the given string does not contain enough integers.

getClassificationCost

public int getClassificationCost(int paraReal,
                                 int paraClassified)
Get an element of the misclassification cost matrix.

参数:
paraReal - real class.
paraClassified - classified class.
返回:
An element of the misclassification cost matrix.

getMisclassificationCostMatrix

public int[][] getMisclassificationCostMatrix()
Get the misclassification cost matrix.

返回:
The misclassification cost matrix.

setUnifiedMisclassificationCost

public void setUnifiedMisclassificationCost(int paraMisclassificationCost)
Set the unified misclassification cost. The matrix is also set.

参数:
paraMisclassificationCost - The unified misclassfication cost.

averageMisclassificationCost

public double averageMisclassificationCost(long paraTestSet)
                                    throws java.lang.Exception
Compute the average misclassification cost given a test set.

参数:
paraTestSet - The given test set with the form of a long.
抛出:
java.lang.Exception - if the given string does not contain enough integers.

averageMisclassificationCost

public double averageMisclassificationCost()
                                    throws java.lang.Exception
Compute the average misclassification cost of this dataset.

抛出:
java.lang.Exception - if the given string does not contain enough integers.

averageMisclassificationCost

public double averageMisclassificationCost(boolean[] paraTestSet)
                                    throws java.lang.Exception
Compute the average misclassification cost given a test set, it is essentially an abstract class because subsets cannot be produced in this class. The cost should be zero while not misclassified.

参数:
paraTestSet - The given test set with the form of a boolean array.
抛出:
java.lang.Exception - if the given string does not contain enough boolean values.

averageMisclassificationCost

public double averageMisclassificationCost(Instances[] paraInstancesArray)
                                    throws java.lang.Exception
Compute the average misclassification cost given a subset family. The cost should be zero while not misclassified. It is averaged by the number of instances of this object, not of the given subsets.

参数:
paraInstancesArray - The given objects subsets.
抛出:
java.lang.Exception

bestClassValue

public int bestClassValue()
Compute the best class index for this dataset while no attribute is selected.

返回:
the class label index.

toString

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

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