|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
NaiveBayesModelDetail is built by
using Bayes' Theorem, combined with a ("naïve")
presumption of conditional independence, to build
a predictive model using counts of the occurrences
of each target value, and counts of the
co-occurrences of predictor values with target
values.
The values returned from
getTargetCount,
getPairCount, and
getProbability methods are derived
from the target-value and co-occurrence counts
that constitute the Naive Bayes predictive model.
ModelDetail| Method Summary | |
int |
getCount(java.lang.String attributeName,
java.lang.Object attributeValue)
Returns the number of occurrences in the training data of the specified attribute having the specified value, if NaiveBayesSettings.supportsCapability(NaiveBayesCapability.singletonCount) returns true. |
int |
getPairCount(java.lang.String attributeName,
java.lang.Object predictorValue,
java.lang.Object targetValue)
Returns the number of occurrences in the training data of the specified attribute having the specified value in a case in which the target attribute has the specified target value. |
double |
getPairProbability(java.lang.String attributeName,
java.lang.Object predictorValue,
java.lang.Object targetValue)
Returns the conditional probability of the specified predictor attribute having the specifiedvalue given that the target attribute has the specified target value. |
long |
getTargetCount(java.lang.Object targetValue)
Returns the count for the specified target value, i.e., the number of occurrences in the training data of the target attribute having the specified value. |
double |
getTargetProbability(java.lang.Object targetValue)
Returns the probability of the specified target value, i.e., the probability of the target to appear in the training data. |
| Method Detail |
public int getCount(java.lang.String attributeName,
java.lang.Object attributeValue)
throws JDMException
NaiveBayesSettings.supportsCapability(NaiveBayesCapability.singletonCount) returns true. Otherwise, the returned value is undefined.
attributeName - The logical attribute name to count the frequency of the specified value.attributeValue - The value of the attribute whose count is to be returned.
JDMException
public int getPairCount(java.lang.String attributeName,
java.lang.Object predictorValue,
java.lang.Object targetValue)
throws JDMException
attributeName - The logical attribute name to count the frequency of the specified pair.predictorValue - targetValue -
JDMException
public double getPairProbability(java.lang.String attributeName,
java.lang.Object predictorValue,
java.lang.Object targetValue)
throws JDMException
attributeName - The logical attribute name to count the probability of the specified pair.predictorValue - targetValue -
JDMException
public long getTargetCount(java.lang.Object targetValue)
throws JDMException
targetValue - The target value whose count is to be returned.
JDMException
public double getTargetProbability(java.lang.Object targetValue)
throws JDMException
targetValue - The target value whose count is to be returned.
JDMException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||