Ignore:
Timestamp:
02/06/12 18:54:30 (2 years ago)
Author:
tomazc <tomaz.curk@…>
Branch:
default
rebase_source:
b99444d58db5b349760fbe84c6ceceb63493857a
Message:

Orange.feature.imputation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/reference/rst/Orange.feature.imputation.rst

    r9809 r9810  
    263263    TYPE: SIMPLE-T -> SIMPLE-T 
    264264 
    265 Seemingly, the two examples have the same attributes (with 
    266 :samp:`imputed` having a few additional ones). Comparing 
    267 :samp:`original.domain[0] == imputed.domain[0]` will result in False. While 
    268 the names are same, they represent different features. Writting, 
    269 :samp:`imputed[i]`  would fail since :samp:`imputed` has no attribute 
    270 :samp:`i`, but it has an attribute with the same name. Using 
    271 :samp:`i.name` to index the attributes of 
    272 :samp:`imputed` will work, yet it is not fast. If a frequently used, it is 
    273 better to compute the index with :samp:`imputed.domain.index(i.name)`. 
     265The two examples have the same attribute, :samp:`imputed` having a few 
     266additional ones. Comparing :samp:`original.domain[0] == imputed.domain[0]` 
     267will result in False. While the names are same, they represent different 
     268features. Writting, :samp:`imputed[i]`  would fail since :samp:`imputed` has 
     269 no attribute :samp:`i`, but it has an attribute with the same name. Using 
     270:samp:`i.name` to index the attributes of :samp:`imputed` will work, 
     271yet it is not fast. If a frequently used, it is better to compute the index 
     272with :samp:`imputed.domain.index(i.name)`. 
    274273 
    275274For continuous features, there is an additional feature with name prefix 
     
    308307 
    309308Details may vary from algorithm to algorithm, but this is how the imputation 
    310 is generally used. When write user-defined learners, 
     309is generally used. When writing user-defined learners, 
    311310it is recommended to use imputation according to the described procedure. 
    312311 
     
    315314 
    316315Imputation is used by learning algorithms and other methods that are not 
    317 capable of handling unknown values. It will impute missing values, 
    318 call the learner and, if imputation is also needed by the classifier, 
    319 it will wrap the classifier into a wrapper that imputes missing values in 
    320 examples to classify. 
     316capable of handling unknown values. It imputes missing values, 
     317calls the learner and, if imputation is also needed by the classifier, 
     318it wraps the classifier that imputes missing values in instances to classify. 
    321319 
    322320.. literalinclude:: code/imputation-logreg.py 
     
    330328Even so, the module is somewhat redundant, as all learners that cannot handle 
    331329missing values should, in principle, provide the slots for imputer constructor. 
    332 For instance, :obj:`Orange.classification.logreg.LogRegLearner` has an attribute 
     330For instance, :obj:`Orange.classification.logreg.LogRegLearner` has an 
     331attribute 
    333332:obj:`Orange.classification.logreg.LogRegLearner.imputerConstructor`, and even 
    334333if you don't set it, it will do some imputation by default. 
Note: See TracChangeset for help on using the changeset viewer.