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

B12276-01

oracle.dmt.odm.settings.function
Class ClassificationFunctionSettings

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

public class ClassificationFunctionSettings
extends SupervisedFunctionSettings

An instance of ClassificationFunctionSettings describes the settings necessary to build a classification model.

Given a pre-determined set of class values in a target attribute, classification analyzes a training dataset to determine to which class a given data record belongs. Classification has been used in customer segmentation, business modeling, and credit analysis.

In ODM 9.2.0, two classification algorithms are supported: Naive Bayes and Adaptive Bayes Network (decision tree). If no algorithm is specified, the Naive Bayes algorithm is chosen by default.

See Also:
AdaptiveBayesNetworkSettings, NaiveBayesSettings, Serialized Form

Constructor Summary
ClassificationFunctionSettings(float accuracy, LogicalDataSpecification lds, DataUsageSpecification dus)
          Deprecated. As of ODM 9.2.0. The parameter accuracy is not supported. Use other constructor without accuracy parameter.
ClassificationFunctionSettings(float accuracy, LogicalDataSpecification lds, DataUsageSpecification dus, MiningAlgorithmSettings algorithm)
          Deprecated. As of ODM 9.2.0. The parameter accuracy is not supported. Use other constructor without accuracy parameter.
ClassificationFunctionSettings(LogicalDataSpecification lds, DataUsageSpecification dus)
          Creates an instance of ClassificationFunctionSettings object.
ClassificationFunctionSettings(LogicalDataSpecification lds, DataUsageSpecification dus, MiningAlgorithmSettings algorithm)
          Creates an instance of ClassificationFunctionSettings object.

 

Method Summary
static ClassificationFunctionSettings create(Connection dmsConn, MiningAlgorithmSettings algorithm, PhysicalDataSpecification pdsDataSpec, java.lang.String sTargetAttrName, AttributeType atTargetAttributeType, DataPreparationStatus dpStatus)
          Creates an instance of ClassificationFunctionSettings from the specified parameters.
 CategoryMatrix getCostMatrix()
          Returns the cost matrix set in this mining function settings.
 PriorProbabilities getPriors()
          Returns the prior probabilities of the input data set in this function settings.
 MiningAttribute getTargetAttribute()
          Returns the target attribute set in this functional settings.
 void setCostMatrix(CategoryMatrix costMatrix)
          Sets the cost matrix to be used for test operation.
 void setPriors(PriorProbabilities prior)
          Sets the prior probabilities of the input data.
 void validate()
          Validates the contents of this mining function settings.

 

Methods inherited from class oracle.dmt.odm.settings.function.SupervisedFunctionSettings
getDesiredAccuracy, getPredictorAttributes, getTargetAttributes, getUnpreparedPredictorAttributes, setDesiredAccuracy

 

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

 

Constructor Detail

ClassificationFunctionSettings

public ClassificationFunctionSettings(float accuracy,
LogicalDataSpecification lds,
DataUsageSpecification dus,
MiningAlgorithmSettings algorithm)
                               throws InvalidArgumentException
Deprecated. As of ODM 9.2.0. The parameter accuracy is not supported. Use other constructor without accuracy parameter.
Creates an instance of ClassificationFunctionSettings object.
Parameters:
accuracy - The desired minimum accuracy of the classification model to be built
lds - An instance of LogicalDataSpecification that specifies the logical representation of the input data 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 a classification algorithm to be used for model building. If null, a default algorithm is chosen by the DMS.
Throws:
InvalidArgumentException -

ClassificationFunctionSettings

public ClassificationFunctionSettings(LogicalDataSpecification lds,
DataUsageSpecification dus,
MiningAlgorithmSettings algorithm)
                               throws InvalidArgumentException
Creates an instance of ClassificationFunctionSettings object.
Parameters:
lds - An instance of LogicalDataSpecification that specifies the logical representation of the input data 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 a classification algorithm to be used for model building. If null, a default algorithm is chosen by the DMS.
Throws:
InvalidArgumentException - when lds is null.
Since:
9.2.0

ClassificationFunctionSettings

public ClassificationFunctionSettings(float accuracy,
LogicalDataSpecification lds,
DataUsageSpecification dus)
                               throws InvalidArgumentException
Deprecated. As of ODM 9.2.0. The parameter accuracy is not supported. Use other constructor without accuracy parameter.
Creates an instance of ClassificationFunctionSettings object. A default algorithm settings is selected by the DMS, and applied to model building.
Parameters:
accuracy - The desired minimum accuracy of the classification model to be built
lds - An instance of LogicalDataSpecification that specifies the logical representation of the input data used for model building
dus - An instance of DataUsageSpecification that defines how the logical data is to be used for model building
Throws:
InvalidArgumentException -

ClassificationFunctionSettings

public ClassificationFunctionSettings(LogicalDataSpecification lds,
DataUsageSpecification dus)
                               throws InvalidArgumentException
Creates an instance of ClassificationFunctionSettings object. A default algorithm settings is selected by the DMS, and applied to model building.
Parameters:
lds - An instance of LogicalDataSpecification that specifies the logical representation of the input data 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

getTargetAttribute

public MiningAttribute getTargetAttribute()
                                                       throws MiningObjectException
Returns the target attribute set in this functional settings.
Returns:
The target mining attribute.
MiningObjectException
See Also:
AttributeUsage

validate

public void validate()
              throws MiningObjectException
Validates the contents of this mining function settings.
Throws:
MiningObjectException - when this mining function settings is invalid

setPriors

public void setPriors(PriorProbabilities prior)
               throws InvalidArgumentException
Sets the prior probabilities of the input data.
Parameters:
prior - The prior probabilities to be set
Throws:
InvalidArgumentException - when prior is null.
Since:
9.2.0
See Also:
PriorProbabilities

getPriors

public PriorProbabilities getPriors()
Returns the prior probabilities of the input data set in this function settings.
Returns:
The prior probabilities
Since:
9.2.0
See Also:
PriorProbabilities

setCostMatrix

public void setCostMatrix(CategoryMatrix costMatrix)
                   throws InvalidArgumentException
Sets the cost matrix to be used for test operation.
Parameters:
costMatrix - - The cost matrix to be set
Throws:
InvalidArgumentException - when costMatrix is null.
Since:
9.2.0
See Also:
CategoryMatrix

getCostMatrix

public CategoryMatrix getCostMatrix()
Returns the cost matrix set in this mining function settings.
Returns:
The cost matrix
Since:
9.2.0
See Also:
CategoryMatrix

create

public static ClassificationFunctionSettings create(Connection dmsConn,
MiningAlgorithmSettings algorithm,
PhysicalDataSpecification pdsDataSpec,
                                                    java.lang.String sTargetAttrName,
AttributeType atTargetAttributeType,
DataPreparationStatus dpStatus)
                                                                              throws java.sql.SQLException,
InvalidArgumentException,
MiningObjectException,
ODMException
Creates an instance of ClassificationFunctionSettings from the specified parameters.
Parameters:
dmsConn - A connection to the data mining server
algorithm - An instance of MiningAlgorithmSettings
pdsDataSpec - An instance of PhysicalDataSpecification that specifies the input data
sTargetAttrName - The name of the target attribute
atTargetAttributeType - The type of the target attribute. Only string or integer type is allowed.
dpStatus - An instance of DataPreparationStatus that indicates whether the data is discretized.
Returns:
ClassificationFunctionSettings - A created instance of classification function settings
Throws:
InvalidArgumentException -
  • if dmsConn is null,
  • if pdsDataSpec is null,
  • if sTargetAttrName is null,
  • if atTargetAttributeType is null, or
  • if atTargetAttributeType is neither string nor integer.
ODMException - when sTargetAttrName is empty or exceeds 30 bytes in length
java.sql.SQLException - when an error occurs during access to the input data
MiningObjectException - inherited exception

Copyright © 2003 Oracle Corporation. All Rights Reserved.