CategoryType - The output category type for the categorizer. Must implement equals and
hash code.DistributionType - The type of distribution that the distributionLearner produces.public static class VectorNaiveBayesCategorizer.Learner<CategoryType,DistributionType extends UnivariateProbabilityDensityFunction> extends AbstractCloneableSerializable implements SupervisedBatchLearner<Vectorizable,CategoryType,VectorNaiveBayesCategorizer<CategoryType,DistributionType>>
| Modifier and Type | Field and Description |
|---|---|
protected DistributionEstimator<? super java.lang.Double,? extends DistributionType> |
distributionEstimator
The distributionLearner for the distribution of each dimension of each category.
|
| Constructor and Description |
|---|
Learner()
Creates a new
BatchLearner with a null estimator. |
Learner(DistributionEstimator<? super java.lang.Double,? extends DistributionType> distributionEstimator)
Creates a new
BatchLearner with the given distribution
estimator. |
| Modifier and Type | Method and Description |
|---|---|
DistributionEstimator<? super java.lang.Double,? extends DistributionType> |
getDistributionEstimator()
Gets the estimation method for the distribution of each dimension of
each category.
|
VectorNaiveBayesCategorizer<CategoryType,DistributionType> |
learn(java.util.Collection<? extends InputOutputPair<? extends Vectorizable,CategoryType>> data)
The
learn method creates an object of ResultType using
data of type DataType, using some form of "learning" algorithm. |
void |
setDistributionEstimator(DistributionEstimator<? super java.lang.Double,? extends DistributionType> distributionEstimator)
Sets the estimation method for the distribution of each dimension of
each category.
|
cloneequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcloneprotected DistributionEstimator<? super java.lang.Double,? extends DistributionType extends UnivariateProbabilityDensityFunction> distributionEstimator
public Learner()
BatchLearner with a null estimator.public Learner(DistributionEstimator<? super java.lang.Double,? extends DistributionType> distributionEstimator)
BatchLearner with the given distribution
estimator.distributionEstimator - The estimator for the distribution of each dimension of each
category.public VectorNaiveBayesCategorizer<CategoryType,DistributionType> learn(java.util.Collection<? extends InputOutputPair<? extends Vectorizable,CategoryType>> data)
BatchLearnerlearn method creates an object of ResultType using
data of type DataType, using some form of "learning" algorithm.learn in interface BatchLearner<java.util.Collection<? extends InputOutputPair<? extends Vectorizable,CategoryType>>,VectorNaiveBayesCategorizer<CategoryType,DistributionType extends UnivariateProbabilityDensityFunction>>data - The data that the learning algorithm will use to create an
object of ResultType.public DistributionEstimator<? super java.lang.Double,? extends DistributionType> getDistributionEstimator()
public void setDistributionEstimator(DistributionEstimator<? super java.lang.Double,? extends DistributionType> distributionEstimator)
distributionEstimator - The estimator for the distribution of each dimension of each
category.