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
NaiveBayesSettings(float singletonThreshold,
float pairwiseThreshold)
Creates NaiveBayesSettings instance. |
Type | Method |
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 java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.5 for each threshold.
- Parameters:
singletonThreshold
- a threshold on the count of the frequent itemspairwiseThreshold
- a threshold on the count of the frequent item pairs- Throws:
InvalidArgumentException
- singletonThreshold < 0 or singletonThreshold > 1
- pairwiseThreshold < 0 or pairwiseThreshold > 1
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 that 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 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.
- Parameters:
pairwiseThreshold
- the threshold on the count of the frequent item pairs
setSingletonThreshold
public void setSingletonThreshold(float singletonThreshold)
- Sets the singleton threshold.
- Parameters:
float
- singletonThreshold a threshold on the count of the frequent items.
validate
public void validate()
throws MiningObjectException
- Validates the thresholds of the
NaiveBayesSettings
.
- Throws:
MiningObjectException
- singletonThreshold < 0 or singletonThreshold > 1
- pairwiseThreshold < 0 or pairwiseThreshold > 1