public class NaiveBayesClassifierEx3 extends Object
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.
| Modifier and Type | Class and Description |
|---|---|
static class |
NaiveBayesClassifierEx3.TestGaussFcn1
Defines the user supplied probability distribution.
|
| Constructor and Description |
|---|
NaiveBayesClassifierEx3() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(String[] args)
The main method for the example.
|
Copyright © 2020 Rogue Wave Software. All rights reserved.