Ignore:
Timestamp:
03/15/11 16:24:04 (3 years ago)
Author:
jzbontar <jure.zbontar@…>
Branch:
default
Convert:
3d018f9c28d06302ffc546818d8c4952df770d2c
Message:

Rename camel case identifiers in logistic regression.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/doc/Orange/rst/code/logreg-stepwise.py

    r7609 r7747  
    33from Orange import * 
    44import Orange.evaluation.testing 
    5  
    6  
    7 def StepWiseFSS_Filter(examples=None, **kwds): 
    8     """Check function StepWiseFSS().""" 
    9  
    10     filter = apply(StepWiseFSS_Filter_class, (), kwds) 
    11     if examples: 
    12         return filter(examples) 
    13     else: 
    14         return filter 
    15  
    16  
    17 class StepWiseFSS_Filter_class: 
    18     def __init__(self, addCrit=0.2, deleteCrit=0.3, numAttr=-1): 
    19         self.addCrit = addCrit 
    20         self.deleteCrit = deleteCrit 
    21         self.numAttr = numAttr 
    22  
    23     def __call__(self, examples): 
    24         feature = classification.logreg.StepWiseFSS(examples, 
    25           addCrit=self.addCrit, deleteCrit=self.deleteCrit, 
    26           numAttr=self.numAttr) 
    27         return examples.select(data.Domain(feature, examples.domain.classVar)) 
    285 
    296 
     
    3411  classification.logreg.LogRegLearner(name='logistic', removeSingular=1), 
    3512  feature.selection.FilteredLearner(lr, 
    36      filter=StepWiseFSS_Filter(addCrit=0.05, deleteCrit=0.9), 
     13     filter=Orange.classification.logreg.StepWiseFSSFilter(addCrit=0.05, deleteCrit=0.9), 
    3714     name='filtered') 
    3815) 
Note: See TracChangeset for help on using the changeset viewer.