Safe HaskellSafe-Infered

NaiveBayes.NaiveBayes

Synopsis

Documentation

data NaiveBayes

This is a NaiveBayes object. It stores the classnames, priorprobabilities, distribution, dimensions, PosteriorFunctions are the list of probes for each of the features

Constructors

NaiveBayes 

Instances

Show NaiveBayes 

display :: NaiveBayes -> IO ()

fit :: PriorType -> Distribution -> DataSet -> NaiveBayes

fits the given data set to give the naive bayes object

posterior :: NaiveBayes -> FeatureVector -> ClassName -> Probability

Finds the probability of the featurevector for a given naive bayes object

predict :: NaiveBayes -> FeatureVector -> ClassName

Predicts the class a particular data point belongs to given the naive bayes object

predictMulti :: NaiveBayes -> [FeatureVector] -> [ClassName]

predicts the classes for a list of feature vectors