Changeset 11630:5cfa71596edd in orange


Ignore:
Timestamp:
07/15/13 14:55:24 (9 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Fixed pickling of Boosted/Bagged/StackedLearner.

Location:
Orange/ensemble
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Orange/ensemble/bagging.py

    r10963 r11630  
    6969        return BaggedClassifier(classifiers=classifiers, name=self.name, \ 
    7070                    class_var=instances.domain.class_var) 
     71 
     72    def __reduce__(self): 
     73        return type(self), (self.learner,), dict(self.__dict__) 
    7174 
    7275BaggedLearner = Orange.utils.deprecated_members( 
  • Orange/ensemble/boosting.py

    r10654 r11630  
    9292        return BoostedClassifier(classifiers = classifiers, name=self.name,  
    9393            class_var=instances.domain.class_var) 
     94 
     95    def __reduce__(self): 
     96        return type(self), (self.learner,), dict(self.__dict__) 
     97 
    9498BoostedLearner = Orange.utils.deprecated_members({"examples":"instances", "classVar":"class_var", "weightId":"weigth_id", "origWeight":"orig_weight"})(BoostedLearner) 
    9599 
  • Orange/ensemble/stacking.py

    r10900 r11630  
    4646        return StackedClassifier(classifiers, meta_classifier, name=self.name) 
    4747 
     48    def __reduce__(self): 
     49        return type(self), (self.learner,), dict(self.__dict__) 
     50 
     51 
    4852class StackedClassifier: 
    4953    """ 
Note: See TracChangeset for help on using the changeset viewer.