Changeset 9467:02ad425497d9 in orange


Ignore:
Timestamp:
07/29/11 06:43:06 (3 years ago)
Author:
wencanluo <wencanluo@…>
Branch:
default
Convert:
1a3bff9aa8e800bfdfcef7a90b3b407d9372e76b
Message:

fix a bug in mulan module (remove the class attribute when load the data)

Location:
orange/Orange/multilabel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/multilabel/mmp.py

    r9466 r9467  
    6767    .. attribute:: smooth 
    6868     
    69         Smoothing parameter controlling the strength of uniform prior (Default value is set to 1 which yields the Laplace smoothing). 
     69        Smoothing parameter controlling the strength of uniform prior  
     70        (Default value is set to 1 which yields the Laplace smoothing). 
    7071     
    7172    .. attribute:: knn 
     
    8485        :type k: int 
    8586         
    86         :param smooth: Smoothing parameter controlling the strength of uniform prior (Default value is set to 1 which yields the Laplace smoothing). 
     87        :param smooth: Smoothing parameter controlling the strength of uniform prior  
     88        (Default value is set to 1 which yields the Laplace smoothing). 
    8789        :type smooth: Float 
    8890         
  • orange/Orange/multilabel/mulan.py

    r9466 r9467  
    1717     
    1818    #load XML file 
    19     print xml_name 
    2019    doc = xml.dom.minidom.parse(xml_name) 
    2120     
     
    2827    domain = arff_table.domain 
    2928     
     29    #remove class tag 
     30    domain = Orange.data.Domain(domain,False) 
     31     
    3032    for i, var in enumerate(domain.variables): 
    3133        if var.name in labels: 
    3234            domain[i].attributes["label"] = 1 
    3335     
    34     table = arff_table 
     36    table = arff_table.translate(domain) 
    3537     
    3638    return table 
     
    4244    table = trans_mulan_data("../../doc/datasets/emotions.xml","../../doc/datasets/emotions.arff") 
    4345     
     46    for i in range(10): 
     47        print table[i] 
     48     
    4449    table.save("emotions.tab") 
Note: See TracChangeset for help on using the changeset viewer.