|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | ||||||||
java.lang.ObjectInstances
coser.datamodel.decisionsystem.RoughDecisionSystem
coser.datamodel.decisionsystem.CostSensitiveDecisionSystem
coser.datamodel.decisionsystem.NominalDecisionSystem
coser.datamodel.decisionsystem.TestCostNominalDecisionSystem
coser.datamodel.decisionsystem.SimpleCommonTestCostConstraintNominalDecisionSystem
public class SimpleCommonTestCostConstraintNominalDecisionSystem extends TestCostNominalDecisionSystem
Summary: For cost constraint attribute reduction in test-cost-sensitive
decision systems with simple common cost. For more information of the data
model please refer to our papers:
\@INPROCEEDINGS{PanMinZhu11Common,
author = {Guiying Pan and Fan Min and William Zhu},
title = {Test cost constraint reduction with common cost},
booktitle = {Proceedings of International Conference on Database Theory and
Application},
series = {FGIT, LNCS},
volume = {7105},
year = {2011},
pages = {55--63}
}
Author: Guiying Pan kentwingpan@163.com and Fan Min
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: Half done.
Written time: August 18, 2011. Separated from
TestCostNominalDecisionSystem.java
Last modify time: August 18, 2011.
| 修饰符 和 类型 | 字段 和 描述 |
|---|---|
static int |
ALL_EXHAUSTIVE
Both exhaustive algorithms. |
(专用软件包) long[] |
constraintSatisfiedTestSets
Test sets which satisfy the constraint. |
(专用软件包) boolean[] |
currentSubreduct
The current sub-reduct. |
(专用软件包) double |
currentSubreductEntropy
The entropy of the current sub-reduct. |
(专用软件包) int |
currentSubreductTestCost
The test-cost of the current sub-reduct. |
(专用软件包) long[] |
exhaustiveSubreductResultArray
An array to store running information of exhaustive algorithm for sub-reduct, which is the sanm to OSRT problem in TCI-DS. |
(专用软件包) int[] |
groupConstraintSatisfiedTestSetsCost
The cost of test sets which satisfy the constraint. |
(专用软件包) java.lang.String |
groupFilename
The simple common test cost file name. |
(专用软件包) long[] |
groupInclusionTestsArray
Group inclusion tests. |
(专用软件包) java.util.Random |
groupIndividualTestsRandom
Used to group individual tests. |
(专用软件包) int[] |
groupNumberOfTestsArray
Each group has the number of tests. |
protected boolean |
groupRandomMode
Group random mode. |
static int |
MAX_CANDIDATES_FOR_SCBASS
Maximal number of candidates for the AROP algorithm, which is exhaustive. |
static int |
MAX_CANDIDATES_FOR_SCSESRA
Maximal number of candidates for the SESRA algorithm, which is exhaustive. |
static int |
MAX_TESTS_FOR_SCBASS
Maximal number of tests for the AROP algorithm, which is exhaustive. |
static int |
MAX_TESTS_FOR_SCSESRA
Maximal number of tests for the SESRA algorithm, which is exhaustive. |
(专用软件包) int |
numberOfConstraintSatisfiedTestSets
The number of test sets which satisfy the constraint. |
(专用软件包) int |
numberOfGroups
The number of groups. |
static int |
OPR_RESULT_LENGTH
The array length of exhaustiveSubreductResultArray. |
(专用软件包) long[] |
optimalSubreductArray
The set of all optimal sub-reducts. |
(专用软件包) int |
optimalSubreductConsistency
The consistency of the optimal sub-reduct. |
(专用软件包) int |
optimalSubreductCost
The test cost of the sub-reduct. |
(专用软件包) double |
optimalSubreductEntropy
The entropy of the optimal sub-reduct. |
static int |
SCBASS
A backtrack algorithm to all sub-reducts. |
static int |
SCSESRA
The straighforward exhaustive sub-reduct algorithm |
static int |
SCSESRAstar
The straighforward exhaustive sub-reduct algorithm |
| 从类 coser.datamodel.decisionsystem.TestCostNominalDecisionSystem 继承的字段 |
|---|
lambda, weighting |
| 从类 coser.datamodel.decisionsystem.NominalDecisionSystem 继承的字段 |
|---|
ATTRIBUTES_COMBINATIONS, BACKTRACK, EXPONENTIAL, reductMinimalSize |
| 构造函数 和 描述 |
|---|
SimpleCommonTestCostConstraintNominalDecisionSystem(TestCostNominalDecisionSystem paraDecisionSystem)
Construct the decision system. |
| 修饰符 和 类型 | 方法 和 描述 |
|---|---|
void |
computeConstraintSatisfiedTestSetsBacktrack(boolean[] paraAvailableAttributes,
boolean[] paraContains,
int[] paraGroupNumberOfTestsArray,
int paraTestCost,
int paraConstraint,
int depth)
Compute all test sets satisfying the test cost constraint using the backtrack approach. |
int |
computeOptimalTestCost()
Compute the optimal test-cost. |
int |
computeTestCost(boolean[] paraTests)
Compute the test cost of the current tests. |
int |
computeTestCost(long paraTests)
Compute the test cost of the current tests. |
java.lang.String |
constraintReductionSCBASS(int paraConstraint)
Find an optimal subreduct using the SCBASS algorithm. |
java.lang.String |
constraintReductionSCSESRA(int paraConstraint)
Find an optimal sub-reduct using the SCSESRA algorithm. |
java.lang.String |
constraintReductionSCSESRA(int paraConstraint,
boolean[] paraAvailableAttributes)
Find an optimal sub-reduct using the SESRA star algorithm. |
java.lang.String |
constraintReductionSCSESRAstar(int paraConstraint)
Find an optimal sub-reduct using the SCSESRA algorithm. |
java.lang.String |
constraintReductionSCSESRAstar(int paraConstraint,
boolean[] paraAvailableAttributes)
Find an optimal sub-reduct using the SESRA star algorithm. |
boolean[] |
entropyBasedLambdaWeightedConstraintReduction(double paraLambda,
int paraConstraint)
Find a (possibly) minimal entropy sub-reduct using the lambda-weighted reduction algorithm. |
void |
generateCommonTestCost()
Generate common test cost in each group. |
long[] |
getExhaustiveSubreductResults()
Get sub-reduct results (exhaustive algorithms). |
java.lang.String |
getGroupFilename()
Get the simple common test cost file name. |
int |
getOptimalSubreductConsistency()
Get the optimal sub-reduct consistency. |
double |
getOptimalSubreductEntropy()
Get the entropy of the sub-reduct. |
int |
getOptimalSubreductMajority()
Get the majority of the optimal sub-reduct. |
double |
getSubreductEntropy()
Get the entropy of the sub-reduct. |
java.lang.String |
getSubreductString()
Get the current sub-reduct with the form of String. |
int |
getSubreductTotalTestCost()
Get the test-cost of the sub-reduct. |
void |
groupIndividualTests()
Group individual tests. |
void |
groupIndividualTests(boolean[] paraAvailableAttributes)
Group individual tests. |
void |
groupIndividualTestsFixed(boolean[] paraAvailableAttributes)
Group individual tests with given number of groups. |
void |
initialize()
Initialze for simple test cost attribute reduction. |
boolean[] |
initializeAvailableAttributes()
Initialize available attrites. |
void |
readGroups()
Read all groups from a text file with the following format: 1,3,6: 1 1,4,5,7: 1 That is, each line corresponds with a group, and a common test cost corresponds with the group. |
void |
refreshSimpleCommonTestCost()
Refresh the groups and corresponding simple common test cost. |
void |
removeLongTestSets(long[] paraSubreductArray,
int paraNumberOfTestSets)
Remove redundant test sets. |
protected long[] |
selectMaximalConsistencySubreducts(long[] paraSubreducts)
Select sub-reducts with the maximal consistency. |
long[] |
selectMinimalConditionalEntroypySubreducts(long[] paraSubreducts)
Select sub-reducts with the minimal conditional entropy. |
void |
selectOptimalSubreductSCSESRA()
Select the optimal sub reducts for SCSESRA. |
void |
setGroupFilename()
Set the simple common test cost file name. |
void |
setGroupRandMode()
Set group random mode name. |
void |
setNumberOfGroups(int paraNumberOfGroups)
Set the number of groups. |
void |
writeSimpleCommonTestCostFile()
Write a file to store the grouped results. |
| 从类 coser.datamodel.decisionsystem.TestCostNominalDecisionSystem 继承的方法 |
|---|
computeOptimalReductBacktrack, entropyBasedLambdaWeightedReduction, isCurrentReductOptimal, optimalReductBacktrack, removeRedundantAttributes, setLambda, setWeighting, sortByTestCost, toString |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 字段详细信息 |
|---|
public static final int MAX_TESTS_FOR_SCSESRA
public static final int MAX_TESTS_FOR_SCBASS
public static final int MAX_CANDIDATES_FOR_SCSESRA
public static final int MAX_CANDIDATES_FOR_SCBASS
public static final int SCSESRA
public static final int SCSESRAstar
public static final int SCBASS
public static final int ALL_EXHAUSTIVE
boolean[] currentSubreduct
double currentSubreductEntropy
int currentSubreductTestCost
double optimalSubreductEntropy
int optimalSubreductConsistency
int optimalSubreductCost
long[] optimalSubreductArray
public static int OPR_RESULT_LENGTH
int[] groupNumberOfTestsArray
long[] groupInclusionTestsArray
long[] constraintSatisfiedTestSets
int numberOfConstraintSatisfiedTestSets
int[] groupConstraintSatisfiedTestSetsCost
int numberOfGroups
java.lang.String groupFilename
protected boolean groupRandomMode
java.util.Random groupIndividualTestsRandom
long[] exhaustiveSubreductResultArray
| 构造方法详细信息 |
|---|
public SimpleCommonTestCostConstraintNominalDecisionSystem(TestCostNominalDecisionSystem paraDecisionSystem)
throws java.io.IOException,
java.lang.Exception
java.io.IOExceptionjava.lang.Exception| 方法详细信息 |
|---|
public void initialize()
public void setNumberOfGroups(int paraNumberOfGroups)
public void setGroupRandMode()
public int getOptimalSubreductMajority()
throws java.lang.Exception
java.lang.Exceptionpublic double getSubreductEntropy()
public double getOptimalSubreductEntropy()
public java.lang.String getSubreductString()
public int getSubreductTotalTestCost()
public int getOptimalSubreductConsistency()
public long[] getExhaustiveSubreductResults()
public boolean[] initializeAvailableAttributes()
public void groupIndividualTests()
throws java.lang.Exception
java.lang.Exception
public void groupIndividualTests(boolean[] paraAvailableAttributes)
throws java.lang.Exception
paraAvailableAttributes - The given test set.java.lang.Exception
public void groupIndividualTestsFixed(boolean[] paraAvailableAttributes)
throws java.lang.Exception
paraAvailableAttributes - The given test set.java.lang.Exception
public void generateCommonTestCost()
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getGroupFilename()
public void setGroupFilename()
public void refreshSimpleCommonTestCost()
throws java.lang.Exception
java.lang.Exception
public void writeSimpleCommonTestCostFile()
throws java.lang.Exception
java.lang.Exception
public void readGroups()
throws java.io.IOException,
java.lang.Exception
java.io.IOException - if an error occurr while reading the file.java.lang.Exception - if an attribute index exceeds the bound.
public int computeOptimalTestCost()
throws java.lang.Exception
CostSensitiveDecisionSystem 中的 computeOptimalTestCostjava.lang.Exception - if the set of all reduct is not obtained yet.public int computeTestCost(long paraTests)
CostSensitiveDecisionSystem 中的 computeTestCostparaTests - The given tests.CostSensitiveDecisionSystem.computeTestCost(boolean[])public int computeTestCost(boolean[] paraTests)
CostSensitiveDecisionSystem 中的 computeTestCostparaTests - The given tests.
public java.lang.String constraintReductionSCSESRA(int paraConstraint)
throws java.lang.Exception
paraConstraint - The test cost upper bound.java.lang.Exception
public java.lang.String constraintReductionSCSESRA(int paraConstraint,
boolean[] paraAvailableAttributes)
throws java.lang.Exception
paraConstraint - The test cost upper bound.paraAvailableAttributes - Which tests are available.java.lang.Exception
public void computeConstraintSatisfiedTestSetsBacktrack(boolean[] paraAvailableAttributes,
boolean[] paraContains,
int[] paraGroupNumberOfTestsArray,
int paraTestCost,
int paraConstraint,
int depth)
throws java.lang.Exception
paraAvailableAttributes - The given tests.paraContains - The current test vector.paraGroupNumberOfTestsArray - The array denotes each group has the number of elements in
current.paraTestCost - The current test cost.paraConstraint - The constraint.depth - The current depthjava.lang.Exception
public void selectOptimalSubreductSCSESRA()
throws java.lang.Exception
java.lang.Exception
public void removeLongTestSets(long[] paraSubreductArray,
int paraNumberOfTestSets)
throws java.lang.Exception
paraSubreductArray - The given test sets.paraNumberOfTestSets - The number of test sets.java.lang.Exception
public java.lang.String constraintReductionSCSESRAstar(int paraConstraint)
throws java.lang.Exception
paraConstraint - The test cost upper bound.java.lang.Exception
public java.lang.String constraintReductionSCSESRAstar(int paraConstraint,
boolean[] paraAvailableAttributes)
throws java.lang.Exception
paraConstraint - The test cost upper bound.paraAvailableAttributes - Which tests are available.java.lang.Exception
protected long[] selectMaximalConsistencySubreducts(long[] paraSubreducts)
throws java.lang.Exception
paraSubreducts - Test sets are representated by long.java.lang.Exception
public long[] selectMinimalConditionalEntroypySubreducts(long[] paraSubreducts)
throws java.lang.Exception
paraSubreducts - Test sets are representated by long.java.lang.Exception
public java.lang.String constraintReductionSCBASS(int paraConstraint)
throws java.lang.Exception
paraConstraint - the test cost upper bound.java.lang.Exception
public boolean[] entropyBasedLambdaWeightedConstraintReduction(double paraLambda,
int paraConstraint)
throws java.lang.Exception
paraLambda - the lambda value.paraConstraint - the test cost upper bound.java.lang.Exception
|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | ||||||||