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

B12276-01

oracle.dmt.odm.settings.function
Class AssociationRulesFunctionSettings

java.lang.Object
  |
  +--oracle.dmt.odm.MiningObject
        |
        +--oracle.dmt.odm.LocatableObject
              |
              +--oracle.dmt.odm.settings.function.MiningFunctionSettings
                    |
                    +--oracle.dmt.odm.settings.function.AssociationRulesFunctionSettings
All Implemented Interfaces:
java.io.Serializable

public class AssociationRulesFunctionSettings
extends MiningFunctionSettings

An instance of AssociationRulesFunctionSettings describes settings for an association rules model.

Association rules are used for the discovery of relationships or correlations among a set of items. For example, the presence of one pattern implies the presence of another pattern. Association rules help to identify the attribute value conditions that occur frequently together in a given set of data. Association analysis is widely used in transaction data analysis for directed marketing, catalog design, and other business decision-making process. Association rules have two important characteristics, support and confidence.

As of ODM 9.2.0, only one algorithm is supported for association rules with no algorithm-specific settings.

See Also:
Serialized Form

Field Summary
static int MAX_RULE_LENGTH
           
static int MIN_RULE_LENGTH
           

 

Constructor Summary
AssociationRulesFunctionSettings(float minSupport, float minConfidence, int maxRuleLength, LogicalDataSpecification lds, DataUsageSpecification dus)
          Creates an instance of association rules function settings with the specified parameters.
AssociationRulesFunctionSettings(float minSupport, float minConfidence, int maxRuleLength, LogicalDataSpecification lds, DataUsageSpecification dus, MiningAlgorithmSettings algorithm)
          Deprecated. As of ODM 9.2.0. Mining algorithm settings is not required to build an association rules model. Use other constructor.
AssociationRulesFunctionSettings(float minSupport, float minConfidence, LogicalDataSpecification lds, DataUsageSpecification dus)
          Creates an instance of association rules function settings with the specified parameters.

 

Method Summary
 void addExcludedCategory(Category cat)
          Adds a category to be excluded from the rule discovery.
static AssociationRulesFunctionSettings create(Connection dmsConn, MiningAlgorithmSettings algorithm, PhysicalDataSpecification pdsDataSpec, DataPreparationStatus dpStatus, float minSupport, float minConfidence, int maxRuleLength)
          Creates an instance of AssociationRulesFunctionSettings from the specified parameters.
static AssociationRulesFunctionSettings create(Connection dmsConn, PhysicalDataSpecification pdsDataSpec, DataPreparationStatus dpStatus, float minSupport, float minConfidence, int maxRuleLength)
          Creates an instance of AssociationRulesFunctionSettings from the specified parameters.
 MiningAttribute[] getActiveAttributes()
          Returns an array of active mining attributes in this function settings.
 Category[] getExcludedCategory()
          Returns the excluded categories.
 int getMaximumRuleLength()
          Returns the maximum rule length.
 float getMinimumConfidence()
          Returns the minimum confidence.
 float getMinimumSupport()
          Returns the minimum support.
 MiningAttribute[] getUnpreparedActiveAttributes()
          Returns an array of unprepared active mining attributes in this function settings.
 void validate()
          Validates the correctness of this function settings.

 

Methods inherited from class oracle.dmt.odm.settings.function.MiningFunctionSettings
activateAll, adjustAttributesType, adjustAttributeUsage, adjustAttributeUsage, adjustDataPreparationStatus, adjustSparsitySpecification, getDataUsageSpecification, getLogicalDataSpecification, getMiningAlgorithmName, getMiningAlgorithmSettings, getMiningAttributes, getMiningFunction, getName, getSettingsID, getSupplementalAttributes, getValidateBeforeStore, listContents, listContents, listContents, listContents, remove, rename, restore, restore, restorePastVersion, restorePastVersion, setDataUsageSpecification, setLogicalDataSpecification, setMiningAlgorithmName, setMiningAlgorithmSettings, setMiningFunction, setValidateBeforeStore, store

 

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

 

Field Detail

MIN_RULE_LENGTH

public static final int MIN_RULE_LENGTH
See Also:
Constant Field Values

MAX_RULE_LENGTH

public static final int MAX_RULE_LENGTH
See Also:
Constant Field Values
Constructor Detail

AssociationRulesFunctionSettings

public AssociationRulesFunctionSettings(float minSupport,
                                        float minConfidence,
                                        int maxRuleLength,
LogicalDataSpecification lds,
DataUsageSpecification dus,
MiningAlgorithmSettings algorithm)
                                 throws InvalidArgumentException
Deprecated. As of ODM 9.2.0. Mining algorithm settings is not required to build an association rules model. Use other constructor.
Creates an instance of association rules function settings with the specified parameters.
Parameters:
minSupport - The minimum support of the rules to be found
minConfidence - The minimum confidence of the rules to be found
maxRuleLength - - The maximum rule length in terms of the number of items
lds - An instance of LogicalDataSpecification that specifies the logical data to be used for model building
dus - An instance of DataUsageSpecification that defines how the logical data is to be used for model building
algorithm - An instance of MiningAlgorithmSettings that specifies the algorithm specific parameters to be used for model building. In ODM 9.2.0, this must be null.
Throws:
InvalidArgumentException -

AssociationRulesFunctionSettings

public AssociationRulesFunctionSettings(float minSupport,
                                        float minConfidence,
                                        int maxRuleLength,
LogicalDataSpecification lds,
DataUsageSpecification dus)
                                 throws InvalidArgumentException
Creates an instance of association rules function settings with the specified parameters.
Parameters:
minSupport - The minimum support of the rules to be found
minConfidence - The minimum confidence of the rules to be found
maxRuleLength - - The maximum rule length in terms of the number of items
lds - An instance of LogicalDataSpecification that specifies the logical data to be used for model building
dus - An instance of DataUsageSpecification that defines how the logical data is to be used for model building
Throws:
InvalidArgumentException -

AssociationRulesFunctionSettings

public AssociationRulesFunctionSettings(float minSupport,
                                        float minConfidence,
LogicalDataSpecification lds,
DataUsageSpecification dus)
                                 throws InvalidArgumentException
Creates an instance of association rules function settings with the specified parameters. The default maximum rule lenth is set to 100, by which the DMS will practically generate rules of any length that exist in the input data, given the minimum support and minimum confidence.
Parameters:
minSupport - The minimum support of the rules to be found
minConfidence - The minimum confidence of the rules to be found
lds - An instance of LogicalDataSpecification that specifies the logical data to be used for model building
dus - An instance of DataUsageSpecification that defines how the logical data is to be used for model building
Throws:
InvalidArgumentException -
Since:
9.2.0
Method Detail

addExcludedCategory

public void addExcludedCategory(Category cat)
Adds a category to be excluded from the rule discovery.
Parameters:
cat - A category to be excluded

getExcludedCategory

public Category[] getExcludedCategory()
Returns the excluded categories.
Returns:
An array of excluded categories

getMinimumSupport

public float getMinimumSupport()
Returns the minimum support.
Returns:
The minimum support value.

getMinimumConfidence

public float getMinimumConfidence()
Returns the minimum confidence.
Returns:
The minimum confidence value.

getMaximumRuleLength

public int getMaximumRuleLength()
Returns the maximum rule length.
Returns:
The maximum rule length value.

getActiveAttributes

public MiningAttribute[] getActiveAttributes()
Returns an array of active mining attributes in this function settings.
Returns:
An array of mining attributes
See Also:
AttributeUsage

getUnpreparedActiveAttributes

public MiningAttribute[] getUnpreparedActiveAttributes()
Returns an array of unprepared active mining attributes in this function settings.
Returns:
An array of mining attributes
See Also:
AttributeUsage, DataPreparationStatus

validate

public void validate()
              throws MiningObjectException
Validates the correctness of this function settings.
Throws:
MiningObjectException - when this function settings is not valid

create

public static AssociationRulesFunctionSettings create(Connection dmsConn,
PhysicalDataSpecification pdsDataSpec,
DataPreparationStatus dpStatus,
                                                      float minSupport,
                                                      float minConfidence,
                                                      int maxRuleLength)
                                                                                throws java.sql.SQLException,
InvalidArgumentException,
MiningObjectException,
ODMException
Creates an instance of AssociationRulesFunctionSettings from the specified parameters.
Parameters:
dmsConn - A connection to the data mining server
pdsDataSpec - An instance of PhysicalDataSpecification that specifies the input data
dpStatus - An instance of DataPreparationStatus that indicates whether the data is discretized.
minSupport - - The value of minimum support
minConfidence - - The value of minimum confidence
maxRuleLength - - The value of maximum rule length
Returns:
A newly created instance of the AssociationRulesFunctionSettings
Throws:
InvalidArgumentException -
  • if dmsConn is null,
  • if lds is null,
  • if minSupport is invalid (less than 0 or greather than 1),
  • if minConfidence is invalid (less than 0 or greather than 1), or
  • if maxRuleLength is invalid (less than 2 or greather than 20).
java.sql.SQLException - when an error occurs during access to the input data
MiningObjectException - inherited exception
ODMException - inherited exception

create

public static AssociationRulesFunctionSettings create(Connection dmsConn,
MiningAlgorithmSettings algorithm,
PhysicalDataSpecification pdsDataSpec,
DataPreparationStatus dpStatus,
                                                      float minSupport,
                                                      float minConfidence,
                                                      int maxRuleLength)
                                                                                throws java.sql.SQLException,
InvalidArgumentException,
MiningObjectException,
ODMException
Creates an instance of AssociationRulesFunctionSettings from the specified parameters.
Parameters:
dmsConn - A connection to the data mining server
algorithm - mining algorithm
pdsDataSpec - An instance of PhysicalDataSpecification that specifies the input data
dpStatus - An instance of DataPreparationStatus that indicates whether the data is discretized.
minSupport - - The value of minimum support
minConfidence - - The value of minimum confidence
maxRuleLength - - The value of maximum rule length
Returns:
A newly created instance of the AssociationRulesFunctionSettings
Throws:
InvalidArgumentException - thrown when
  • if dmsConn is null,
  • if lds is null,
  • if minSupport is invalid (less than 0 or greather than 1),
  • if minConfidence is invalid (less than 0 or greather than 1), or
  • if maxRuleLength is invalid (less than 2 or greather than 20).
java.sql.SQLException - when an error occurs during access to the input data
MiningObjectException - inherited exception
ODMException - inherited exception

Copyright © 2003 Oracle Corporation. All Rights Reserved.