Changeset 8867:25ede33f7668 in orange
 Timestamp:
 08/31/11 16:34:02 (3 years ago)
 Branch:
 default
 Convert:
 8a5196d9401ad3a030e6b2792e276d4d472a1291
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

orange/doc/Orange/rst/Orange.classification.bayes.rst
r8865 r8867 10 10 ********************************** 11 11 12 A `Naive Bayes classifier <http://en.wikipedia.org/wiki/Naive_Bayes_classifier>`_ 13 is a simple probabilistic classifier that estimates conditional probabilities of the dependant variable 14 from training data and uses them for classification of new data instances. The algorithm is very 15 fast if all features in the training data set are discrete. If a number of features are continuous, 16 though, the algorithm runs slower due to time spent to estimate continuous conditional distributions. 12 A `Naive Bayes classifier 13 <http://en.wikipedia.org/wiki/Naive_Bayes_classifier>`_ is a simple 14 probabilistic classifier that estimates conditional probabilities of the 15 dependant variable from training data and uses them for classification 16 of new data instances. The algorithm is very fast for discrete features, but 17 runs slower for continuous features. 17 18 18 19 The following example demonstrates a straightforward invocation of 19 this algorithm (`bayesrun.py`_, uses `titanic.tab`_):20 this algorithm: 20 21 21 22 .. literalinclude:: code/bayesrun.py … … 36 37 37 38 :obj:`NaiveLearner` can estimate probabilities using relative frequencies or 38 mestimate (`bayesmestimate.py`_, uses `lenses.tab`_):39 mestimate: 39 40 40 41 .. literalinclude:: code/bayesmestimate.py 41 42 :lines: 7 42 43 43 Observing conditional probabilities in an mestimate based classifier showsa44 Conditional probabilities in an mestimate based classifier show a 44 45 shift towards the second class  as compared to probabilities above, where 45 relative frequencies were used. Note that the change in error estimation did 46 not have any effect on apriori probabilities 47 (`bayesthresholdAdjustment.py`_, uses `adultsample.tab`_): 46 relative frequencies were used. The change in error estimation did 47 not have any effect on apriori probabilities: 48 48 49 49 .. literalinclude:: code/bayesthresholdAdjustment.py 50 50 :lines: 7 51 51 52 Setting adjustThreshold parameter can sometimes improve the results. Those are53 the classification accuracies of 10fold crossvalidation of a normal naive52 Setting :obj:`~NaiveLearner.adjust_threshold` can improve the results. 53 The classification accuracies of 10fold crossvalidation of a normal naive 54 54 bayesian classifier, and one with an adjusted threshold:: 55 55 56 56 [0.7901746265516516, 0.8280138859667578] 57 57 58 Probabilit ies for continuous features are estimated with \58 Probability distributions for continuous features are estimated with \ 59 59 :class:`Orange.statistics.estimate.Loess`. 60 (`bayesplotiris.py`_, uses `iris.tab`_):61 60 62 61 .. literalinclude:: code/bayesplotiris.py … … 71 70 5.4 and 6.3. 72 71 73 74 72 .. _bayesrun.py: code/bayesrun.py 75 73 .. _bayesthresholdAdjustment.py: code/bayesthresholdAdjustment.py
Note: See TracChangeset
for help on using the changeset viewer.