coser.datamodel.informationsystem
类 BooleanInformationSystem

java.lang.Object
  继承者 Instances
      继承者 coser.datamodel.informationsystem.RoughInformationSystem
          继承者 coser.datamodel.informationsystem.BooleanInformationSystem

public class BooleanInformationSystem
extends RoughInformationSystem

Summary: Information system with only boolean values.

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.
Written time: April 12, 2012.
Last modify time: April 12, 2012.


字段摘要
修饰符 和 类型 字段 和 描述
(专用软件包)  boolean[][] relation
          The relation represented by boolean matrix.
 
从类 coser.datamodel.informationsystem.RoughInformationSystem 继承的字段
allConditions, allReducts, allReductsFilename, allSubreducts, allSubreductsFilename, arffFilename, backtrackSteps, candidateReductArray, candidateSubreductArray, candidateSubreductEntropyArray, core, currentReduct, currentSelectedAttributes, endTime, minimalReductSize, numberOfAttributes, numberOfCandidateReducts, numberOfCandidateSubreducts, numberOfInstances, optimalReduct, runTimeInformation, startTime, STRANGE_VALUE
 
构造方法摘要
构造函数 和 描述
BooleanInformationSystem(BooleanInformationSystem paraDataset, boolean[] paraSelectedAttributes)
          Construct the decision system.
BooleanInformationSystem(Instances paraDataset)
          Construct the decision system.
BooleanInformationSystem(Instances paraDataset, int paraCapacity)
          Construct the decision system.
BooleanInformationSystem(Instances paraSource, int paraFirst, int paraToCopy)
          Construct the decision system.
BooleanInformationSystem(NominalInformationSystem paraFirstSet, NominalInformationSystem paraSecondSet, NominalInformationSystem paraThirdSet)
          Construct the decision system.
BooleanInformationSystem(java.io.Reader paraReader)
          Construct the decision system.
BooleanInformationSystem(java.lang.String paraName, FastVector paraAttInfo, int paraCapacity)
          Construct the decision system.
 
方法摘要
修饰符 和 类型 方法 和 描述
 double computeSourceConfidenceForPartialMatch(int[] paraSource, int[] paraTarget, double paraTargetConfidenceThreshold)
          Compute the source confidence for output.
 double computeTargetConfidenceForRightPartialMatch(int[] paraSource, int[] paraTarget)
          Compute the target confidence for right-hand side partial match.
 void extendRelation(int paraTimes)
          Extend the relation to cope with the extend of the entity.
 boolean[][] getRelationMatrix()
          Construct a boolean information system from a boolean matrix.
 boolean inRelation(int[] paraSource, int[] paraTarget)
          Check whether or not the given indices is in the current relation $R$.
 boolean inRelationWithSourceConfidence(int[] paraSource, int[] paraTarget, double paraSourceConfidenceThreshold)
          Check whether or not the degree of source confidence exceeds the given threshold.
 boolean inRelationWithTargetConfidence(int[] paraSource, int[] paraTarget, double paraTargetConfidenceThreshold)
          Check whether or not the degree of target confidence exceeds the given threshold.
 int[] lowerApproximation(int[] paraX)
          Lower approximation.
static void main(java.lang.String[] args)
          Test information entopy.
 int[] reverseLowerApproximation(int[] paraY)
          Reverse lower approximation.
 int[] reverseLowerApproximation(int[] paraY, double paraBeta)
          Reverse lower approximation.
 boolean sourceConfidenceSatisfiedForPartialMatch(int[] paraSource, int[] paraTarget, double paraSourceConfidenceThreshold, double paraTargetConfidenceThreshold)
          Check if the source confidence threshold is met.
 boolean targetConfidenceSatisfiedForPartialMatch(int[] paraSource, int[] paraTarget, double paraSourceConfidenceThreshold, double paraTargetConfidenceThreshold)
          Check the source confidence threshold is met.
 java.lang.String toString()
          For toString().
 
从类 coser.datamodel.informationsystem.RoughInformationSystem 继承的方法
computeCore, computeCore, delete, divideInTwo, generateBooleanArrays, getAllReductsFilename, getAllReductsString, getAllSubreductsFilename, getArffFilename, getArffSource, getBacktrackSteps, getCandidateSubreductEntropyArray, getCurrentReduct, getCurrentReductIndex, getNumberOfConditions, getOptimalReduct, getReductionTime, getReductString, getRunTimeInformation, hasMissingValue, initializeForReduction, isBoolean, isNominal, isNormalized, isNormalizedJudge, isNumeric, normalize, printAllReducts, readAllReducts, readAllReducts, readAllSubreducts, readAllSubreducts, removeSupersets, resetNumberOfAttributes, setAllReductsFilename, setAllReductsFilename, setAllSubreductsFilename, setAllSubreductsFilename, setArffFilename, setCurrentReduct, setCurrentReduct, writeAllReducts
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

relation

boolean[][] relation
The relation represented by boolean matrix.

构造方法详细信息

BooleanInformationSystem

public BooleanInformationSystem(java.io.Reader paraReader)
                         throws java.io.IOException,
                                java.lang.Exception
Construct the decision system. Simply adopt everything of the super class. This is the most often used constructor since it reads from a file.

参数:
paraReader - the given reader, often with the form of a file reader. We can generate a FileReader given an .arff filename.
抛出:
java.io.IOException
java.lang.Exception

BooleanInformationSystem

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

抛出:
java.lang.Exception

BooleanInformationSystem

public BooleanInformationSystem(Instances paraDataset,
                                int paraCapacity)
                         throws java.lang.Exception
Construct the decision system. Simply adopt everything of the super class. Rarely used.

抛出:
java.lang.Exception

BooleanInformationSystem

public BooleanInformationSystem(Instances paraSource,
                                int paraFirst,
                                int paraToCopy)
                         throws java.lang.Exception
Construct the decision system. Simply adopt everything of the super class.

抛出:
java.lang.Exception

BooleanInformationSystem

public BooleanInformationSystem(java.lang.String paraName,
                                FastVector paraAttInfo,
                                int paraCapacity)
                         throws java.lang.Exception
Construct the decision system. Simply adopt everything of the super class.

抛出:
java.lang.Exception

BooleanInformationSystem

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

抛出:
java.lang.Exception

BooleanInformationSystem

public BooleanInformationSystem(NominalInformationSystem paraFirstSet,
                                NominalInformationSystem paraSecondSet,
                                NominalInformationSystem paraThirdSet)
                         throws java.lang.Exception
Construct the decision system.

参数:
paraFirstSet - the first set, e.g., student
paraSecondSet - the second set, e.g., course
paraThirdSet - the relation, e.g., student-course
抛出:
java.lang.Exception
方法详细信息

getRelationMatrix

public boolean[][] getRelationMatrix()
Construct a boolean information system from a boolean matrix. No parameter is given, by default it is the variable "relation".


lowerApproximation

public int[] lowerApproximation(int[] paraX)
Lower approximation. Maybe this method could be optimized to provide better performance.

参数:
paraX - the source object set, a subset of the first set.
返回:
the lower approximation regarding the relation. It is not the subset of paraX if the relation is on two universes.

reverseLowerApproximation

public int[] reverseLowerApproximation(int[] paraY)
Reverse lower approximation.

参数:
paraY - the target object set, a subset of the second set.

reverseLowerApproximation

public int[] reverseLowerApproximation(int[] paraY,
                                       double paraBeta)
Reverse lower approximation.

参数:
paraY - the target object set, a subset of the second set.
paraBeta - the parameter beta for approximation.

inRelation

public boolean inRelation(int[] paraSource,
                          int[] paraTarget)
                   throws java.lang.Exception
Check whether or not the given indices is in the current relation $R$. The time complexity of this method is $O(|X||Y|)$.

参数:
paraSource - $X \subseteq U$.
paraTarget - $Y \subseteq V$.
返回:
true only if $X \times Y \subseteq U \times U$
抛出:
java.lang.Exception

inRelationWithSourceConfidence

public boolean inRelationWithSourceConfidence(int[] paraSource,
                                              int[] paraTarget,
                                              double paraSourceConfidenceThreshold)
                                       throws java.lang.Exception
Check whether or not the degree of source confidence exceeds the given threshold.

参数:
paraSource - $X \subseteq U$.
paraTarget - $Y \subseteq V$.
paraSourceConfidenceThreshold - the threshold of the source confidence, sconfidence
返回:
true if $\frac{|x \in X| R(x) \supseteq Y|}{|X|} >= sconfidence$
抛出:
java.lang.Exception

sourceConfidenceSatisfiedForPartialMatch

public boolean sourceConfidenceSatisfiedForPartialMatch(int[] paraSource,
                                                        int[] paraTarget,
                                                        double paraSourceConfidenceThreshold,
                                                        double paraTargetConfidenceThreshold)
                                                 throws java.lang.Exception
Check if the source confidence threshold is met. This method is for partial match where the source and target confidences are correlated.

参数:
paraSource - $X \subseteq U$.
paraTarget - $Y \subseteq V$.
paraSourceConfidenceThreshold - the threshold of the source confidence, sconfidence
paraTargetConfidenceThreshold - the threshold of the target confidence, tconfidence
返回:
true if $\frac{|\{x \in LH(GR) | \frac{|R(x) \cap RH(GR)|}{|RH(GR)|} \geq tc\}|}{|LH(GR)|} \geq sc$, where sc stands for paraSourceConfidenceThreshold, and tc stands for paraTargetConfidenceThreshold
抛出:
java.lang.Exception

computeSourceConfidenceForPartialMatch

public double computeSourceConfidenceForPartialMatch(int[] paraSource,
                                                     int[] paraTarget,
                                                     double paraTargetConfidenceThreshold)
                                              throws java.lang.Exception
Compute the source confidence for output. This method is for partial match where the source and target confidences are correlated. It compute the exact confidence. In contrast, sourceConfidenceSatisfiedForPartialMatch() only consider whether or not thresholds are met. Therefore it is more efficient than this method.

参数:
paraSource - $X \subseteq U$.
paraTarget - $Y \subseteq V$.
paraTargetConfidenceThreshold - the threshold of the target confidence, tconfidence
返回:
true if $\frac{|\{x \in LH(GR) | \frac{|R(x) \cap RH(GR)|}{|RH(GR)|} \geq tc\}|}{|LH(GR)|} \geq sc$, where sc stands for paraSourceConfidenceThreshold, and tc stands for paraTargetConfidenceThreshold
抛出:
java.lang.Exception
另请参见:
sourceConfidenceSatisfiedForPartialMatch(in[], int[], double, double)

inRelationWithTargetConfidence

public boolean inRelationWithTargetConfidence(int[] paraSource,
                                              int[] paraTarget,
                                              double paraTargetConfidenceThreshold)
                                       throws java.lang.Exception
Check whether or not the degree of target confidence exceeds the given threshold.

参数:
paraSource - $X \subseteq U$.
paraTarget - $Y \subseteq V$.
paraTargetConfidenceThreshold - the threshold of the target confidence, tconfidence
返回:
true if the target confidence exceeds \code{tconfidence}
抛出:
java.lang.Exception

computeTargetConfidenceForRightPartialMatch

public double computeTargetConfidenceForRightPartialMatch(int[] paraSource,
                                                          int[] paraTarget)
                                                   throws java.lang.Exception
Compute the target confidence for right-hand side partial match.

参数:
paraSource - $X \subseteq U$.
paraTarget - $Y \subseteq V$.
返回:
the minimal target confidence for any x in the first concep.
抛出:
java.lang.Exception

targetConfidenceSatisfiedForPartialMatch

public boolean targetConfidenceSatisfiedForPartialMatch(int[] paraSource,
                                                        int[] paraTarget,
                                                        double paraSourceConfidenceThreshold,
                                                        double paraTargetConfidenceThreshold)
                                                 throws java.lang.Exception
Check the source confidence threshold is met. This method is for partial match where the source and target confidences are correlated. Now it seems that this one is not employed.

参数:
paraSource - $X \subseteq U$.
paraTarget - $Y \subseteq V$.
paraSourceConfidenceThreshold - the threshold of the source confidence, sconfidence
paraTargetConfidenceThreshold - the threshold of the target confidence, tconfidence
返回:
true if $\frac{|x \in X| R(x) \supseteq Y|}{|X|} >= sconfidence$
抛出:
java.lang.Exception

extendRelation

public void extendRelation(int paraTimes)
Extend the relation to cope with the extend of the entity. This method is only used for synthesis data.

参数:
paraTimes - How many times does we need to extend. It should be greater than 1 since 1 stands not extension.

toString

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

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

main

public static void main(java.lang.String[] args)
Test information entopy.