Changeset 7575:22be3e6304ca in orange


Ignore:
Timestamp:
02/04/11 23:35:29 (3 years ago)
Author:
blaz <blaz.zupan@…>
Branch:
default
Convert:
6bbc369bd12f79bfca358650413aafe9c21c9e60
Message:

minor changes, plus added some indexing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/classification/lookup.py

    r7567 r7575  
    11""" 
    22 
    3 ****** 
    4 Lookup 
    5 ****** 
    6  
    73.. index:: classification; lookup 
    84 
     5****************** 
     6Lookup classifiers 
     7****************** 
    98 
    109Lookup classifiers predict classes by looking into stored lists of 
     
    1615to instances in the table. 
    1716 
    18 The natural habitat of these classifiers is feature construction: 
     17.. index:: 
     18   single: feature construction; lookup classifiers 
     19 
     20A natural habitat for these classifiers is feature construction: 
    1921they usually reside in :obj:`getValueFrom` fields of constructed 
    2022features to facilitate their automatic computation. For instance, 
     
    2224features into a more useful subset that will only include the features 
    2325a, b, e, and features that will tell whether a and b are equal and 
    24 whether e is 1 (don't bother about the details, they follow later). 
    25  
    26 part of `lookup-lookup.py`_ (uses: `monks-1.tab`_): 
     26whether e is 1 (don't bother about the details, they follow later;  
     27`lookup-lookup.py`_, uses: `monks-1.tab`_): 
    2728 
    2829.. literalinclude:: code/lookup-lookup.py 
     
    5960 
    6061 
     62Classifiers by lookup table 
    6163=========================== 
    62 Classifiers by Lookup Table 
    63 =========================== 
     64 
     65.. index:: 
     66   single: classification; lookup table 
    6467 
    6568Although the above example used :obj:`ClassifierByLookupTable` as if it 
     
    185188 
    186189 
    187 ========================== 
    188 Classifier by ExampleTable 
    189 ========================== 
     190Classifier by data table 
     191======================== 
     192 
     193.. index:: 
     194   single: classification; data table 
    190195 
    191196:obj:`ClassifierByExampleTable` is used in similar contexts as 
    192197:obj:`ClassifierByLookupTable`. If you write, for instance, a 
    193 constructive induction algorithm, it is recommendable that the values 
     198constructive induction algorithm, it is recommended that the values 
    194199of the new feature are computed either by one of classifiers by lookup 
    195200table or by ClassifierByExampleTable, depending on the number of bound 
     
    305310There's something disturbing here. Although abe determines the value of 
    306311y2, abe.classVar is still y. Orange doesn't bother (the whole example 
    307 is artificial - you will seldom pack the entire dataset in an 
     312is artificial - you will seldom pack the entire data set in an 
    308313ClassifierByExampleTable...), so shouldn't you. But still, for the sake 
    309314of hygiene, you can conclude by 
     
    330335alternative call arguments, it offers an easy way to observe feature 
    331336interactions. For this purpose, we shall omit e, and construct a 
    332 ClassifierByExampleTable from a and b only. 
    333  
    334 part of `lookup-table.py`_ (uses: `monks-1.tab`_): 
     337ClassifierByExampleTable from a and b only (part of `lookup-table.py`_; uses: `monks-1.tab`_): 
    335338 
    336339.. literalinclude:: code/lookup-table.py 
Note: See TracChangeset for help on using the changeset viewer.