coser.datamodel.mmer
类 ManyToManyEntityRelationSystem

java.lang.Object
  继承者 coser.datamodel.mmer.ManyToManyEntityRelationSystem

public class ManyToManyEntityRelationSystem
extends java.lang.Object

Summary: Many-to-many entity relation system.

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: The very beginning.
Written time: April 12, 2011.
Last modify time: February 15, 2012.


字段摘要
修饰符 和 类型 字段 和 描述
static int BACKWARD
          The backward algorithm.
static int COMPLETE_MATCH
          Complete match.
static int FORWARD
          The forward algorithm.
static int LEFT_PARTIAL_MATCH
          Left-hand side partial match.
(专用软件包)  int nonZeroCounter
           
static int PARTIAL_MATCH
          partial match.
static int RIGHT_PARTIAL_MATCH
          Right-hand side partial match.
(专用软件包)  int ruleGenerationAlgorithm
          The rule generation algorithm, sandwich, forward, and backward.
static int SANDWICH
          The sandwich algorithm.
 
构造方法摘要
构造函数 和 描述
ManyToManyEntityRelationSystem(Instances paraFirstSet, Instances paraSecondSet, Instances paraRelationSet)
          Construct the decision system.
ManyToManyEntityRelationSystem(java.io.Reader paraFirstSetReader, java.io.Reader paraSecondSetReader, java.io.Reader paraRelationSetReader)
          Construct the MMER.
ManyToManyEntityRelationSystem(java.lang.String paraFirstFilename, java.lang.String paraSecondFilename, java.lang.String paraRelationFilename)
          Construct the MMER.
ManyToManyEntityRelationSystem(java.lang.String paraFirstFilename, java.lang.String paraSecondFilename, java.lang.String paraRelationFilename, boolean paraHaveID)
          Construct the MMER.
 
方法摘要
修饰符 和 类型 方法 和 描述
 java.lang.String computeFirstSetFrequentConcepts(double paraSupportThreshold, int paraBaseAlgorithm, boolean paraScaled)
          Frequent concepts for the first set.
 java.lang.String computeSecondSetFrequentConcepts(double paraSupportThreshold, int paraBaseAlgorithm, boolean paraScaled)
          Frequent concepts for the second set.
 void extendRelation(int paraTimes)
          Extend the first set and the relation set.
 java.lang.String generateCompleteMatchRules(double paraSourceCoverageThreshold, double paraTargetCoverageThreshold, int paraOverallAlgorithm, int paraBaseAlgorithm)
          Generate complete match rules using the sandwich algorithm.
 java.lang.String generateCompleteMatchRulesBackward(double paraSourceCoverageThreshold, double paraTargetCoverageThreshold, int paraBaseAlgorithm)
          Compute complete match rules using the backward algorithm.
 java.lang.String generateCompleteMatchRulesForward(double paraSourceCoverageThreshold, double paraTargetCoverageThreshold, int paraBaseAlgorithm)
          Generate complete match rules using the forward algorithm.
 java.lang.String generateCompleteMatchRulesSandwich(double paraSourceCoverageThreshold, double paraTargetCoverageThreshold, int paraBaseAlgorithm)
          Generate complete match rules using the sandwich algorithm.
 java.lang.String generateLeftPartialMatchRules(double paraSourceCoverageThreshold, double paraTargetCoverageThreshold, double paraSourceConfidenceThreshold, int paraOverallAlgorithm, int paraBaseAlgorithm)
          Generate left-hand side partial match rules.
 java.lang.String generateLeftPartialMatchRulesSandwich(double paraSourceCoverageThreshold, double paraTargetCoverageThreshold, double paraSourceConfidenceThreshold, int paraBaseAlgorithm)
          Generate left-hand side partial match rules using the sandwich algorithm.
 java.lang.String generatePartialMatchRules(double paraSourceCoverageThreshold, double paraTargetCoverageThreshold, double paraSourceConfidenceThreshold, double paraTargetConfidenceThreshold, int paraOverallAlgorithm, int paraBaseAlgorithm)
          Generate partial match rules.
 java.lang.String generatePartialMatchRulesBackward(double paraSourceCoverageThreshold, double paraTargetCoverageThreshold, double paraSourceConfidenceThreshold, double paraTargetConfidenceThreshold, int paraBaseAlgorithm)
          Generate partial match rules using the backward algorithm.
 java.lang.String generatePartialMatchRulesSandwich(double paraSourceCoverageThreshold, double paraTargetCoverageThreshold, double paraSourceConfidenceThreshold, double paraTargetConfidenceThreshold, int paraBaseAlgorithm)
          Generate partial match rules using the sandwich algorithm.
 java.lang.String generateRightPartialMatchRules(double paraSourceCoverageThreshold, double paraTargetCoverageThreshold, double paraTargetConfidenceThreshold, int paraOverallAlgorithm, int paraBaseAlgorithm)
          Generate right-hand side partial match rules.
 java.lang.String generateRightPartialMatchRulesSandwich(double paraSourceCoverageThreshold, double paraTargetCoverageThreshold, double paraTargetConfidenceThreshold, int paraBaseAlgorithm)
          Generate right-hand side partial match rules using the sandwich algorithm.
 java.lang.String generateRules(double paraSourceCoverageThreshold, double paraTargetCoverageThreshold, double paraSourceConfidenceThreshold, double paraTargetConfidenceThreshold, int paraOverallAlgorithm, int paraBaseAlgorithm, boolean paraScaled)
          Generate granular associate rules.
 java.lang.String toString()
          For toString().
 java.lang.String toSummaryString()
          Summarize it.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

COMPLETE_MATCH

public static final int COMPLETE_MATCH
Complete match.

另请参见:
常量字段值

LEFT_PARTIAL_MATCH

public static final int LEFT_PARTIAL_MATCH
Left-hand side partial match.

另请参见:
常量字段值

RIGHT_PARTIAL_MATCH

public static final int RIGHT_PARTIAL_MATCH
Right-hand side partial match.

另请参见:
常量字段值

PARTIAL_MATCH

public static final int PARTIAL_MATCH
partial match.

另请参见:
常量字段值

ruleGenerationAlgorithm

int ruleGenerationAlgorithm
The rule generation algorithm, sandwich, forward, and backward.


SANDWICH

public static final int SANDWICH
The sandwich algorithm.

另请参见:
常量字段值

FORWARD

public static final int FORWARD
The forward algorithm.

另请参见:
常量字段值

BACKWARD

public static final int BACKWARD
The backward algorithm.

另请参见:
常量字段值

nonZeroCounter

int nonZeroCounter
构造方法详细信息

ManyToManyEntityRelationSystem

public ManyToManyEntityRelationSystem(java.lang.String paraFirstFilename,
                                      java.lang.String paraSecondFilename,
                                      java.lang.String paraRelationFilename,
                                      boolean paraHaveID)
                               throws java.io.IOException,
                                      java.lang.Exception
Construct the MMER. The given arff files contain ID information, such as studentID, courseID.

参数:
paraFirstFilename - the first filename, student
paraSecondFilename - the second filename, e.g., course
paraRelationFilename - the relation filename, e.g., student-course
paraHaveID - Is ID of two entity files removed and the relation stored in numeric? If so, we can read them directly.
抛出:
java.io.IOException
java.lang.Exception

ManyToManyEntityRelationSystem

public ManyToManyEntityRelationSystem(java.lang.String paraFirstFilename,
                                      java.lang.String paraSecondFilename,
                                      java.lang.String paraRelationFilename)
                               throws java.io.IOException,
                                      java.lang.Exception
Construct the MMER. The given arff files contain ID information, such as studentID, courseID.

参数:
paraFirstFilename - the first filename, student
paraSecondFilename - the second filename, e.g., course
paraRelationFilename - the relation filename, e.g., student-course
抛出:
java.io.IOException
java.lang.Exception

ManyToManyEntityRelationSystem

public ManyToManyEntityRelationSystem(java.io.Reader paraFirstSetReader,
                                      java.io.Reader paraSecondSetReader,
                                      java.io.Reader paraRelationSetReader)
                               throws java.io.IOException,
                                      java.lang.Exception
Construct the MMER. The given readers does not contain ID information.

参数:
paraFirstSetReader - the reader for the first set, e.g., student
paraSecondSetReader - the reader for the second set, e.g., course
paraRelationSetReader - the reader for the relation set, e.g., student-course
抛出:
java.io.IOException
java.lang.Exception

ManyToManyEntityRelationSystem

public ManyToManyEntityRelationSystem(Instances paraFirstSet,
                                      Instances paraSecondSet,
                                      Instances paraRelationSet)
                               throws java.lang.Exception
Construct the decision system. Simply adopt everything of the super class.

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

computeFirstSetFrequentConcepts

public java.lang.String computeFirstSetFrequentConcepts(double paraSupportThreshold,
                                                        int paraBaseAlgorithm,
                                                        boolean paraScaled)
                                                 throws java.lang.Exception
Frequent concepts for the first set. Only for concept mining in one information system.

参数:
paraSupportThreshold - the given threshold for support
paraBaseAlgorithm - the specified algorithm in integer
paraScaled - whether or not view the information system as scaled
返回:
a long string for all rules
抛出:
java.lang.Exception

computeSecondSetFrequentConcepts

public java.lang.String computeSecondSetFrequentConcepts(double paraSupportThreshold,
                                                         int paraBaseAlgorithm,
                                                         boolean paraScaled)
                                                  throws java.lang.Exception
Frequent concepts for the second set. Only for concept mining in one information system.

参数:
paraSupportThreshold - the given threshold for support
paraBaseAlgorithm - the specified algorithm in integer
paraScaled - whether or not view the information system as scaled
返回:
a long string for all rules
抛出:
java.lang.Exception

generateRules

public java.lang.String generateRules(double paraSourceCoverageThreshold,
                                      double paraTargetCoverageThreshold,
                                      double paraSourceConfidenceThreshold,
                                      double paraTargetConfidenceThreshold,
                                      int paraOverallAlgorithm,
                                      int paraBaseAlgorithm,
                                      boolean paraScaled)
                               throws java.lang.Exception
Generate granular associate rules.

参数:
paraSourceCoverageThreshold - the threshold for source coverage
paraTargetCoverageThreshold - the threshold for target coverage
paraSourceConfidenceThreshold - the threshold for source confidence
paraTargetConfidenceThreshold - the threshold for target confidence
paraOverallAlgorithm - the overall algorithm, SANDWICH, FORWARD, BACKWARD, etc.
paraBaseAlgorithm - the algorithm to generate frequent items from each information system
返回:
all rules in a string (maybe too long to store)
抛出:
java.lang.Exception

generateCompleteMatchRules

public java.lang.String generateCompleteMatchRules(double paraSourceCoverageThreshold,
                                                   double paraTargetCoverageThreshold,
                                                   int paraOverallAlgorithm,
                                                   int paraBaseAlgorithm)
                                            throws java.lang.Exception
Generate complete match rules using the sandwich algorithm.

参数:
paraSourceCoverageThreshold - the threshold for source coverage
paraTargetCoverageThreshold - the threshold for target coverage
paraBaseAlgorithm - the algorithm to generate frequent items from each information system
返回:
all rules in a string (maybe too long to store)
抛出:
java.lang.Exception

generateCompleteMatchRulesSandwich

public java.lang.String generateCompleteMatchRulesSandwich(double paraSourceCoverageThreshold,
                                                           double paraTargetCoverageThreshold,
                                                           int paraBaseAlgorithm)
                                                    throws java.lang.Exception
Generate complete match rules using the sandwich algorithm. The time complexity of this method is $O(|RU||RV||U||V|)$ where $|RU|$ and $|RV|$ are the sizes of the frequent items in the first and the second set, respectively.

参数:
paraSourceCoverageThreshold - the threshold for source coverage
paraTargetCoverageThreshold - the threshold for target coverage
paraBaseAlgorithm - the algorithm to generate frequent items from each information system
返回:
all rules in a string (maybe too long to store)
抛出:
java.lang.Exception

generateCompleteMatchRulesForward

public java.lang.String generateCompleteMatchRulesForward(double paraSourceCoverageThreshold,
                                                          double paraTargetCoverageThreshold,
                                                          int paraBaseAlgorithm)
                                                   throws java.lang.Exception
Generate complete match rules using the forward algorithm. The time complexity of this method is $O(|RU||RV|(|U|+|V|))$ where $|RU|$ and $|RV|$ are the sizes of the frequent items in the first and the second set, respectively.

参数:
paraSourceCoverageThreshold - the threshold for source coverage
paraTargetCoverageThreshold - the threshold for target coverage
paraBaseAlgorithm - the algorithm to generate frequent items from each information system
返回:
all rules in a string (maybe too long to store)
抛出:
java.lang.Exception
另请参见:
generateCompleteMatchRulesSandwich(double, double, int), generateCompleteMatchRulesBackward(double, double, int)

generateCompleteMatchRulesBackward

public java.lang.String generateCompleteMatchRulesBackward(double paraSourceCoverageThreshold,
                                                           double paraTargetCoverageThreshold,
                                                           int paraBaseAlgorithm)
                                                    throws java.lang.Exception
Compute complete match rules using the backward algorithm.

参数:
paraSourceCoverageThreshold - the threshold for source coverage
paraTargetCoverageThreshold - the threshold for target coverage
paraBaseAlgorithm - the algorithm to generate frequent items from each information system
返回:
all rules in a string (maybe too long to store)
抛出:
java.lang.Exception
另请参见:
generateCompleteMatchRulesSandwich(double, double, int), generateCompleteMatchRulesForward(double, double, int)

generateLeftPartialMatchRules

public java.lang.String generateLeftPartialMatchRules(double paraSourceCoverageThreshold,
                                                      double paraTargetCoverageThreshold,
                                                      double paraSourceConfidenceThreshold,
                                                      int paraOverallAlgorithm,
                                                      int paraBaseAlgorithm)
                                               throws java.lang.Exception
Generate left-hand side partial match rules.

参数:
paraSourceCoverageThreshold - the threshold for source coverage
paraTargetCoverageThreshold - the threshold for target coverage
paraBaseAlgorithm - the algorithm to generate frequent items from each information system
返回:
all rules in a string (maybe too long to store)
抛出:
java.lang.Exception

generateLeftPartialMatchRulesSandwich

public java.lang.String generateLeftPartialMatchRulesSandwich(double paraSourceCoverageThreshold,
                                                              double paraTargetCoverageThreshold,
                                                              double paraSourceConfidenceThreshold,
                                                              int paraBaseAlgorithm)
                                                       throws java.lang.Exception
Generate left-hand side partial match rules using the sandwich algorithm.

参数:
paraSourceCoverageThreshold - the threshold for source coverage
paraTargetCoverageThreshold - the threshold for target coverage
paraSourceConfidenceThreshold - the threshold for source confidence
paraBaseAlgorithm - the algorithm to generate frequent items from each information system
返回:
all rules in a string (maybe too long to store)
抛出:
java.lang.Exception

generateRightPartialMatchRules

public java.lang.String generateRightPartialMatchRules(double paraSourceCoverageThreshold,
                                                       double paraTargetCoverageThreshold,
                                                       double paraTargetConfidenceThreshold,
                                                       int paraOverallAlgorithm,
                                                       int paraBaseAlgorithm)
                                                throws java.lang.Exception
Generate right-hand side partial match rules.

参数:
paraSourceCoverageThreshold - the threshold for source coverage
paraTargetCoverageThreshold - the threshold for target coverage
paraBaseAlgorithm - the algorithm to generate frequent items from each information system
返回:
all rules in a string (maybe too long to store)
抛出:
java.lang.Exception

generateRightPartialMatchRulesSandwich

public java.lang.String generateRightPartialMatchRulesSandwich(double paraSourceCoverageThreshold,
                                                               double paraTargetCoverageThreshold,
                                                               double paraTargetConfidenceThreshold,
                                                               int paraBaseAlgorithm)
                                                        throws java.lang.Exception
Generate right-hand side partial match rules using the sandwich algorithm.

参数:
paraSourceCoverageThreshold - the threshold for source coverage
paraTargetCoverageThreshold - the threshold for target coverage
paraTargetConfidenceThreshold - the threshold for target confidence
paraBaseAlgorithm - the algorithm to generate frequent items from each information system
返回:
all rules in a string (maybe too long to store)
抛出:
java.lang.Exception

generatePartialMatchRules

public java.lang.String generatePartialMatchRules(double paraSourceCoverageThreshold,
                                                  double paraTargetCoverageThreshold,
                                                  double paraSourceConfidenceThreshold,
                                                  double paraTargetConfidenceThreshold,
                                                  int paraOverallAlgorithm,
                                                  int paraBaseAlgorithm)
                                           throws java.lang.Exception
Generate partial match rules.

参数:
paraSourceCoverageThreshold - the threshold for source coverage
paraTargetCoverageThreshold - the threshold for target coverage
paraSourceConfidenceThreshold - the threshold for source confidence
paraTargetConfidenceThreshold - the threshold for target confidence
paraOverallAlgorithm - the overall algorithm, SANDWICH, FORWARD, BACKWARD, etc.
paraBaseAlgorithm - the algorithm to generate frequent items from each information system
返回:
all rules in a string (maybe too long to store)
抛出:
java.lang.Exception

generatePartialMatchRulesSandwich

public java.lang.String generatePartialMatchRulesSandwich(double paraSourceCoverageThreshold,
                                                          double paraTargetCoverageThreshold,
                                                          double paraSourceConfidenceThreshold,
                                                          double paraTargetConfidenceThreshold,
                                                          int paraBaseAlgorithm)
                                                   throws java.lang.Exception
Generate partial match rules using the sandwich algorithm.

参数:
paraSourceCoverageThreshold - the threshold for source coverage
paraTargetCoverageThreshold - the threshold for target coverage
paraSourceConfidenceThreshold - the threshold for source confidence
paraTargetConfidenceThreshold - the threshold for target confidence
paraBaseAlgorithm - the algorithm to generate frequent items from each information system.
返回:
all rules in a string (maybe too long to store)
抛出:
java.lang.Exception

generatePartialMatchRulesBackward

public java.lang.String generatePartialMatchRulesBackward(double paraSourceCoverageThreshold,
                                                          double paraTargetCoverageThreshold,
                                                          double paraSourceConfidenceThreshold,
                                                          double paraTargetConfidenceThreshold,
                                                          int paraBaseAlgorithm)
                                                   throws java.lang.Exception
Generate partial match rules using the backward algorithm.

参数:
paraSourceCoverageThreshold - the threshold for source coverage
paraTargetCoverageThreshold - the threshold for target coverage
paraSourceConfidenceThreshold - the threshold for source confidence
paraTargetConfidenceThreshold - the threshold for target confidence
paraBaseAlgorithm - the algorithm to generate frequent items from each information system.
返回:
all rules in a string (maybe too long to store)
抛出:
java.lang.Exception

extendRelation

public void extendRelation(int paraTimes)
Extend the first set and the relation set. 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.

toSummaryString

public java.lang.String toSummaryString()
Summarize it. Sometimes the toString() method produce a rather long string.


toString

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

覆盖:
类 java.lang.Object 中的 toString
返回:
object status.