Changeset 7781:ccaa45ae34be in orange


Ignore:
Timestamp:
03/28/11 15:31:31 (3 years ago)
Author:
markotoplak
Branch:
default
Convert:
1309f19742af7c653fae63ce84549c22e4251344
Message:

orngImpute - moved compatibility decorator to the new code

Location:
orange
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/feature/imputation.py

    r7764 r7781  
    614614from orange import ImputerConstructor_asValue  
    615615 
     616import Orange.misc 
     617 
    616618class ImputeLearner(orange.Learner): 
    617     def __new__(cls, examples = None, weightID = 0, **keyw): 
     619    def __new__(cls, examples = None, weight_id = 0, **keyw): 
    618620        self = orange.Learner.__new__(cls, **keyw) 
    619621        self.dont_impute_classifier = False 
    620622        self.__dict__.update(keyw) 
    621623        if examples: 
    622             return self.__call__(examples, weightID) 
     624            return self.__call__(examples, weight_id) 
    623625        else: 
    624626            return self 
     
    633635            return ImputeClassifier(base_classifier, trained_imputer) 
    634636 
     637ImputeLearner = Orange.misc.deprecated_members( 
     638  { 
     639      "dontImputeClassifier": "dont_impute_classifier", 
     640      "imputerConstructor": "imputer_constructor", 
     641      "baseLearner": "base_learner", 
     642      "weightID": "weight_id" 
     643  })(ImputeLearner) 
     644 
     645 
    635646class ImputeClassifier(orange.Classifier): 
    636647    def __init__(self, base_classifier, imputer, **argkw): 
     
    641652    def __call__(self, ex, what=orange.GetValue): 
    642653        return self.base_classifier(self.imputer(ex), what) 
     654 
     655ImputeClassifier = Orange.misc.deprecated_members( 
     656  { 
     657      "baseClassifier": "base_classifier" 
     658  })(ImputeClassifier) 
  • orange/orngImpute.py

    r7779 r7781  
    1 import Orange 
    21from Orange.feature.imputation import * 
    3  
    4 ImputeLearner = Orange.misc.deprecated_members( 
    5   { 
    6       "dontImputeClassifier": "dont_impute_classifier", 
    7       "imputerConstructor": "imputer_constructor", 
    8       "baseLearner": "base_learner" 
    9   })(ImputeLearner) 
    10  
    11 ImputeClassifier = Orange.misc.deprecated_members( 
    12   { 
    13       "baseClassifier": "base_classifier" 
    14   })(ImputeClassifier) 
Note: See TracChangeset for help on using the changeset viewer.