Oracle Data Mining Java API Reference
10g Release 1 (10.1)

B12276-01

oracle.dmt.odm.model
Class AssociationRulesModel

java.lang.Object
  |
  +--oracle.dmt.odm.MiningObject
        |
        +--oracle.dmt.odm.LocatableObject
              |
              +--oracle.dmt.odm.model.MiningModel
                    |
                    +--oracle.dmt.odm.model.AssociationRulesModel
All Implemented Interfaces:
java.io.Serializable

public abstract class AssociationRulesModel
extends MiningModel

The abstract class AssociationRulesModel is a Java representation of the association rules model. This class provides methods to access the rules in the model.

See Also:
Serialized Form

Method Summary
 java.lang.String getAntecedentTableName()
          Deprecated. As of 10.0.1.
 float getAverageNumberOfItemsPerTransaction()
          Returns the average number of items per transaction in the data used to build this instance of assocication rules model.
 Category[] getItems()
          Returns the items in the input data used to build this instance of assocication rules model.
 int getMaxNumberOfItemsPerTransaction()
          Returns the maximum number of items per transaction in the data used to build this instance of assocication rules model.
 int getNumberOfItems()
          Returns the number of items in the data used to build this instance of assocication rules model.
 int getNumberOfRules()
          Returns the number of rules found in this instance of assocication rules model.
 int getNumberOfTransactions()
          Returns the number of transactions in the data used to build this instance of assocication rules model.
static MiningRuleSet getRules(Connection dmsConn, java.lang.String modelName, int maxNumRules, RuleSortCriteria ruleOrder)
          Returns an instance of MiningRuleSet that contains the specified number of rules sorted in the specified order (confidence or support).
static MiningRuleSet getRules(Connection dmsConn, java.lang.String modelName, RuleSortCriteria selectionCriterion, ComparisonFunction selectionFunction, float selectionPoint, RuleSortCriteria[] ruleOrder, SortOrder[] sortOrder, int maxNumRules)
          Returns an instance of MiningRuleSet that contains the specified number of rules sorted in the specified order (confidence or support).
static MiningRuleSet getRulesByConfidence(Connection dmsConn, java.lang.String modelName, float confidence, int maxNumRules)
          Deprecated. As of 10.1. The same can be achieved by the new getRules method with the following parameters.
  • dmsConn
  • modelName
  • selectionCriterion=RuleSortCriteria.confidence
  • selectionFunction=ComparisonFunction.ge
  • selectionPoint=confidence threshold value
  • ruleOrder=null
  • sortOrder=null
  • maxNumRules
static MiningRuleSet getRulesByContents(Connection dmsConn, java.lang.String modelName, java.lang.String[] antecedentList, java.lang.String[] consequentList, int maxNumRules)
          Returns an instance of MiningRuleSet that contains the specified items as antecedent and consequent.
static MiningRuleSet getRulesByContents(Connection dmsConn, java.lang.String modelName, java.lang.String[] antecedentList, java.lang.String[] consequentList, RuleSortCriteria selectionCriterion, ComparisonFunction selectionFunction, float selectionPoint, RuleSortCriteria[] ruleOrder, SortOrder[] sortOrder, int maxNumRules)
          Returns an instance of MiningRuleSet that contains the specified number of rules sorted in the specified order (confidence or support).
static MiningRuleSet getRulesBySupport(Connection dmsConn, java.lang.String modelName, float support, int maxNumRules)
          Deprecated. As of 10.1. The same can be achieved by the new getRules method with the following parameters.
  • dmsConn
  • modelName
  • selectionCriterion=RuleSortCriteria.support
  • selectionFunction=ComparisonFunction.ge
  • selectionPoint=support threshold value
  • ruleOrder=null
  • sortOrder=null
  • maxNumRules
 java.lang.String getRuleTableName()
          Deprecated. As of 10.0.1.
static AssociationRulesModel restore(Connection dmsConn, java.lang.String modelName)
          Returns an instance of AssociationRulesModel with the specified name persisted in the data mining server.

 

Methods inherited from class oracle.dmt.odm.model.MiningModel
build, getBinCategoricalTableName, getBinNumericTableName, getMiningAlgorithm, getMiningFunction, getMiningFunctionSettings, getModelAlgorithm, getModelMiningFunction, getModelName, getSignature, listContents, listContents, listContents, listContents, remove, rename, storeLocationdata

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Method Detail

getNumberOfTransactions

public int getNumberOfTransactions()
Returns the number of transactions in the data used to build this instance of assocication rules model.
Returns:
The number of transactions

getMaxNumberOfItemsPerTransaction

public int getMaxNumberOfItemsPerTransaction()
Returns the maximum number of items per transaction in the data used to build this instance of assocication rules model.
Returns:
The maximum number of items per transaction

getAverageNumberOfItemsPerTransaction

public float getAverageNumberOfItemsPerTransaction()
Returns the average number of items per transaction in the data used to build this instance of assocication rules model.
Returns:
The average number of items per transaction

getNumberOfItems

public int getNumberOfItems()
Returns the number of items in the data used to build this instance of assocication rules model.
Returns:
The number of items in the data

getNumberOfRules

public int getNumberOfRules()
Returns the number of rules found in this instance of assocication rules model.
Returns:
The number of rules found in the model

getRuleTableName

public java.lang.String getRuleTableName()
Deprecated. As of 10.0.1.
Returns the rules table name that contains the information on the rules found in this instance of assocication rules model. This table contains consequents, support, confidence of the rules.
Returns:
The rules table name

getAntecedentTableName

public java.lang.String getAntecedentTableName()
Deprecated. As of 10.0.1.
Returns the rules table name that contains the antecedents of the rules found in this instance of assocication rules model.
Returns:
The antecedents table name

getItems

public Category[] getItems()
Returns the items in the input data used to build this instance of assocication rules model.
Returns:
The items in the model

getRules

public static MiningRuleSet getRules(Connection dmsConn,
                                     java.lang.String modelName,
                                     int maxNumRules,
RuleSortCriteria ruleOrder)
                                                  throws java.sql.SQLException,
InvalidArgumentException,
MiningObjectException,
ODMException
Returns an instance of MiningRuleSet that contains the specified number of rules sorted in the specified order (confidence or support).
Parameters:
dmsConn - The connection to the data mining server
modelName - The name of the model from which the rules are extracted
maxNumRules - The maximum number of rules to be extracted
ruleOrder - The order by which the rules are sorted (either support, confidence, ruleLength, or ruleID)
Returns:
An instance of MiningRuleSet that contains the retrieved mining rules
Throws:
InvalidArgumentException -
  • when dmsConn,
  • modelName,
  • ruleOrder is null, or
  • maxNumRules is not a positive integer.
java.sql.SQLException - when an error occurs during the retrieval of rules
MiningObjectException - when an invalid mining rule is found
ODMException
See Also:
MiningRuleSet

getRules

public static MiningRuleSet getRules(Connection dmsConn,
                                     java.lang.String modelName,
RuleSortCriteria selectionCriterion,
ComparisonFunction selectionFunction,
                                     float selectionPoint,
RuleSortCriteria[] ruleOrder,
SortOrder[] sortOrder,
                                     int maxNumRules)
                                                  throws java.sql.SQLException,
InvalidArgumentException,
MiningObjectException,
ODMException
Returns an instance of MiningRuleSet that contains the specified number of rules sorted in the specified order (confidence or support).
Parameters:
dmsConn - The connection to the data mining server
modelName - The name of the model from which the rules are extracted
selectionCriterion - The selection criterion by which the rules are selected (either by support, confidence, ruleLength or ruleID)
selectionFunction - A relational operator that, combined with selectionCriterion and selectionPoint, defines the range of the rules to be selected. The values that can be used are lessThan, lessOrEqual, equal, greaterOrEqual and greaterThan.
selectionPoint - The value of the selection criterion. If selectionCriterion is ruleLength or ruleID, the value is rounded to floor(selectionCriterion).
maxNumRules - The maximum number of rules to be extracted
Returns:
An instance of MiningRuleSet that contains the retrieved mining rules
Throws:
InvalidArgumentException - is thrown when
  • dmsConn is null,
  • modelName is null or invalid,
  • selectionCriterion is null,
  • selectionFunction is null,
  • selectionPoint is negative,
  • ruleOrder contains redundant order, or its size is greater than 4,
  • The size of sortOrder is greater than 4, or
  • maxNumRules is not a positive integer.
java.sql.SQLException - when an error occurs during the retrieval of rules
MiningObjectException - when an invalid mining rule is found
ODMException
Since:
9.2.0.3
See Also:
MiningRuleSet

getRulesBySupport

public static MiningRuleSet getRulesBySupport(Connection dmsConn,
                                              java.lang.String modelName,
                                              float support,
                                              int maxNumRules)
                                                           throws java.sql.SQLException,
InvalidArgumentException,
MiningObjectException,
ODMException
Deprecated. As of 10.1. The same can be achieved by the new getRules method with the following parameters.
Returns an instance of MiningRuleSet that contains the specified number of mining rules whose support is greater than the specified value.
Parameters:
dmsConn - The connection to the data mining server
modelName - The name of the model from which the rules are extracted
support - The support value for the rules
maxNumRules - The maximum number of rules to be extracted
Returns:
An instance of MiningRuleSet that contains the retrieved mining rules
Throws:
InvalidArgumentException -
  • when dmsConn,
  • modelName,
  • maxNumRules is not a positive integer
  • support is out of range (negative or greater than 1).
java.sql.SQLException - when an error occurs during the retrieval of rules
MiningObjectException - when an invalid mining rule is found
ODMException
See Also:
MiningRuleSet

getRulesByConfidence

public static MiningRuleSet getRulesByConfidence(Connection dmsConn,
                                                 java.lang.String modelName,
                                                 float confidence,
                                                 int maxNumRules)
                                                              throws java.sql.SQLException,
InvalidArgumentException,
MiningObjectException,
ODMException
Deprecated. As of 10.1. The same can be achieved by the new getRules method with the following parameters.
Returns an instance of MiningRuleSet that contains the specified number of rules whose confidence is greater than the specified value.
Parameters:
dmsConn - The connection to the data mining server
modelName - The name of the model from which the rules are extracted
confidence - The confidence value for the rules
maxNumRules - The maximum number of rules to be extracted
Returns:
An instance of MiningRuleSet that contains the retrieved mining rules
Throws:
InvalidArgumentException -
  • when dmsConn,
  • modelName,
  • maxNumRules is not a positive integer
  • support is out of range (negative or greater than 1).
java.sql.SQLException - when an error occurs during the retrieval of rules
MiningObjectException - when an invalid mining rule is found
ODMException
See Also:
MiningRuleSet

getRulesByContents

public static MiningRuleSet getRulesByContents(Connection dmsConn,
                                               java.lang.String modelName,
                                               java.lang.String[] antecedentList,
                                               java.lang.String[] consequentList,
                                               int maxNumRules)
                                                            throws java.sql.SQLException,
InvalidArgumentException,
MiningObjectException,
ODMException
Returns an instance of MiningRuleSet that contains the specified items as antecedent and consequent. The rules are ordered by rule length, support and confidence.
Parameters:
dmsConn - The connection to the data mining server
modelName - The name of the model from which the rules are extracted
antecedentList - A list of antecedent items. The maximum number of items in the list is 1000.
consequentList - A list of consequent items. The maximum number of items in the list is 1000.
Returns:
An instance of MiningRuleSet that contains the retrieved mining rules
Throws:
InvalidArgumentException -
  • when dmsConn,
  • modelName,
  • maxNumRules is not a positive integer, or
  • both antecedentList and consequentList are null.
java.sql.SQLException - when an error occurs during the retrieval of rules
MiningObjectException - when an invalid mining rule is found
ODMException
See Also:
MiningRuleSet

getRulesByContents

public static MiningRuleSet getRulesByContents(Connection dmsConn,
                                               java.lang.String modelName,
                                               java.lang.String[] antecedentList,
                                               java.lang.String[] consequentList,
RuleSortCriteria selectionCriterion,
ComparisonFunction selectionFunction,
                                               float selectionPoint,
RuleSortCriteria[] ruleOrder,
SortOrder[] sortOrder,
                                               int maxNumRules)
                                                            throws java.sql.SQLException,
InvalidArgumentException,
MiningObjectException,
ODMException
Returns an instance of MiningRuleSet that contains the specified number of rules sorted in the specified order (confidence or support).
Parameters:
dmsConn - The connection to the data mining server
modelName - The name of the model from which the rules are extracted
antecedentList - A list of antecedent items. The maximum number of items in the list is 1000.
consequentList - A list of consequent items. The maximum number of items in the list is 1000.
selectionCriterion - The selection criterion by which the rules are selected (either by support, confidence, ruleLength or ruleID)
selectionFunction - A relational operator that, combined with selectionCriterion and selectionPoint, defines the range of the rules to be selected. The values that can be used are le (less than or equal), equal and ge (greater than or equal).
selectionPoint - The value of the selection criterion. If selectionCriterion is ruleLength or ruleID, the value is rounded to floor(selectionCriterion).
maxNumRules - The maximum number of rules to be extracted
Returns:
MiningRuleSet - An instance of MiningRuleSet that contains the retrieved mining rules
Throws:
InvalidArgumentException - when dmsConn, modelName, or sortOrder is null, or maxNumRules is not a positive integer.
java.sql.SQLException - when an error occurs during the retrieval of rules
MiningObjectException - when an invalid mining rule is found
ODMException
Since:
9.2.0.3
See Also:
MiningRuleSet

restore

public static AssociationRulesModel restore(Connection dmsConn,
                                            java.lang.String modelName)
                                                          throws java.sql.SQLException,
MiningObjectException,
InvalidArgumentException,
ODMException
Returns an instance of AssociationRulesModel with the specified name persisted in the data mining server.
Parameters:
dmsConn - The connection to the data mining server
modelName - The name of the model to be restored
Returns:
An instance of AssociationRulesModel restored
Throws:
ODMException - when modelName is empty or length exceeds the limit.
InvalidArgumentException -
  • when dmsConn is null, or
  • modelName is null.
java.sql.SQLException - when an error occurs during the retrieval of rules
MiningObjectException - when the restored model is not an instance of AssociationRulesModel.

Copyright © 2003 Oracle Corporation. All Rights Reserved.