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

B12276-01

oracle.dmt.odm.settings.algorithm
Class NaiveBayesSettings

java.lang.Object
  |
  +--oracle.dmt.odm.MiningObject
        |
        +--oracle.dmt.odm.settings.algorithm.MiningAlgorithmSettings
              |
              +--oracle.dmt.odm.settings.algorithm.NaiveBayesSettings
All Implemented Interfaces:
java.io.Serializable

public class NaiveBayesSettings
extends MiningAlgorithmSettings

An instance of NaiveBayesSettings is used to specify settings for the Naive Bayes algorithm. Two settings are available: singleton threshold and pairwise threshold, as described below.

Since:
9.0.1
See Also:
Serialized Form

Constructor Summary
NaiveBayesSettings()
          Creates NaiveBayesSettings instance with the default singletonThreshold value of 0.01 and pairwiseThreshold value of 0.001
NaiveBayesSettings(float singletonThreshold, float pairwiseThreshold)
          Creates NaiveBayesSettings instance.

 

Method Summary
 float getPairwiseThreshold()
          Returns the pairwise threshold, a threshold on the count of the frequent item pairs.
 float getSingletonThreshold()
          Returns the singleton threshold, a threshold on the count of the frequent items.
 void setPairwiseThreshold(float pairwiseThreshold)
          Sets the pairwise threshold.
 void setSingletonThreshold(float singletonThreshold)
          Sets the singleton threshold.
 void validate()
          Validates the thresholds of the NaiveBayesSettings.

 

Methods inherited from class oracle.dmt.odm.settings.algorithm.MiningAlgorithmSettings
getMiningAlgorithm, getMiningAlgorithmName

 

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

 

Constructor Detail

NaiveBayesSettings

public NaiveBayesSettings(float singletonThreshold,
                          float pairwiseThreshold)
                   throws InvalidArgumentException
Creates NaiveBayesSettings instance. Setting the thresholds closer to 0 may result in a more accurate model, but it will take longer to build. Setting the thresholds closer to 1 may produce models faster, but with less accuracy. A reasonable starting point is 0.01 for singletonThreshold and 0.001 for pairwiseThreshold.
Throws:
InvalidArgumentException -

NaiveBayesSettings

public NaiveBayesSettings()
Creates NaiveBayesSettings instance with the default singletonThreshold value of 0.01 and pairwiseThreshold value of 0.001
Method Detail

getSingletonThreshold

public float getSingletonThreshold()
Returns the singleton threshold, a threshold on the count of the frequent items. An item is a frequent item if it is included in a sufficiently large number of transactions. The singleton threshold is expressed as a percentage of the number of profiles. Suppose that the total number of transactions where an item appears is k and the total number of profiles is P, and t is the singleton threshold expressed as a percentage of P (0.01 indicates 1 percent of P). Then, the item is a frequent item if k >= t*P.
Returns:
the singleton threshold

getPairwiseThreshold

public float getPairwiseThreshold()
Returns the pairwise threshold, a threshold on the count of the frequent item pairs. An item pair is a frequent item pair if the items in the pair are frequent items that occur together in a sufficiently large number of profiles. Suppose that two distinct items occur together in k profiles, the total number of profiles that include the frequent items is P, and t is the threshold expressed in percentage (0.01 indicates 1 percent of P). Then the pair is a frequent item pair if k >= t*P.
Returns:
The pairwise threshold

setPairwiseThreshold

public void setPairwiseThreshold(float pairwiseThreshold)
Sets the pairwise threshold.

setSingletonThreshold

public void setSingletonThreshold(float singletonThreshold)
Sets the singleton threshold.

validate

public void validate()
              throws MiningObjectException
Validates the thresholds of the NaiveBayesSettings.
Overrides:
validate in class MiningAlgorithmSettings
Throws:
MiningObjectException -
  • if singletonThreshold < 0 or singletonThreshold > 1, or
  • if pairwiseThreshold < 0 or pairwiseThreshold > 1.

Copyright © 2003 Oracle Corporation. All Rights Reserved.