|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | ||||||||
java.lang.ObjectInstances
coser.datamodel.decisionsystem.RoughDecisionSystem
coser.datamodel.decisionsystem.CostSensitiveDecisionSystem
coser.datamodel.decisionsystem.NumericDecisionSystem
coser.datamodel.decisionsystem.DecisionSystemNeighborhood
public class DecisionSystemNeighborhood extends NumericDecisionSystem
Summary: Decision system with neighborhood, or neighborhood based rough sets.
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 very beginning.
Written time: February 16, 2013.
Last modify time: February 16, 2012.
| 修饰符 和 类型 | 字段 和 描述 |
|---|---|
(专用软件包) long[] |
candidateReductsArray
Used to store temporarily computed super reducts |
protected double[] |
neighborhoodSizeArray
Individual neighborhood size array. |
(专用软件包) int |
numberOfCandidateReducts
Number of candidate reducts |
protected int |
seed
Random seed |
| 构造函数 和 描述 |
|---|
DecisionSystemNeighborhood(Instances dataset)
Construct the decision system. |
DecisionSystemNeighborhood(Instances dataset,
int capacity)
Construct the decision system. |
DecisionSystemNeighborhood(Instances source,
int first,
int toCopy)
Construct the decision system. |
DecisionSystemNeighborhood(java.io.Reader reader)
Construct the decision system. |
DecisionSystemNeighborhood(java.lang.String name,
FastVector attInfo,
int capacity)
Construct the decision system. |
| 修饰符 和 类型 | 方法 和 描述 |
|---|---|
protected void |
addAttribute(int[][] paraNeighbors,
int[] paraNumberOfInconsistentNeighbors,
int paraAttributeIndex)
Add an attribute and change neighborhoods. |
double |
averageMisclassificationCost(boolean[] paraTestSet)
Compute the average misclassification cost given a test set. |
void |
buildCandidatesBacktrack(int[][] paraNeighbors,
int[] paraNumberOfInconsistentNeighbors,
boolean[] paraSelectedTests,
int paraTestLowerBound)
Compute all candidate reducts using backtrack. |
void |
computeAllReductsBacktrack()
Compute all reducts through backtracking. |
double |
computeExceedingFactor()
Compute the exceeding factor. |
void |
computeNeighborhood(boolean[] paraTestSet,
int[][] paraNeighbors,
int[] paraNumberOfInconsistentNeighbors)
Is the decision system consistent with respect to given attributes? |
int |
computeOptimalReductTestCostBacktrack()
Compute the test cost of an optimal reduct using backtrack. |
int |
computeOptimalTestCost()
Compute the optimal test-cost. |
double[] |
getNeighborhoodSizeArray()
Get the neighborhood size array. |
boolean[] |
inconsistencyBasedLambdaReduction(double paraLambda)
Find a (possibly) minimal reduct using the inconsistency based lambda weighted approach. |
protected int |
inconsistencyDecrease(int[][] paraNeighbors,
int[] paraNumberOfInconsistentNeighbors,
int paraAttributeIndex)
Find a (possibly) minimal reduct using the inconsistency based approach. |
boolean |
isConsistent(boolean[] paraSelectedAttributes)
Is the decision system consistent with respect to given attributes? |
boolean |
isCurrentReductOptimal()
Is the current reduct optimal? |
void |
oneOptimalBacktrack(int[][] paraNeighbors,
int[] paraNumberOfInconsistentNeighbors,
boolean[] paraSelectedTests,
int paraTestLowerBound,
int paraExistingTestCost)
Compute one optimal reduct using backtrack. |
void |
removeSuperReducts()
Remove super-reducts. |
void |
setMisclassificationCostMatrix(int paraMisclassificationCost,
int paraRatio)
Set the different misclassification costs. |
void |
setNeighborhoodSizeArray(double[] paraNeighborhoodSizeArray)
Set the neighborhood size array. |
double |
totalCost(boolean[] paraTestSet)
Compute the total cost given a test set. |
double |
totalCost(long paraTestSet)
Compute the total cost given a test set. |
| 从类 coser.datamodel.decisionsystem.NumericDecisionSystem 继承的方法 |
|---|
toString |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 字段详细信息 |
|---|
protected double[] neighborhoodSizeArray
long[] candidateReductsArray
int numberOfCandidateReducts
protected int seed
| 构造方法详细信息 |
|---|
public DecisionSystemNeighborhood(java.io.Reader reader)
throws java.io.IOException,
java.lang.Exception
java.io.IOExceptionjava.lang.Exception
public DecisionSystemNeighborhood(Instances dataset)
throws java.lang.Exception
java.lang.Exception
public DecisionSystemNeighborhood(Instances dataset,
int capacity)
throws java.lang.Exception
java.lang.Exception
public DecisionSystemNeighborhood(Instances source,
int first,
int toCopy)
throws java.lang.Exception
java.lang.Exception
public DecisionSystemNeighborhood(java.lang.String name,
FastVector attInfo,
int capacity)
throws java.lang.Exception
java.lang.Exception| 方法详细信息 |
|---|
public void setNeighborhoodSizeArray(double[] paraNeighborhoodSizeArray)
paraNeighborhoodSizeArray - the neighborhood size array.public double[] getNeighborhoodSizeArray()
public void computeAllReductsBacktrack()
throws java.lang.Exception
java.lang.ExceptionbuildCandidatesBacktrack(int[][], int[], boolean[], int),
removeSuperReducts()
public void buildCandidatesBacktrack(int[][] paraNeighbors,
int[] paraNumberOfInconsistentNeighbors,
boolean[] paraSelectedTests,
int paraTestLowerBound)
throws java.lang.Exception
paraNeighbors - Neighbors of each object. The matrix is not full.paraNumberOfInconsistentNeighbors - Effective number of neighbors of each object. Consistent
objects should not be considered.paraSelectedTests - Already selected tests.paraTestLowerBound - The lower bound of test index. We only need forward search.java.lang.Exception
public void removeSuperReducts()
throws java.lang.Exception
java.lang.Exception
protected int inconsistencyDecrease(int[][] paraNeighbors,
int[] paraNumberOfInconsistentNeighbors,
int paraAttributeIndex)
throws java.lang.Exception
java.lang.Exception
protected void addAttribute(int[][] paraNeighbors,
int[] paraNumberOfInconsistentNeighbors,
int paraAttributeIndex)
throws java.lang.Exception
paraNeighbors - The matrix to indicate who is who's neighbor.paraNumberOfInconsistentNeighbors - How many inconsistent neighbors for respective object.paraAttributeIndex - The new attribute.java.lang.Exception
public boolean isConsistent(boolean[] paraSelectedAttributes)
throws java.lang.Exception
paraSelectedAttributes - Selected attributes.java.lang.Exception
public int computeOptimalTestCost()
throws java.lang.Exception
CostSensitiveDecisionSystem 中的 computeOptimalTestCostexception - unkonwn exception.java.lang.Exception
public boolean isCurrentReductOptimal()
throws java.lang.Exception
java.lang.Exception - if the reduct or the set of all reducts not computed yet.
public double computeExceedingFactor()
throws java.lang.Exception
CostSensitiveDecisionSystem 中的 computeExceedingFactorexception - if the optimal reduct is not obtained yet.java.lang.Exception
public void setMisclassificationCostMatrix(int paraMisclassificationCost,
int paraRatio)
paraMisclassificationCost - The unified misclassfication cost.
public int computeOptimalReductTestCostBacktrack()
throws java.lang.Exception
java.lang.Exception
public void oneOptimalBacktrack(int[][] paraNeighbors,
int[] paraNumberOfInconsistentNeighbors,
boolean[] paraSelectedTests,
int paraTestLowerBound,
int paraExistingTestCost)
throws java.lang.Exception
paraNeighbors - Neighbors of each object. The matrix is not full.paraNumberOfInconsistentNeighbors - Effective number of neighbors of each object. Consistent
objects should not be considered.paraSelectedTests - Already selected tests.paraTestLowerBound - The lower bound of test index. We only need forward search.paraExistingTestCost - The cost of already selected tests.java.lang.ExceptionbuildCandidatesBacktrack(int[][], int[],
boolean[], int)
public boolean[] inconsistencyBasedLambdaReduction(double paraLambda)
throws java.lang.Exception
paraLambda - the lambda value.java.lang.Exception
public double averageMisclassificationCost(boolean[] paraTestSet)
throws java.lang.Exception
CostSensitiveDecisionSystem 中的 averageMisclassificationCostparaTestSet - The given test set with the form of a boolean array.java.lang.Exception - if the given string does not contain enough boolean values.CostSensitiveDecisionSystem.averageMisclassificationCost(Instances[])
public void computeNeighborhood(boolean[] paraTestSet,
int[][] paraNeighbors,
int[] paraNumberOfInconsistentNeighbors)
throws java.lang.Exception
paraTestSet - Selected attributes.paraNeighbors - The matrix to indicate who is who's neighbor.paraNumberOfInconsistentNeighbors - How many inconsistent neighbors for respective object.java.lang.Exception
public double totalCost(long paraTestSet)
throws java.lang.Exception
paraTestSet - The given test set with the form of a long.java.lang.Exception - if the given string does not contain enough integers.
public double totalCost(boolean[] paraTestSet)
throws java.lang.Exception
paraTestSet - The given test set with the form of a boolean array.java.lang.Exception - if the given string does not contain enough integers.
|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | ||||||||