Changeset 8122:6f0f1cbcc981 in orange


Ignore:
Timestamp:
07/28/11 17:21:57 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
6cc60151f562cda154d506f6f12247fbc5d893e2
Message:

Fixed 'classTreatment' parameter for Preprocessor_continuize.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/preprocess/__init__.py

    r8042 r8122  
    161161    __reduce__ = _orange__reduce__ 
    162162     
    163     def __init__(self, zeroBased=True, multinomialTreatment=orange.DomainContinuizer.NValues, normalizeContinuous=False, **kwargs): 
     163    def __init__(self, zeroBased=True, multinomialTreatment=orange.DomainContinuizer.NValues, 
     164                 continuousTreatment=orange.DomainContinuizer.Leave, 
     165                 classTreatment=orange.DomainContinuizer.Ignore, 
     166                 **kwargs): 
    164167        self.zeroBased = zeroBased 
    165168        self.multinomialTreatment = multinomialTreatment 
    166         self.normalizeContinuous = normalizeContinuous 
     169        self.continuousTreatment = continuousTreatment 
     170        self.classTreatment = classTreatment 
    167171             
    168172    def __call__(self, data, weightId=0): 
    169173        continuizer = orange.DomainContinuizer(zeroBased=self.zeroBased, 
    170174                                               multinomialTreatment=self.multinomialTreatment, 
    171                                                normalizeContinuous=self.normalizeContinuous, 
    172                                                classTreatment=orange.DomainContinuizer.Ignore) 
     175                                               continuousTreatment=self.continuousTreatment, 
     176                                               classTreatment=self.classTreatment) 
    173177        c_domain = continuizer(data, weightId) 
    174178        return data.translate(c_domain) 
Note: See TracChangeset for help on using the changeset viewer.