Ignore:
Files:
8 added
7 deleted
50 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/orngSignalManager.py

    r10580 r10651  
    99 
    1010import orange 
    11 from Orange.misc import debugging 
     11from Orange.utils import debugging 
    1212 
    1313Single = 2 
  • Orange/OrangeWidgets/OWBaseWidget.py

    r10580 r10651  
    2424import orange 
    2525from Orange import misc 
    26 from Orange.misc import debugging as orngDebugging 
     26import Orange.utils 
     27from Orange.utils import debugging as orngDebugging 
    2728from string import * 
    2829from orngSignalManager import * 
  • Orange/__init__.py

    r10636 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") 
    128 #_import("misc.r") 
    129128 
    130129_import("utils") #TODO hide utils from the user 
  • Orange/classification/tree.py

    r10609 r10661  
    15201520        self = Orange.classification.Learner.__new__(cls, **cls._rename_dict(argkw)) 
    15211521        if instances: 
    1522             self.__init__(**cls._rename_dict(argkw)) 
     1522            self.__init__(**argkw) 
    15231523            return self.__call__(instances, weightID) 
    15241524        else: 
     
    15931593 
    15941594    def __str__(self): 
    1595         return self.dump() 
    1596  
    1597  
    1598     def dump(self): 
     1595        return self.to_string() 
     1596 
     1597 
     1598    def to_string(self): 
    15991599        """ 
    16001600        Print the tree in the same form as Ross Quinlan's  
     
    16431643        return  _c45_printTree0(self.tree, self.class_var, 0) 
    16441644 
    1645     to_string = dump 
    16461645 
    16471646def _c45_showBranch(node, classvar, lev, i): 
     
    26592658            max_depth, simple_first, self).dumpTree() 
    26602659 
    2661     dump = to_string 
    2662  
    26632660    @Orange.utils.deprecated_keywords({"fileName": "file_name", \ 
    26642661        "leafStr": "leaf_str", "nodeStr": "node_str", \ 
  • Orange/data/preprocess/scaling.py

    r10580 r10651  
    5959from Orange.data import preprocess 
    6060 
    61 from Orange.misc import caching 
     61from Orange.utils import caching 
    6262 
    6363import warnings 
  • 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/orng/orngTree.py

    r10467 r10649  
    3939 
    4040dumpTree = dump 
    41 """ DEPRECATED: Replaced by :obj:`TreeClassifier.dump`. """ 
     41""" DEPRECATED: Replaced by :obj:`TreeClassifier.to_string`. """ 
    4242 
    4343def printTree(*a, **aa): 
     
    4949 
    5050printTxt = printTree 
    51 """ DEPRECATED. Replaced by :obj:`TreeClassifier.dump` """ 
     51""" DEPRECATED. Replaced by :obj:`TreeClassifier.to_string` """ 
    5252 
    5353printDot = dot 
  • Orange/testing/regression/results_reference/tree_c45.py.txt

    r9954 r10661  
    1717 
    1818 
    19 C4.5 with minObjs=100 
     19C4.5 with min_objs=100 
    2020Iris-setosa Iris-setosa 
    2121Iris-setosa Iris-setosa 
  • Orange/testing/regression/tests_20/reference_c45.py

    r9952 r10652  
    1919    print tree(i), i.getclass() 
    2020 
    21 print "\n\nC4.5 with minObjs=100" 
    22 tree = orange.C45Learner(data, minObjs=100) 
     21print "\n\nC4.5 with min_objs=100" 
     22tree = orange.C45Learner(data, min_objs=100) 
    2323for i in data[:5]: 
    2424    print tree(i), i.getclass() 
  • Orange/testing/regression/xtest_one.py

    r10634 r10650  
    88#ignore warnings 
    99import warnings as t__warnings 
    10 t__warnings.filterwarnings("ignore", "", AttributeWarning) 
     10# use obj.setattr("attribute", value)! 
     11#t__warnings.filterwarnings("ignore", "", AttributeWarning) 
    1112 
    1213#from numpy import seterr 
  • Orange/testing/unit/__init__.py

    r10180 r10655  
    1 from Orange.misc.testing import * 
     1from Orange.testing.testing import * 
  • Orange/testing/unit/tests/test_association.py

    r10273 r10655  
    11from __future__ import division 
    22from Orange import associate 
    3 from Orange.misc import testing 
    4 from Orange.misc.testing import test_on_data, datasets_driven 
     3from Orange.testing import testing 
     4from Orange.testing.testing import test_on_data, datasets_driven 
    55try: 
    66    import unittest2 as unittest 
  • Orange/testing/unit/tests/test_bayes.py

    r10318 r10655  
    1 from Orange.misc import testing 
     1from Orange.testing import testing 
    22 
    33# TODO: test different prob estimators 
  • Orange/testing/unit/tests/test_c45.py

    r10278 r10655  
    1 from Orange.misc import testing 
     1from Orange.testing import testing 
    22try: 
    33    import unittest2 as unittest 
  • Orange/testing/unit/tests/test_data_utils.py

    r10278 r10655  
    1 from Orange.misc import testing 
     1from Orange.testing import testing 
    22from Orange.data import utils 
    33import Orange 
  • Orange/testing/unit/tests/test_demo.py

    r10278 r10655  
    1 from Orange.misc import testing 
    2 from Orange.misc.testing import data_driven, datasets_driven, test_on_data 
     1from Orange.testing import testing 
     2from Orange.testing.testing import data_driven, datasets_driven, test_on_data 
    33try: 
    44    import unittest2 as unittest 
  • Orange/testing/unit/tests/test_distance.py

    r10278 r10655  
    33except: 
    44    import unittest 
    5 from Orange.misc import testing 
    6 from Orange.misc.testing import datasets_driven, test_on_data 
     5from Orange.testing import testing 
     6from Orange.testing.testing import datasets_driven, test_on_data 
    77 
    88from Orange.distance import * 
  • Orange/testing/unit/tests/test_earth.py

    r10663 r10666  
    11import Orange 
    2 from Orange.misc import testing 
    3 from Orange.misc.testing import datasets_driven, test_on_data, test_on_datasets 
     2from Orange.testing import testing 
     3from Orange.testing.testing import datasets_driven, test_on_data, test_on_datasets 
    44from Orange.regression import earth 
    55 
  • Orange/testing/unit/tests/test_ensemble.py

    r10278 r10655  
    44    import unittest 
    55 
    6 from Orange.misc import testing 
    7 from Orange.misc.testing import datasets_driven, test_on_datasets 
     6from Orange.testing import testing 
     7from Orange.testing.testing import datasets_driven, test_on_datasets 
    88 
    99@datasets_driven(datasets=testing.CLASSIFICATION_DATASETS) 
  • Orange/testing/unit/tests/test_feature_selection.py

    r10522 r10655  
    1 import Orange.misc.testing as testing 
     1import Orange.testing.testing as testing 
    22from Orange.feature import selection, scoring 
    33import Orange 
  • Orange/testing/unit/tests/test_hclustering.py

    r10278 r10655  
    77from Orange.distance import * 
    88 
    9 import Orange.misc.testing as testing 
     9import Orange.testing.testing as testing 
    1010import Orange 
    1111try: 
  • Orange/testing/unit/tests/test_io.py

    r10278 r10655  
    44    import unittest 
    55import Orange 
    6 from Orange.misc import testing 
     6from Orange.testing import testing 
    77import os, sys 
    88 
  • Orange/testing/unit/tests/test_kmeans.py

    r10278 r10655  
    33except: 
    44    import unittest 
    5 from Orange.misc import testing 
     5from Orange.testing import testing 
    66from Orange.clustering import kmeans 
    77from Orange.clustering.kmeans import Clustering 
  • Orange/testing/unit/tests/test_knn.py

    r10385 r10655  
    44    import unittest 
    55import Orange 
    6 from Orange.misc import testing 
    7 from Orange.misc.testing import datasets_driven, test_on_data 
     6from Orange.testing import testing 
     7from Orange.testing.testing import datasets_driven, test_on_data 
    88from Orange.classification import knn 
    99from Orange.distance import Euclidean 
  • Orange/testing/unit/tests/test_lasso.py

    r10434 r10655  
    1 from Orange.misc import testing 
    2 from Orange.misc.testing import datasets_driven, test_on_data, test_on_datasets 
     1from Orange.testing import testing 
     2from Orange.testing.testing import datasets_driven, test_on_data, test_on_datasets 
    33from Orange.regression import lasso 
    44import Orange 
  • Orange/testing/unit/tests/test_linear.py

    r10278 r10655  
    11import Orange 
    2 from Orange.misc import testing 
    3 from Orange.misc.testing import datasets_driven 
     2from Orange.testing import testing 
     3from Orange.testing.testing import datasets_driven 
    44from Orange.classification.svm import LinearLearner 
    55try: 
  • Orange/testing/unit/tests/test_linregression.py

    r10278 r10655  
    1 from Orange.misc import testing 
    2 from Orange.misc.testing import datasets_driven, test_on_data, test_on_datasets 
     1from Orange.testing import testing 
     2from Orange.testing.testing import datasets_driven, test_on_data, test_on_datasets 
    33from Orange.regression import linear 
    44import Orange 
  • Orange/testing/unit/tests/test_logreg.py

    r10384 r10655  
    1 from Orange.misc import testing 
     1from Orange.testing import testing 
    22try: 
    33    import unittest2 as unittest 
  • Orange/testing/unit/tests/test_majority.py

    r10278 r10655  
    1 from Orange.misc import testing 
    2 from Orange.misc.testing import datasets_driven, test_on_data 
     1from Orange.testing import testing 
     2from Orange.testing.testing import datasets_driven, test_on_data 
    33from Orange.classification import majority 
    44from Orange.statistics import distribution 
  • Orange/testing/unit/tests/test_mds.py

    r10278 r10655  
    1 from Orange.misc import testing 
    2 from Orange.misc.testing import test_on_data, datasets_driven 
     1from Orange.testing import testing 
     2from Orange.testing.testing import test_on_data, datasets_driven 
    33 
    44try: 
  • Orange/testing/unit/tests/test_measures.py

    r10278 r10655  
    1 from Orange.misc import testing 
    2 from Orange.misc.testing import datasets_driven, test_on_data 
     1from Orange.testing import testing 
     2from Orange.testing.testing import datasets_driven, test_on_data 
    33from Orange.feature import scoring 
    44try: 
  • Orange/testing/unit/tests/test_preprocessors.py

    r10542 r10655  
    3838import orange 
    3939 
    40 import Orange.misc.testing as testing 
     40import Orange.testing.testing as testing 
    4141 
    4242@testing.datasets_driven(datasets=testing.CLASSIFICATION_DATASETS) 
  • Orange/testing/unit/tests/test_regression.py

    r10580 r10655  
    88 
    99from Orange.utils import environ 
    10 from Orange.misc import testing 
     10from Orange.testing import testing 
    1111 
    1212 
  • Orange/testing/unit/tests/test_rules.py

    r10278 r10655  
    1 from Orange.misc import testing 
     1from Orange.testing import testing 
    22from Orange.classification import rules 
    33 
  • Orange/testing/unit/tests/test_selection.py

    r10385 r10656  
    44    import unittest 
    55 
    6 from Orange.misc import selection 
     6from Orange.utils import selection 
    77 
    88 
  • Orange/testing/unit/tests/test_som.py

    r10317 r10655  
    1 from Orange.misc import testing 
    2 from Orange.misc.testing import datasets_driven, test_on_data 
     1from Orange.testing import testing 
     2from Orange.testing.testing import datasets_driven, test_on_data 
    33try: 
    44    import unittest2 as unittest 
  • Orange/testing/unit/tests/test_stepwise_wrapper.py

    r10278 r10655  
    55 
    66import Orange 
    7 from Orange.misc import testing 
     7from Orange.testing import testing 
    88 
    99from Orange.classification import bayes 
  • Orange/testing/unit/tests/test_svm.py

    r10664 r10666  
    1111from Orange.classification import svm                             
    1212from Orange.classification.svm.kernels import BagOfWords, RBFKernelWrapper 
    13 from Orange.misc import testing 
    14 from Orange.misc.testing import datasets_driven, test_on_datasets, test_on_data 
     13from Orange.testing import testing 
     14from Orange.testing.testing import datasets_driven, test_on_datasets, test_on_data 
    1515import orange 
    1616 
  • Orange/testing/unit/tests/test_table.py

    r10597 r10655  
    88except: 
    99    import unittest 
    10 from Orange.misc import testing 
     10from Orange.testing import testing 
    1111import Orange 
    1212import cPickle 
  • Orange/testing/unit/tests/test_tree.py

    r10412 r10655  
    1 from Orange.misc import testing 
    2 from Orange.misc.testing import datasets_driven, test_on_data 
     1from Orange.testing import testing 
     2from Orange.testing.testing import datasets_driven, test_on_data 
    33try: 
    44    import unittest2 as unittest 
  • Orange/testing/unit/tests/test_variable.py

    r10385 r10655  
    44    import unittest 
    55import Orange 
    6 from Orange.misc import testing 
     6from Orange.testing import testing 
    77 
    88class TestVariableMake(unittest.TestCase): 
  • 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 
  • docs/development/rst/testing.rst

    r10437 r10655  
    33####### 
    44 
    5 .. automodule:: Orange.misc.testing 
     5.. automodule:: Orange.testing.testing 
  • docs/reference/rst/Orange.projection.linear.rst

    r10475 r10657  
    4646 
    4747.. index:: PCA 
    48 .. autoclass:: Orange.projection.linear.Pca 
     48.. autoclass:: Orange.projection.linear.PCA 
    4949   :members: 
    5050 
  • docs/reference/rst/code/discretization-table.py

    r9988 r10660  
    22iris = Orange.data.Table("iris.tab") 
    33disc_iris = Orange.data.discretization.DiscretizeTable(iris, 
    4     method=Orange.feature.discretization.EqualFreq(n_intervals=3)) 
     4    method=Orange.feature.discretization.EqualFreq(n=3)) 
    55 
    66print "Original data set:" 
  • 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.