Changeset 8746:d8669c3d684e in orange


Ignore:
Timestamp:
08/23/11 19:02:35 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
0981b53a9529a6ca29710d7fc80bd8a9dd990aa4
Message:

'toR' can now handle data without a class variable.

File:
1 edited

Legend:

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

    r8745 r8746  
    9595 
    9696 
    97 def toARFF(filename,table,try_numericize=0): 
     97def toARFF(filename, table, try_numericize=0): 
    9898    """Save class:`Orange.data.Table` to file in Weka's ARFF format""" 
    9999    t = table 
     
    208208    labels = [] 
    209209    as0 = [] 
    210     for a in t.domain.attributes: 
     210    for a in t.domain.variables: 
    211211        as0.append(a) 
    212     as0.append(t.domain.class_var) 
     212#    as0.append(t.domain.class_var) 
    213213    for a in as0: 
    214214        labels.append(str(a.name)) 
Note: See TracChangeset for help on using the changeset viewer.