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, SupervisedFunctionSettings

public abstract class MiningFunctionSettings
extends 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
TypeMethod
 void activateAll()
          Changes all mining attributes to have active attribute usage.
 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.
 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.
 MiningFunction getMiningFunction()
          Returns the kind of mining function of this function settings.
 java.lang.String getName()
          Returns the name of this mining function settings.
 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 void remove(Connection dmsConn, java.lang.String settingsName)
          Removes the specified mining function settings from the data mining server.
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.
 void setDataUsageSpecification(DataUsageSpecification dus)
          Sets a data usage specification to this mining function settings.
 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.
 
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

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.
Parameters:
algorithm - A mining algorithm settings

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

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 data mining server.

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 exceeds 64 characters in length.
MiningObjectException -  
java.sql.SQLException - when an error occurs during the execution of store.
java.io.IOException - Inherited exception

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

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

remove

public static void 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
Throws:
InvalidArgumentException -
  • dmsConn is null, or
  • settingsName is null,
ODMException - when settingsName is empty or exceeds 64 characters 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

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.
Since:
9.2.0
See Also:
UsageAdjustment, AttributeUsage

activateAll

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