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

B12276-01

oracle.dmt.odm.settings.function
Class MiningFunctionSettings

java.lang.Object
  |
  +--oracle.dmt.odm.MiningObject
        |
        +--oracle.dmt.odm.LocatableObject
              |
              +--oracle.dmt.odm.settings.function.MiningFunctionSettings
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AssociationRulesFunctionSettings, AttributeImportanceFunctionSettings, ClusteringFunctionSettings, FeatureExtractionFunctionSettings, SupervisedFunctionSettings

public abstract class MiningFunctionSettings
extends oracle.dmt.odm.LocatableObject

The abstract class MiningFunctionSettings (MFS) captures the high level specification input for building a data mining model. In ODM, functions are divided into the following categories:

The intent of mining function settings is to allow a user to specify the type of result desired without having to specify a particular algorithm. If an algorithm is not specified, the data mining server selects an appropriate algorithm based on the basic user-provided parameters.

Since:
9.0.1
See Also:
LogicalDataSpecification, DataUsageSpecification, Serialized Form

Method Summary
 void activateAll()
          Changes all mining attributes to have active attribute usage.
 void adjustAttributesType(java.lang.String[] attributesList, AttributeType newAttrType)
          Adjusts the attribute type based for the specified mining attributes to have a new attribute type.
 void adjustAttributeUsage(java.lang.String[] attributesList, AttributeUsage newAttrUsage)
          Adjusts the data usage specification for the specified mining attributes to have new attribute usage.
 void adjustAttributeUsage(java.lang.String[] attributesList, UsageAdjustment newAttrUsage)
          Adjusts the data usage specification for the specified mining attributes based on the specified usage adjustment.
 void adjustDataPreparationStatus(java.lang.String[] attributesList, DataPreparationStatus newPreparationStatus)
          Adjusts the data usage specification based for the specified mining attributes to have new data preparation status.
 void adjustSparsitySpecification(java.lang.String[] attributesOverRideList, SparsitySpecification defaultSparsitySpecification)
          Adjusts the sparsity specification based for the specified mining attributes to have new sparsity specification.
 DataUsageSpecification getDataUsageSpecification()
          Returns the data usage specification of the function settings.
 LogicalDataSpecification getLogicalDataSpecification()
          Returns the logical data specification of the function settings.
 java.lang.String getMiningAlgorithmName()
          Returns the name of mining algorithm used to build a mining model.
 MiningAlgorithmSettings getMiningAlgorithmSettings()
          Returns the mining algorithm settings of the function settings, if any.
 MiningAttribute[] getMiningAttributes(AttributeUsage usage, AttributeType attrType)
          Collects mining attributes of specific usage type based on the specified attribute type.
 MiningFunction getMiningFunction()
          Returns the kind of mining function of this function settings.
 java.lang.String getName()
          Returns the name of this mining function settings.
 java.lang.Integer getSettingsID(java.sql.Connection dbConn, java.lang.String settingsName)
           
 MiningAttribute[] getSupplementalAttributes()
          Returns an array of supplementary mining attributes in this fiunction settings.
 boolean getValidateBeforeStore()
          Returns a flag that controls validation before the mining function settings object is persisted in the DMS.
static java.lang.String[] listContents(Connection dmsConn)
          Returns an array of the names of mining function settings persisted in the specified data mining server.
static java.lang.String[] listContents(Connection dmsConn, java.util.Date start, java.util.Date end)
          Returns an array of the names of mining function settings persisted within the specified time interval in the data mining server.
static java.lang.String[] listContents(Connection dmsConn, MiningFunction function, MiningAlgorithm algorithm)
          Returns an array of the names of mining function settings of the specified mining function type that contain the given algorithm type from the specified data mining server.
static java.lang.String[] listContents(Connection dmsConn, MiningFunction function, MiningAlgorithm algorithm, java.util.Date start, java.util.Date end)
          Returns an array of the names of mining function settings of the specified function type with the specified algorithm type that are persisted within the specified time interval in the data mining server.
static boolean remove(Connection dmsConn, java.lang.String settingsName)
          Removes the specified mining function settings from the data mining server.
static boolean rename(Connection dmsConn, java.lang.String oldObjectName, java.lang.String newObjectName)
          Renames the specified mining function settings.
static MiningFunctionSettings restore(java.sql.Connection dbConn, java.lang.String settingsName)
          Returns an instance of MiningFunctionSettings with the specified name persisted in the data mining server given a database connection and the function settings name.
static MiningFunctionSettings restore(Connection dmsConn, java.lang.String settingsName)
          Returns an instance of MiningFunctionSettings with the specified name persisted in the data mining server given a connection to the data mining server and the function settings name.
static MiningFunctionSettings restorePastVersion(java.sql.Connection dbConn, java.lang.String settingsName)
           
static MiningFunctionSettings restorePastVersion(Connection dmsConn, java.lang.String settingsName)
           
 void setDataUsageSpecification(DataUsageSpecification dus)
          Sets a data usage specification to this mining function settings.
 void setLogicalDataSpecification(LogicalDataSpecification lds)
           
 void setMiningAlgorithmName(java.lang.String name)
          Deprecated. As of ODM 9.2.0.
 void setMiningAlgorithmSettings(MiningAlgorithmSettings algorithmSettings)
          Sets a mining algorithm settings to be used to build a model.
 void setMiningFunction(MiningFunction function)
          Deprecated. As of ODM 9.2.0.
 void setValidateBeforeStore(boolean validateControl)
          Indicates that the mining function settings object is validated, if true, before it is persisted in the DMS.
 void store(Connection dmsConn, java.lang.String settingsName)
          Persists this instance of mining function settings with the given name in the specified ODM schema.
 java.lang.Integer storeInternal(java.sql.Connection dbConn, java.lang.String settingsName)
           

 

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

 

Method Detail

setLogicalDataSpecification

public void setLogicalDataSpecification(LogicalDataSpecification lds)

getLogicalDataSpecification

public LogicalDataSpecification getLogicalDataSpecification()
Returns the logical data specification of the function settings.
Returns:
LogicalDataSpecification - The logical data specification of this function settings.

getDataUsageSpecification

public DataUsageSpecification getDataUsageSpecification()
Returns the data usage specification of the function settings.
Returns:
DataUsageSpecification - Tge data usage specification of this function settings.

setMiningAlgorithmSettings

public void setMiningAlgorithmSettings(MiningAlgorithmSettings algorithmSettings)
Sets a mining algorithm settings to be used to build a model. If algorithmSettings is null, the DMS will choose the default algorithm settings that is appropriate for the function.

getMiningAlgorithmSettings

public MiningAlgorithmSettings getMiningAlgorithmSettings()
Returns the mining algorithm settings of the function settings, if any.
Returns:
MiningAlgorithmSettings - The algorithm settings

getMiningAlgorithmName

public java.lang.String getMiningAlgorithmName()
Returns the name of mining algorithm used to build a mining model.
Returns:
String - The name of the algorithm

setMiningAlgorithmName

public void setMiningAlgorithmName(java.lang.String name)
                            throws InvalidArgumentException
Deprecated. As of ODM 9.2.0.
Sets the name of the mining algorithm to be used for model building.
Parameters:
name - The name of the algorithm
Throws:
InvalidArgumentException - when name is either null, or an invalid algorithm name.

setMiningFunction

public void setMiningFunction(MiningFunction function)
Deprecated. As of ODM 9.2.0.
Sets the kind of mining function to be used for model building.
Parameters:
function - The kind of mining function to be used

getMiningFunction

public MiningFunction getMiningFunction()
Returns the kind of mining function of this function settings.
Returns:
MiningFunction - The kind of mining function

getName

public java.lang.String getName()
Returns the name of this mining function settings. Note that the name of a mining function settings is set when the settings is persisted in a data mining server via store method. Therefore, this method returns null if the settings has not been stored.
Returns:
String - The name of this mining function settings

setDataUsageSpecification

public void setDataUsageSpecification(DataUsageSpecification dus)
Sets a data usage specification to this mining function settings.
Parameters:
dus - A data usage specification
See Also:
DataUsageSpecification

getSupplementalAttributes

public MiningAttribute[] getSupplementalAttributes()
Returns an array of supplementary mining attributes in this fiunction settings.
Returns:
MiningAttribute[] - An array of mining attributes
See Also:
MiningAttribute, DataUsageEntry, AttributeUsage

listContents

public static java.lang.String[] listContents(Connection dmsConn)
                                       throws java.sql.SQLException
Returns an array of the names of mining function settings persisted in the specified data mining server.
Parameters:
dmsConn - A connection to the data mining server
Returns:
String[] - The name of mining function settings
Throws:
java.sql.SQLException - when an error occurs during the retrieval

listContents

public static java.lang.String[] listContents(Connection dmsConn,
MiningFunction function,
MiningAlgorithm algorithm)
                                       throws java.sql.SQLException
Returns an array of the names of mining function settings of the specified mining function type that contain the given algorithm type from the specified data mining server.
Parameters:
dmsConn - A connection to the data mining server
function - The kind of mining function
algorithm - The kind of algorithm
Returns:
String[] - The name of mining function settings
Throws:
java.sql.SQLException - when an error occurs during the retrieval

listContents

public static java.lang.String[] listContents(Connection dmsConn,
                                              java.util.Date start,
                                              java.util.Date end)
                                       throws java.sql.SQLException
Returns an array of the names of mining function settings persisted within the specified time interval in the data mining server. If either start or end is null, the current system time is used.
Parameters:
dmsConn - A connection to the data mining server
start - The start of the time interval
end - The ending of the time interval
Returns:
String[] - The name of mining function settings
Throws:
java.sql.SQLException - when an error occurs during the retrieval

listContents

public static java.lang.String[] listContents(Connection dmsConn,
MiningFunction function,
MiningAlgorithm algorithm,
                                              java.util.Date start,
                                              java.util.Date end)
                                       throws java.sql.SQLException
Returns an array of the names of mining function settings of the specified function type with the specified algorithm type that are persisted within the specified time interval in the data mining server. If either start or end is null, the current system time is used.
Parameters:
dmsConn - A connection to the data mining server
function - The kind of mining function
algorithm - The kind of algorithm
start - The start of the time interval
end - The ending of the time interval
Returns:
String[] - The name of mining function settings
Throws:
java.sql.SQLException - when an error occurs during the retrieval

setValidateBeforeStore

public void setValidateBeforeStore(boolean validateControl)
Indicates that the mining function settings object is validated, if true, before it is persisted in the DMS.
Parameters:
validateControl - A Boolean flag to control validation
Since:
9.2.0

getValidateBeforeStore

public boolean getValidateBeforeStore()
Returns a flag that controls validation before the mining function settings object is persisted in the DMS.
Returns:
A Boolean flag used to control validation of the settings object.
Since:
9.2.0

restore

public static MiningFunctionSettings restore(java.sql.Connection dbConn,
                                             java.lang.String settingsName)
                                                                       throws java.sql.SQLException
Returns an instance of MiningFunctionSettings with the specified name persisted in the data mining server given a database connection and the function settings name.
Parameters:
dbConn - A database connection to the data mining server
settingsName - The name of the function settings to be restored
Returns:
MiningFunctionSettings - An instance of MiningFunctionSettings restored
Throws:
- SQLException
     - if the function settings table does not exist in the data mining server
     - if the function settings name is invalid
java.sql.SQLException

restore

public static MiningFunctionSettings restore(Connection dmsConn,
                                             java.lang.String settingsName)
                                                                       throws java.sql.SQLException,
InvalidArgumentException,
ODMException
Returns an instance of MiningFunctionSettings with the specified name persisted in the data mining server given a connection to the data mining server and the function settings name.
Parameters:
dmsConn - A connection to the data mining server
settingsName - The name of the function settings to be restored
Returns:
MiningFunctionSettings - An instance of MiningFunctionSettings restored
Throws:
- SQLException
     - if the function settings table does not exist in the data mining server
     - if the function settings name is invalid
java.sql.SQLException
InvalidArgumentException
ODMException

restorePastVersion

public static MiningFunctionSettings restorePastVersion(java.sql.Connection dbConn,
                                                        java.lang.String settingsName)
                                                                                  throws java.sql.SQLException
java.sql.SQLException

restorePastVersion

public static MiningFunctionSettings restorePastVersion(Connection dmsConn,
                                                        java.lang.String settingsName)
                                                                                  throws java.sql.SQLException,
InvalidArgumentException,
ODMException
java.sql.SQLException
InvalidArgumentException
ODMException

remove

public static boolean remove(Connection dmsConn,
                             java.lang.String settingsName)
                      throws java.sql.SQLException,
MiningObjectException,
InvalidArgumentException,
ODMException
Removes the specified mining function settings from the data mining server.
Parameters:
dmsConn - A connection to the data mining server
settingsName - The name of the mining function settings to be removed
Returns:
boolean - A flag indicating whether the specified object has been removed successfully.
Throws:
InvalidArgumentException -
  • dmsConn is null, or
  • settingsName is null.
ODMException - when settingsName is empty or exceeds 30 bytes in length.
java.sql.SQLException - when an error occurs during the removal
MiningObjectException - when the mining function settings does not exist in the data mining server

rename

public static boolean rename(Connection dmsConn,
                             java.lang.String oldObjectName,
                             java.lang.String newObjectName)
                      throws java.sql.SQLException,
InvalidArgumentException,
ODMException
Renames the specified mining function settings.
Parameters:
dmsConn - A connection to the data mining server
oldObjectName - The name of the mining function settings to be renamed
newObjectName - The new name of the mining function settings to be assigned
Returns:
boolean - A flag indicating whether the specified object has been renamed successfully.
Throws:
InvalidArgumentException -
  • dmsConn is null, or
  • oldObjectName is null,
  • newObjectName is null.
ODMException - when oldObjectName or newObjectName is empty or length exceeds the limit.
java.sql.SQLException - when an error occurs during the rename operation
Since:
10.1

adjustAttributeUsage

public void adjustAttributeUsage(java.lang.String[] attributesList,
AttributeUsage newAttrUsage)
                          throws InvalidArgumentException
Adjusts the data usage specification for the specified mining attributes to have new attribute usage.
Parameters:
attributesList - The names of the attributes to have new attribute usage
Throws:
InvalidArgumentException - thrown when any of the arguments is null or any of the specified mining attribute does not exist.
Since:
9.2.0
See Also:
AttributeUsage

adjustDataPreparationStatus

public void adjustDataPreparationStatus(java.lang.String[] attributesList,
DataPreparationStatus newPreparationStatus)
                                 throws InvalidArgumentException
Adjusts the data usage specification based for the specified mining attributes to have new data preparation status.
Parameters:
attributesList - The names of the mining attributes to have new data preparation status
newPreparationStatus - The new data preparation status of the attributes
Throws:
InvalidArgumentException - any of the arguments is null or any of the specified mining attribute does not exist.
Since:
9.2.0
See Also:
AttributeUsage

adjustAttributeUsage

public void adjustAttributeUsage(java.lang.String[] attributesList,
UsageAdjustment newAttrUsage)
                          throws InvalidArgumentException,
MiningObjectException
Adjusts the data usage specification for the specified mining attributes based on the specified usage adjustment.
Parameters:
attributesList - The names of the mining attributes to be changed
newAttrUsage - Specifies how the new usage of the mining attributes are to be changed
Throws:
InvalidArgumentException - any of the arguments is null or any of the specified mining attribute does not exist.
MiningObjectException
Since:
9.2.0
See Also:
UsageAdjustment, AttributeUsage

adjustAttributesType

public void adjustAttributesType(java.lang.String[] attributesList,
AttributeType newAttrType)
                          throws InvalidArgumentException
Adjusts the attribute type based for the specified mining attributes to have a new attribute type.
Parameters:
attributesList - The names of the attributes to have new attribute type
Throws:
InvalidArgumentException - any of the arguments is null or any of the specified mining attribute does not exist
Since:
10.1.0

adjustSparsitySpecification

public void adjustSparsitySpecification(java.lang.String[] attributesOverRideList,
SparsitySpecification defaultSparsitySpecification)
                                 throws MiningObjectException
Adjusts the sparsity specification based for the specified mining attributes to have new sparsity specification.
Parameters:
attributesOverRideList - The names of the mining attributes to have new sparsity specification value that is opposite to the default value
defaultSparsitySpecification - Defaut sparsity specification value
Throws:
MiningObjectException - if mining attribute is empty.
Since:
10.1.0
See Also:
SparsitySpecification

activateAll

public void activateAll()
                 throws MiningObjectException
Changes all mining attributes to have active attribute usage.
MiningObjectException
Since:
9.2.0
See Also:
AttributeUsage

getMiningAttributes

public MiningAttribute[] getMiningAttributes(AttributeUsage usage,
AttributeType attrType)
Collects mining attributes of specific usage type based on the specified attribute type.
Returns:
MiningAttribute[] the mining attributes

getSettingsID

public java.lang.Integer getSettingsID(java.sql.Connection dbConn,
                                       java.lang.String settingsName)

store

public void store(Connection dmsConn,
                  java.lang.String settingsName)
           throws java.sql.SQLException,
                  java.io.IOException,
InvalidArgumentException,
MiningObjectException,
ODMException
Persists this instance of mining function settings with the given name in the specified ODM schema. The name must be unique within a user schema.

An instance of mining function settings may be modified until store method is executed on it. When a mining function settings object is restored, its initial status is mutable. However, if a user wants to store this instance in the data mining server, a different name must be assigned to this instance. This means that once a mining function settings object is persisted with a name in the data mining server, it is immutable.

Parameters:
dmsConn - A connection to the data mining server
settingsName - The name of the mining function settings to be stored
Throws:
InvalidArgumentException -
  • dmsConn is null, or
  • settingsName is null.
ODMException - when settingsName is empty or length exceeds the maximum limit.
MiningObjectException
java.sql.SQLException - when an error occurs during the execution of store.
java.io.IOException - Inherited exception

storeInternal

public java.lang.Integer storeInternal(java.sql.Connection dbConn,
                                       java.lang.String settingsName)
                                throws java.sql.SQLException,
ODMException
java.sql.SQLException
ODMException

Copyright © 2003 Oracle Corporation. All Rights Reserved.