Changeset 8137:ae777a1b5e25 in orange


Ignore:
Timestamp:
08/02/11 12:42:18 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
7e663e819572225b78fff02ed15f7afb3293abed
Message:

Fixed old orange names in loadLibSVM.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/data/io.py

    r8057 r8137  
    260260    attributeLoadStatus = {} 
    261261    def make_float(name): 
    262         attr, s = orange.Variable.make(name, orange.VarTypes.Continuous, [], [], createOnNew) 
     262        attr, s = Orange.data.variable.make(name, Orange.data.Type.Continuous, [], [], create_on_new) 
    263263        attributeLoadStatus[attr] = s 
    264264        return attr 
    265265     
    266266    def make_disc(name, unordered): 
    267         attr, s = orange.Variable.make(name, orange.VarTypes.Discrete, [], unordered, createOnNew) 
     267        attr, s = Orange.data.variable.make(name, Orange.data.Type.Discrete, [], unordered, create_on_new) 
    268268        attributeLoadStatus[attr] = s 
    269269        return attr 
     
    279279    attributeLoadStatus = [attributeLoadStatus[attr] for attr in attributes] + \ 
    280280                          [attributeLoadStatus[classVar]] 
    281     domain = orange.Domain(attributes, classVar) 
    282     table = orange.ExampleTable([orange.Example(domain, [ex.get(attr, attr("?")) for attr in attributes] + [c]) for ex, c in zip(values, classes)]) 
     281    domain = Orange.data.Domain(attributes, classVar) 
     282    table = Orange.data.Table([Orange.data.Instance(domain, [ex.get(attr, attr("?")) for attr in attributes] + [c]) for ex, c in zip(values, classes)]) 
    283283    table.attribute_load_status = attributeLoadStatus 
    284284    return table 
Note: See TracChangeset for help on using the changeset viewer.