source: orange/docs/widgets/rst/classify/naivebayes.rst @ 11050:e3c4699ca155

Revision 11050:e3c4699ca155, 3.0 KB checked in by Miha Stajdohar <miha.stajdohar@…>, 16 months ago (diff)

Widget docs From HTML to Sphinx.

Line 
1.. _Naive Bayes:
2
3Naive Bayesian Learner
4======================
5
6.. image:: ../icons/NaiveBayes.png
7
8Naive Bayesian Learner
9
10Signals
11-------
12
13Inputs:
14
15
16   - Examples (ExampleTable)
17      A table with training examples
18
19
20Outputs:
21
22   - Learner
23      The naive Bayesian learning algorithm with settings as specified in the dialog.
24
25   - Naive Bayesian Classifier
26      Trained classifier (a subtype of Classifier)
27
28
29Signal :code:`Naive Bayesian Classifier` sends data only if the learning data (signal :code:`Examples` is present.
30
31Description
32-----------
33
34This widget provides a graphical interface to the Naive Bayesian classifier.
35
36As all widgets for classification, this widget provides a learner and classifier on the output. Learner is a learning algorithm with settings as specified by the user. It can be fed into widgets for testing learners, for instance :code:`Test Learners`. Classifier is a Naive Bayesian Classifier (a subtype of a general classifier), built from the training examples on the input. If examples are not given, there is no classifier on the output.
37
38.. image:: images/NaiveBayes.png
39   :alt: NaiveBayes Widget
40
41Learner can be given a name under which it will appear in, say, :code:`Test Learners`. The default name is "Naive Bayes".
42
43Next come the probability estimators. :obj:`Prior` sets the method used for estimating prior class probabilities from the data. You can use either :obj:`Relative frequency` or the :obj:`Laplace estimate`. :obj:`Conditional (for discrete)` sets the method for estimating conditional probabilities, besides the above two, conditional probabilities can be estimated using the :obj:`m-estimate`; in this case the value of m should be given as the :obj:`Parameter for m-estimate`. By setting it to :obj:`&lt;same as above&gt;` the classifier will use the same method as for estimating prior probabilities.
44
45Conditional probabilities for continuous attributes are estimated using LOESS. :obj:`Size of LOESS window` sets the proportion of points in the window; higher numbers mean more smoothing. :obj:`LOESS sample points` sets the number of points in which the function is sampled.
46
47If the class is binary, the classification accuracy may be increased considerably by letting the learner find the optimal classification threshold (option :obj:`Adjust threshold`). The threshold is computed from the training data. If left unchecked, the usual threshold of 0.5 is used.
48
49When you change one or more settings, you need to push :obj:`Apply`; this will put the new learner on the output and, if the training examples are given, construct a new classifier and output it as well.
50
51
52Examples
53--------
54
55There are two typical uses of this widget. First, you may want to induce the model and check what it looks like in a `Nomogram <Nomogram.htm>`_.
56
57.. image:: images/NaiveBayes-SchemaClassifier.png
58   :alt: Naive Bayesian Classifier - Schema with a Classifier
59
60The second schema compares the results of Naive Bayesian learner with another learner, a C4.5 tree.
61
62.. image:: images/C4.5-SchemaLearner.png
63   :alt: Naive Bayesian Classifier - Schema with a Learner
Note: See TracBrowser for help on using the repository browser.