Changeset 9136:b714663d7f58 in orange


Ignore:
Timestamp:
10/21/11 15:43:35 (3 years ago)
Author:
markotoplak
Branch:
default
Convert:
d18ccb99872a8ba91dc5d197c991f60df869ea0b
Message:

fixed Orange.statistics.contingecy a little: examples were not showing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/statistics/contingency.py

    r8042 r9136  
    1717The example below loads the monks-1 data set and prints out the conditional 
    1818class distribution given the value of `e`. 
    19  
    20 .. _statistics-contingency: code/statistics-contingency.py 
    21  
    22 part of `statistics-contingency`_ (uses monks-1.tab) 
    2319 
    2420.. literalinclude:: code/statistics-contingency.py 
     
    248244        :rtype: float 
    249245 
    250     .. _statistics-contingency3.py: code/statistics-contingency3.py 
    251  
    252     part of `statistics-contingency3.py`_ (uses monks-1.tab) 
    253  
    254246    .. literalinclude:: code/statistics-contingency3.py 
    255247        :lines: 1-23 
     
    339331        :rtype: float 
    340332 
    341     .. _statistics-contingency4.py: code/statistics-contingency4.py 
    342  
    343333    .. literalinclude:: code/statistics-contingency4.py 
    344334        :lines: 1-27 
    345335 
    346     part of the output from `statistics-contingency4.py`_ (uses monk1.tab) 
    347      
    348336    The role of the feature and the class are reversed compared to 
    349337    :obj:`ClassVar`:: 
     
    356344     
    357345    Distributions given the class can be printed out by calling :meth:`p_attr`. 
    358      
    359     part of `statistics-contingency4.py`_ (uses monks-1.tab) 
    360346     
    361347    .. literalinclude:: code/statistics-contingency4.py 
     
    417403    bridges of different lengths. 
    418404     
    419     .. _statistics-contingency5.py: code/statistics-contingency5.py 
    420      
    421     part of `statistics-contingency5.py`_ (uses bridges.tab) 
    422      
    423405    .. literalinclude:: code/statistics-contingency5.py 
    424406        :lines: 1-17 
     
    483465    The following script prints the contingency tables for features 
    484466    "a", "b" and "e" for the dataset Monk 1. 
    485      
    486     .. _statistics-contingency8: code/statistics-contingency8.py 
    487      
    488     part of `statistics-contingency8`_ (uses monks-1.tab) 
    489      
     467         
    490468    .. literalinclude:: code/statistics-contingency8.py 
    491469        :lines: 9 
     
    494472    the conditional distributions of classes, given the value of the variable. 
    495473     
    496     .. _statistics-contingency8: code/statistics-contingency8.py 
    497      
    498     part of `statistics-contingency8`_ (uses monks-1.tab) 
    499      
    500474    .. literalinclude:: code/statistics-contingency8.py 
    501475        :lines: 12-  
    502476 
    503  
    504477.. _contcont: 
    505478 
     
    509482If the outer variable is continuous, the index must be one of the 
    510483values that do exist in the contingency table; other values raise an 
    511 exception:: 
    512  
    513     .. _statistics-contingency6: code/statistics-contingency6.py 
    514      
    515     part of `statistics-contingency6`_ (uses monks-1.tab) 
    516      
    517     .. literalinclude:: code/statistics-contingency6.py 
    518         :lines: 1-4,17- 
     484exception: 
     485 
     486.. literalinclude:: code/statistics-contingency6.py 
     487    :lines: 1-4,17- 
    519488 
    520489Since even rounding can be a problem, the only safe way to get the key 
     
    527496 
    528497For example, :obj:`ClassVar` on the iris dataset can return the 
    529 probability of the sepal length 5.5 for different classes:: 
    530  
    531     .. _statistics-contingency7: code/statistics-contingency7.py 
    532      
    533     part of `statistics-contingency7`_ (uses iris.tab) 
    534      
    535     .. literalinclude:: code/statistics-contingency7.py 
     498probability of the sepal length 5.5 for different classes: 
     499 
     500.. literalinclude:: code/statistics-contingency7.py 
    536501 
    537502The script outputs:: 
Note: See TracChangeset for help on using the changeset viewer.