Changeset 8867:25ede33f7668 in orange


Ignore:
Timestamp:
08/31/11 16:34:02 (3 years ago)
Author:
markotoplak
Branch:
default
Convert:
8a5196d9401ad3a030e6b2792e276d4d472a1291
Message:

Orange.classification.bayes documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/doc/Orange/rst/Orange.classification.bayes.rst

    r8865 r8867  
    1010********************************** 
    1111 
    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. 
     12A `Naive Bayes classifier 
     13<http://en.wikipedia.org/wiki/Naive_Bayes_classifier>`_ is a simple 
     14probabilistic classifier that estimates conditional probabilities of the 
     15dependant variable from training data and uses them for classification 
     16of new data instances. The algorithm is very fast for discrete features, but 
     17runs slower for continuous features. 
    1718 
    1819The following example demonstrates a straightforward invocation of 
    19 this algorithm (`bayes-run.py`_, uses `titanic.tab`_): 
     20this algorithm: 
    2021 
    2122.. literalinclude:: code/bayes-run.py 
     
    3637 
    3738:obj:`NaiveLearner` can estimate probabilities using relative frequencies or 
    38 m-estimate (`bayes-mestimate.py`_, uses `lenses.tab`_): 
     39m-estimate: 
    3940 
    4041.. literalinclude:: code/bayes-mestimate.py 
    4142    :lines: 7- 
    4243 
    43 Observing conditional probabilities in an m-estimate based classifier shows a 
     44Conditional probabilities in an m-estimate based classifier show a 
    4445shift 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 (`bayes-thresholdAdjustment.py`_, uses `adult-sample.tab`_): 
     46relative frequencies were used. The change in error estimation did 
     47not have any effect on apriori probabilities: 
    4848 
    4949.. literalinclude:: code/bayes-thresholdAdjustment.py 
    5050    :lines: 7- 
    5151 
    52 Setting adjustThreshold parameter can sometimes improve the results. Those are 
    53 the classification accuracies of 10-fold cross-validation of a normal naive 
     52Setting :obj:`~NaiveLearner.adjust_threshold` can improve the results. 
     53The classification accuracies of 10-fold cross-validation of a normal naive 
    5454bayesian classifier, and one with an adjusted threshold:: 
    5555 
    5656    [0.7901746265516516, 0.8280138859667578] 
    5757 
    58 Probabilities for continuous features are estimated with \ 
     58Probability distributions for continuous features are estimated with \ 
    5959:class:`Orange.statistics.estimate.Loess`. 
    60 (`bayes-plot-iris.py`_, uses `iris.tab`_): 
    6160 
    6261.. literalinclude:: code/bayes-plot-iris.py 
     
    71705.4 and 6.3. 
    7271 
    73  
    7472.. _bayes-run.py: code/bayes-run.py 
    7573.. _bayes-thresholdAdjustment.py: code/bayes-thresholdAdjustment.py 
Note: See TracChangeset for help on using the changeset viewer.