Ignore:
Timestamp:
03/19/12 12:14:20 (2 years ago)
Author:
markotoplak
Branch:
default
rebase_source:
92659cf777626f5bc411357989a821dd2083e466
Message:

Moved deprecation functions, progress bar support and environ into Orange.utils. Orange imports cleanly, although it is not tested yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/classification/svm/__init__.py

    r10578 r10580  
    9696    Epsilon_SVR = _SVMLearner.Epsilon_SVR 
    9797 
    98     @Orange.misc.deprecated_keywords({"kernelFunc": "kernel_func"}) 
     98    @Orange.utils.deprecated_keywords({"kernelFunc": "kernel_func"}) 
    9999    def __init__(self, svm_type=Nu_SVC, kernel_type=kernels.RBF, 
    100100                 kernel_func=None, C=1.0, nu=0.5, p=0.1, gamma=0.0, degree=3, 
     
    180180        return self.learner(data) 
    181181 
    182     @Orange.misc.deprecated_keywords({"progressCallback": "progress_callback"}) 
     182    @Orange.utils.deprecated_keywords({"progressCallback": "progress_callback"}) 
    183183    def tune_parameters(self, data, parameters=None, folds=5, verbose=0, 
    184184                       progress_callback=None): 
     
    247247        return data.translate(newdomain) 
    248248 
    249 SVMLearner = Orange.misc.deprecated_members({ 
     249SVMLearner = Orange.utils.deprecated_members({ 
    250250    "learnClassifier": "learn_classifier", 
    251251    "tuneParameters": "tune_parameters", 
     
    429429         
    430430 
    431 SVMClassifierWrapper = Orange.misc.deprecated_members({ 
     431SVMClassifierWrapper = Orange.utils.deprecated_members({ 
    432432    "classDistribution": "class_distribution", 
    433433    "getDecisionValues": "get_decision_values", 
     
    443443    """ 
    444444 
    445     @Orange.misc.deprecated_keywords({"useNonMeta": "use_non_meta"}) 
     445    @Orange.utils.deprecated_keywords({"useNonMeta": "use_non_meta"}) 
    446446    def __init__(self, **kwds): 
    447447        SVMLearner.__init__(self, **kwds) 
     
    763763                            kernels.Linear, normalization=False) 
    764764 
    765     @Orange.misc.deprecated_keywords({"progressCallback": "progress_callback", "stopAt": "stop_at" }) 
     765    @Orange.utils.deprecated_keywords({"progressCallback": "progress_callback", "stopAt": "stop_at" }) 
    766766    def get_attr_scores(self, data, stop_at=0, progress_callback=None): 
    767767        """Return a dictionary mapping attributes to scores. 
     
    793793        return attrScores 
    794794 
    795     @Orange.misc.deprecated_keywords({"numSelected": "num_selected", "progressCallback": "progress_callback"}) 
     795    @Orange.utils.deprecated_keywords({"numSelected": "num_selected", "progressCallback": "progress_callback"}) 
    796796    def __call__(self, data, num_selected=20, progress_callback=None): 
    797797        """Return a new dataset with only `num_selected` best scoring attributes 
     
    813813        return data 
    814814 
    815 RFE = Orange.misc.deprecated_members({ 
     815RFE = Orange.utils.deprecated_members({ 
    816816    "getAttrScores": "get_attr_scores"}, 
    817817    wrap_methods=["get_attr_scores", "__call__"])(RFE) 
Note: See TracChangeset for help on using the changeset viewer.