Class NaiveBayesClassifierEx3

java.lang.Object
com.imsl.test.example.datamining.NaiveBayesClassifierEx3

public class NaiveBayesClassifierEx3 extends Object

Trains a classifier with a user supplied probability function.

This example is similar to NaiveBayesClassifierEx1, where we train a classifier on Fisher's Iris data using 140 of the 150 continuous patterns, and then classify ten remaining plants using their sepal and petal measurements.

Instead of using the NormalDistribution class, a user supplied normal (Gaussian) distribution is supplied directly. Rather than calculating the means and standard deviations from the data, as is done by the NormalDistribution's eval(double[]) method, the user supplied class requires the means and standard deviations in the class constructor. The output is the same as in NaiveBayesClassifierEx1, since the means and standard deviations in this example are simply rounded means and standard deviations of the actual data subset by target classifications.

See Also:
  • Constructor Details

    • NaiveBayesClassifierEx3

      public NaiveBayesClassifierEx3()
  • Method Details