Ignore:
Timestamp:
03/15/12 15:14:54 (2 years ago)
Author:
anzeh <anze.staric@…>
Branch:
default
Message:

Moved preprocess from Orange to Orange.data.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • Orange/data/preprocess/scaling.py

    r10475 r10542  
    1313documentation is poor and has to be improved in the future. 
    1414 
    15 .. autoclass:: Orange.preprocess.scaling.ScaleData 
     15.. autoclass:: Orange.data.preprocess.scaling.ScaleData 
    1616   :members: 
    1717   :show-inheritance: 
    1818 
    19 .. autoclass:: Orange.preprocess.scaling.ScaleLinProjData 
     19.. autoclass:: Orange.data.preprocess.scaling.ScaleLinProjData 
    2020   :members: 
    2121   :show-inheritance: 
    2222 
    23 .. autoclass:: Orange.preprocess.scaling.ScaleLinProjData3D 
     23.. autoclass:: Orange.data.preprocess.scaling.ScaleLinProjData3D 
    2424   :members: 
    2525   :show-inheritance: 
    2626 
    27 .. autoclass:: Orange.preprocess.scaling.ScalePolyvizData 
     27.. autoclass:: Orange.data.preprocess.scaling.ScalePolyvizData 
    2828   :members: 
    2929   :show-inheritance: 
    3030 
    31 .. autoclass:: Orange.preprocess.scaling.ScaleScatterPlotData 
     31.. autoclass:: Orange.data.preprocess.scaling.ScaleScatterPlotData 
    3232   :members: 
    3333   :show-inheritance: 
     
    5656import Orange 
    5757import Orange.core 
    58 import Orange.preprocess 
    5958import Orange.data 
     59from Orange.data import preprocess 
     60 
    6061from Orange.misc import caching 
    6162 
     
    7475    """ 
    7576    if variable.var_type == Orange.core.VarTypes.Continuous: 
    76         print "get_variable_values_sorted - attribute %s is a continuous variable" % (variable) 
     77        print "get_variable_values_sorted - attribute %s is a continuous variable" % variable 
    7778        return [] 
    7879 
     
    8384    try: 
    8485        int_values = [(int(val), val) for val in values] 
    85     except: 
     86    except ValueError: 
    8687        return values 
    8788 
     
    9293@deprecated_keywords({"sortValuesForDiscreteAttrs": 
    9394                      "sort_values_for_discrete_attrs"}) 
    94 def get_variable_value_indices(variable, sort_values_for_discrete_attrs = 1): 
     95def get_variable_value_indices(variable, sort_values_for_discrete_attrs=1): 
    9596    """ 
    9697    Create a dictionary with given variable. Keys are variable values, values 
     
    120121    equiN if we don't have a class or class is continuous). 
    121122    """ 
    122     entro_disc = Orange.preprocess.EntropyDiscretization() 
    123     equi_disc  = Orange.preprocess.EquiNDiscretization(number_of_intervals = 
    124                                                        number_of_intervals) 
     123    entro_disc = preprocess.EntropyDiscretization() 
     124    equi_disc  = preprocess.EquiNDiscretization(number_of_intervals=number_of_intervals) 
    125125    disc_attrs = [] 
    126126 
     
    159159                new_attr = attr 
    160160            if remove_unused_values: 
    161                 new_attr = Orange.preprocess.RemoveUnusedValues(new_attr, data) 
     161                new_attr = preprocess.RemoveUnusedValues(new_attr, data) 
    162162                if new_attr is None: 
    163163                    raise Orange.core.KernelException, "No values" 
Note: See TracChangeset for help on using the changeset viewer.