gov.sandia.cognition.learning.algorithm.bayes
Class VectorNaiveBayesCategorizer.Learner<CategoryType,DistributionType extends UnivariateProbabilityDensityFunction>

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.algorithm.bayes.VectorNaiveBayesCategorizer.Learner<CategoryType,DistributionType>
Type Parameters:
CategoryType - The output category type for the categorizer. Must implement equals and hash code.
DistributionType - The type of distribution that the distributionLearner produces.
All Implemented Interfaces:
BatchLearner<Collection<? extends InputOutputPair<? extends Vectorizable,CategoryType>>,VectorNaiveBayesCategorizer<CategoryType,DistributionType>>, SupervisedBatchLearner<Vectorizable,CategoryType,VectorNaiveBayesCategorizer<CategoryType,DistributionType>>, CloneableSerializable, Serializable, Cloneable
Enclosing class:
VectorNaiveBayesCategorizer<CategoryType,DistributionType extends UnivariateProbabilityDensityFunction>

public static class VectorNaiveBayesCategorizer.Learner<CategoryType,DistributionType extends UnivariateProbabilityDensityFunction>
extends AbstractCloneableSerializable
implements SupervisedBatchLearner<Vectorizable,CategoryType,VectorNaiveBayesCategorizer<CategoryType,DistributionType>>

A supervised batch distributionLearner for a vector Naive Bayes categorizer.

See Also:
Serialized Form

Field Summary
protected  DistributionEstimator<? super Double,? extends DistributionType> distributionEstimator
          The distributionLearner for the distribution of each dimension of each category.
 
Constructor Summary
VectorNaiveBayesCategorizer.Learner()
          Creates a new BatchLearner with a null estimator.
VectorNaiveBayesCategorizer.Learner(DistributionEstimator<? super Double,? extends DistributionType> distributionEstimator)
          Creates a new BatchLearner with the given distribution estimator.
 
Method Summary
 DistributionEstimator<? super Double,? extends DistributionType> getDistributionEstimator()
          Gets the estimation method for the distribution of each dimension of each category.
 VectorNaiveBayesCategorizer<CategoryType,DistributionType> learn(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 Double,? extends DistributionType> distributionEstimator)
          Sets the estimation method for the distribution of each dimension of each category.
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Field Detail

distributionEstimator

protected DistributionEstimator<? super Double,? extends DistributionType extends UnivariateProbabilityDensityFunction> distributionEstimator
The distributionLearner for the distribution of each dimension of each category.

Constructor Detail

VectorNaiveBayesCategorizer.Learner

public VectorNaiveBayesCategorizer.Learner()
Creates a new BatchLearner with a null estimator.


VectorNaiveBayesCategorizer.Learner

public VectorNaiveBayesCategorizer.Learner(DistributionEstimator<? super Double,? extends DistributionType> distributionEstimator)
Creates a new BatchLearner with the given distribution estimator.

Parameters:
distributionEstimator - The estimator for the distribution of each dimension of each category.
Method Detail

learn

public VectorNaiveBayesCategorizer<CategoryType,DistributionType> learn(Collection<? extends InputOutputPair<? extends Vectorizable,CategoryType>> data)
Description copied from interface: BatchLearner
The learn method creates an object of ResultType using data of type DataType, using some form of "learning" algorithm.

Specified by:
learn in interface BatchLearner<Collection<? extends InputOutputPair<? extends Vectorizable,CategoryType>>,VectorNaiveBayesCategorizer<CategoryType,DistributionType extends UnivariateProbabilityDensityFunction>>
Parameters:
data - The data that the learning algorithm will use to create an object of ResultType.
Returns:
The object that is created based on the given data using the learning algorithm.

getDistributionEstimator

public DistributionEstimator<? super Double,? extends DistributionType> getDistributionEstimator()
Gets the estimation method for the distribution of each dimension of each category.

Returns:
The estimator for the distribution of each dimension of each category.

setDistributionEstimator

public void setDistributionEstimator(DistributionEstimator<? super Double,? extends DistributionType> distributionEstimator)
Sets the estimation method for the distribution of each dimension of each category.

Parameters:
distributionEstimator - The estimator for the distribution of each dimension of each category.