Changeset 9923:5f55c90e0077 in orange for Orange/data/io.py


Ignore:
Timestamp:
02/07/12 13:46:21 (2 years ago)
Author:
markotoplak
Branch:
default
Message:

data.variable -> feature.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/data/io.py

    r9919 r9923  
    191191                        if len(sy) > 0: 
    192192                            vals.append(sy) 
    193                     a, s = make(atn, Orange.data.Type.Discrete, vals, [], create_on_new) 
     193                    a, s = make(atn, Orange.feature.Type.Discrete, vals, [], create_on_new) 
    194194                else: 
    195195                    # real... 
    196                     a, s = make(atn, Orange.data.Type.Continuous, [], [], create_on_new) 
     196                    a, s = make(atn, Orange.feature.Type.Continuous, [], [], create_on_new) 
    197197 
    198198                attributes.append(a) 
     
    399399    attributeLoadStatus = {} 
    400400    def make_float(name): 
    401         attr, s = Orange.feature.Descriptor.make(name, Orange.data.Type.Continuous, [], [], create_on_new) 
     401        attr, s = Orange.feature.Descriptor.make(name, Orange.feature.Type.Continuous, [], [], create_on_new) 
    402402        attributeLoadStatus[attr] = s 
    403403        return attr 
    404404 
    405405    def make_disc(name, unordered): 
    406         attr, s = Orange.feature.Descriptor.make(name, Orange.data.Type.Discrete, [], unordered, create_on_new) 
     406        attr, s = Orange.feature.Descriptor.make(name, Orange.feature.Type.Discrete, [], unordered, create_on_new) 
    407407        attributeLoadStatus[attr] = s 
    408408        return attr 
     
    633633            undefined_vars.append((i, variables[-1])) 
    634634        elif var_t == variable.Continuous: 
    635             variables.append(variable.make(name, Orange.data.Type.Continuous, [], [], create_new_on)) 
     635            variables.append(variable.make(name, Orange.feature.Type.Continuous, [], [], create_new_on)) 
    636636        elif var_t == variable.String: 
    637             variables.append(variable.make(name, Orange.data.Type.String, [], [], create_new_on)) 
     637            variables.append(variable.make(name, Orange.feature.Type.String, [], [], create_new_on)) 
    638638        elif var_t == variable.Python: 
    639639            variables.append(variable.Python(name)) 
     
    641641            var_t, values = var_t 
    642642            if var_t == variable.Discrete: 
    643                 variables.append(variable.make(name, Orange.data.Type.Discrete, values, [], create_new_on)) 
     643                variables.append(variable.make(name, Orange.feature.Type.Discrete, values, [], create_new_on)) 
    644644            elif var_t == variable.Python: 
    645645                raise NotImplementedError() 
     
    658658        values = sorted(values) 
    659659        if isinstance(var_def, _disc_placeholder): 
    660             variables[ind] = variable.make(var_def.name, Orange.data.Type.Discrete, [], values, create_new_on) 
     660            variables[ind] = variable.make(var_def.name, Orange.feature.Type.Discrete, [], values, create_new_on) 
    661661        elif isinstance(var_def, _var_placeholder): 
    662662            if is_variable_cont(values): 
    663                 variables[ind] = variable.make(var_def.name, Orange.data.Type.Continuous, [], [], create_new_on) 
     663                variables[ind] = variable.make(var_def.name, Orange.feature.Type.Continuous, [], [], create_new_on) 
    664664            elif is_variable_discrete(values): 
    665                 variables[ind] = variable.make(var_def.name, Orange.data.Type.Discrete, [], values, create_new_on) 
     665                variables[ind] = variable.make(var_def.name, Orange.feature.Type.Discrete, [], values, create_new_on) 
    666666            elif is_variable_string(values): 
    667                 variables[ind] = variable.make(var_def.name, Orange.data.Type.String, [], [], create_new_on) 
     667                variables[ind] = variable.make(var_def.name, Orange.feature.Type.String, [], [], create_new_on) 
    668668            else: 
    669669                raise ValueError("Strange column in the data") 
Note: See TracChangeset for help on using the changeset viewer.