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
TypeMethod
 java.lang.String getAntecedentTableName()
          Returns the rules table name that contains the antecedents of the rules found in this instance of assocication rules model.
 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 sortOrder)
          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)
          Returns an instance of MiningRuleSet that contains the specified number of rules whose confidence is greater than the specified value.
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 getRulesBySupport(Connection dmsConn, java.lang.String modelName, float support, int maxNumRules)
          Returns an instance of MiningRuleSet that contains the specified number of mining rules whose support is greater than the specified value.
 java.lang.String getRuleTableName()
          Returns the rules table name that contains the information on the rules found in this instance of assocication rules model.
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, getModelName, listContents, listContents, listContents, listContents, remove, setModelNameForMig
 
Methods inherited from class oracle.dmt.odm.LocatableObject
deserialize, serialize
 
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:
int - 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:
int - 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:
float - 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:
int - 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:
int - The number of rules found in the model

getRuleTableName

public java.lang.String getRuleTableName()
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:
String - The rules table name

getAntecedentTableName

public java.lang.String getAntecedentTableName()
Returns the rules table name that contains the antecedents of the rules found in this instance of assocication rules model.
Returns:
String - 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:
Category[] - The items in the model

getRules

public static MiningRuleSet getRules(Connection dmsConn,
                                     java.lang.String modelName,
                                     int maxNumRules,
                                     RuleSortCriteria sortOrder)
                              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
sortOrder - The sort order by which the rules are sorted (either support or confidence)
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
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
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:
MiningRuleSet - An instance of MiningRuleSet that contains the retrieved mining rules
Throws:
InvalidArgumentException - when dmsConn, modelName, or maxNumRules is not a positive integer, or 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
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
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:
MiningRuleSet - An instance of MiningRuleSet that contains the retrieved mining rules
Throws:
InvalidArgumentException - when dmsConn, modelName, or maxNumRules is not a positive integer, or confidence is out of range (non-positive or greater than 1).
java.sql.SQLException - when an error occurs during the retrieval of rules
MiningObjectException - when an invalid mining rule is found
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.
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
consequentList - A list of consequent items
Returns:
MiningRuleSet - An instance of MiningRuleSet that contains the retrieved mining rules
Throws:
InvalidArgumentException - when dmsConn, modelName, or 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
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:
AssociationRulesModel An instance of AssociationRulesModel restored
Throws:
InvalidArgumentException - when dmsConn or modelName is null.
ODMException - when modelName is empty or exceeds 30 acharacter in length.
java.sql.SQLException - when an error occurs during the retrieval of the model
MiningObjectException - when the restored model is not an instance of AssociationRulesModel.