Changeset 10654:cd73789785b5 in orange


Ignore:
Timestamp:
03/27/12 10:53:01 (2 years ago)
Author:
markotoplak
Branch:
default
rebase_source:
f0d00da835a43858163d453828a9f86c79100449
Message:

Moved selection from misc to utils.

Files:
8 edited
1 moved

Legend:

Unmodified
Added
Removed
  • Orange/__init__.py

    r10651 r10654  
    2626        alreadyWarned = True 
    2727 
    28 _import("misc") 
     28_import("utils") 
     29 
    2930_import("data") 
    3031_import("data.io") 
     
    125126 
    126127_import("misc") 
    127 _import("misc.selection") 
    128128 
    129129_import("utils") #TODO hide utils from the user 
  • Orange/ensemble/boosting.py

    r10580 r10654  
    135135        for c, e in self.classifiers: 
    136136            votes[int(c(instance))] += e 
    137         index = Orange.misc.selection.select_best_index(votes) 
     137        index = Orange.utils.selection.select_best_index(votes) 
    138138        # TODO 
    139139        value = Orange.data.Value(self.class_var, index) 
  • Orange/fixes/fix_changed_names.py

    r10581 r10654  
    408408 
    409409           # Orange.selection 
    410            "orngMisc.BestOnTheFly":"Orange.misc.selection.BestOnTheFly", 
    411            "orngMisc.selectBest":"Orange.misc.selection.select_best", 
    412            "orngMisc.selectBestIndex":"Orange.misc.selection.select_best_index", 
    413            "orngMisc.compare2_firstBigger":"Orange.misc.selection.compare_first_bigger", 
    414            "orngMisc.compare2_firstSmaller":"Orange.misc.selection.compare_first_smaller", 
    415            "orngMisc.compare2_lastBigger":"Orange.misc.selection.compare_last_bigger", 
    416            "orngMisc.compare2_lastSmaller":"Orange.misc.selection.compare_last_smaller", 
    417            "orngMisc.compare2_bigger":"Orange.misc.selection.compare_bigger", 
    418            "orngMisc.compare2_smaller":"Orange.misc.selection.compare_smaller", 
     410           "orngMisc.BestOnTheFly":"Orange.utils.selection.BestOnTheFly", 
     411           "orngMisc.selectBest":"Orange.utils.selection.select_best", 
     412           "orngMisc.selectBestIndex":"Orange.utils.selection.select_best_index", 
     413           "orngMisc.compare2_firstBigger":"Orange.utils.selection.compare_first_bigger", 
     414           "orngMisc.compare2_firstSmaller":"Orange.utils.selection.compare_first_smaller", 
     415           "orngMisc.compare2_lastBigger":"Orange.utils.selection.compare_last_bigger", 
     416           "orngMisc.compare2_lastSmaller":"Orange.utils.selection.compare_last_smaller", 
     417           "orngMisc.compare2_bigger":"Orange.utils.selection.compare_bigger", 
     418           "orngMisc.compare2_smaller":"Orange.utils.selection.compare_smaller", 
    419419 
    420420           "orngMisc.Renderer": "Orange.utils.render.Renderer", 
  • Orange/misc/__init__.py

    r10581 r10654  
    329329are :obj:`Orange.evaluation.testing` and :obj:`Orange.data.Table`. 
    330330 
    331  
    332 ---------------- 
    333 Other submodules 
    334 ---------------- 
    335  
    336 .. automodule:: Orange.misc.selection 
    337  
    338331""" 
    339332from functools import wraps 
     
    341334from Orange.core import SymMatrix 
    342335from Orange.core import CostMatrix 
    343  
    344 __all__ = ["selection" ] 
    345 # Must be imported after deprecation function definitions 
    346 import selection 
  • Orange/optimization/__init__.py

    r10633 r10654  
    277277 
    278278        cvind = Orange.core.MakeRandomIndicesCV(data, folds) 
    279         findBest = Orange.misc.selection.BestOnTheFly(seed=data.checksum(), 
     279        findBest = Orange.utils.selection.BestOnTheFly(seed=data.checksum(), 
    280280                                         call_compare_on_1st=True) 
    281281        tableAndWeight = weight and (data, weight) or data 
     
    349349 
    350350        cvind = Orange.core.MakeRandomIndicesCV(data, folds) 
    351         findBest = Orange.misc.selection.BestOnTheFly(seed=data.checksum(), 
     351        findBest = Orange.utils.selection.BestOnTheFly(seed=data.checksum(), 
    352352                                         call_compare_on_1st=True) 
    353353        tableAndWeight = weight and (data, weight) or data 
  • Orange/orng/orngMisc.py

    r10633 r10654  
    181181 
    182182 
    183 ## Orange.misc.selection 
     183## Orange.utils.selection 
    184184 
    185185import random 
  • Orange/utils/__init__.py

    r10581 r10654  
    2626 
    2727---------------- 
    28 Other submodules 
     28Submodules 
    2929---------------- 
    3030 
     
    3838 
    3939.. automodule:: Orange.utils.addons 
     40 
     41.. automodule:: Orange.utils.selection 
    4042 
    4143""" 
     
    4850import environ 
    4951 
    50 import warnings 
    5152def deprecation_warning(old, new, stacklevel=-2): 
    5253    """ Raise a deprecation warning of an obsolete attribute access. 
     
    596597printVerbose = deprecated_function_name(print_verbose) 
    597598 
     599import warnings 
     600 
     601import selection 
     602 
  • Orange/utils/selection.py

    r10580 r10654  
    1616formulation of the if-statement. 
    1717 
    18 :class:`Orange.misc.selection` provides a class that makes a random choice 
     18:class:`Orange.utils.selection` provides a class that makes a random choice 
    1919in such cases. Each new candidate is compared with the currently optimal 
    2020one; it replaces the optimal if it is better, while if they are equal, 
  • docs/reference/rst/code/misc-selection-bestonthefly.py

    r10033 r10654  
    1 # Description: Demonstrates the use of BestOnTheFly class from Orange.misc.selection 
    2 # Category:    misc, selection 
     1# Description: Demonstrates the use of BestOnTheFly class from Orange.utils.selection 
     2# Category:    utils, selection 
    33# Classes:     BestOnTheFly 
    44# Uses:        lymphography.tab 
     
    99lymphography = Orange.data.Table("zoo") 
    1010 
    11 find_best = Orange.misc.selection.BestOnTheFly(call_compare_on_1st=True) 
     11find_best = Orange.utils.selection.BestOnTheFly(call_compare_on_1st=True) 
    1212 
    1313for attr in lymphography.domain.attributes: 
     
    1616print "%5.3f: %s" % find_best.winner() 
    1717 
    18 find_best = Orange.misc.selection.BestOnTheFly(Orange.misc.selection.compare_first_bigger) 
     18find_best = Orange.utils.selection.BestOnTheFly(Orange.utils.selection.compare_first_bigger) 
    1919 
    2020for attr in lymphography.domain.attributes: 
     
    2323print "%5.3f: %s" % find_best.winner() 
    2424 
    25 find_best = Orange.misc.selection.BestOnTheFly() 
     25find_best = Orange.utils.selection.BestOnTheFly() 
    2626 
    2727for attr in lymphography.domain.attributes: 
Note: See TracChangeset for help on using the changeset viewer.