Ignore:
Timestamp:
01/27/12 23:39:05 (2 years ago)
Author:
Matija Polajnar <matija.polajnar@…>
Branch:
default
Message:

Multi-label classificaiton widgets. Merged in from Wencan Luo's work with some modifications.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/evaluation/scoring.py

    r9550 r9599  
    489489        return [res] 
    490490         
    491     ress = [Orange.evaluation.testing.ExperimentResults(1, res.classifier_names, res.class_values, res.weights, classifiers=res.classifiers, loaded=res.loaded) 
     491    ress = [Orange.evaluation.testing.ExperimentResults(1, res.classifier_names, res.class_values, res.weights, classifiers=res.classifiers, loaded=res.loaded, test_type=res.test_type, labels=res.labels) 
    492492            for i in range(res.number_of_iterations)] 
    493493    for te in res.results: 
     
    504504                    [res.classifierNames[i]], res.classValues, 
    505505                    weights=res.weights, baseClass=res.baseClass, 
    506                     classifiers=[res.classifiers[i]] if res.classifiers else []) 
     506                    classifiers=[res.classifiers[i]] if res.classifiers else [], 
     507                    test_type = res.test_type, labels = res.labels) 
    507508        r.results = [] 
    508509        for te in res.results: 
     
    15971598    import corn 
    15981599    ## merge multiple iterations into one 
    1599     mres = Orange.evaluation.testing.ExperimentResults(1, res.classifier_names, res.class_values, res.weights, classifiers=res.classifiers, loaded=res.loaded) 
     1600    mres = Orange.evaluation.testing.ExperimentResults(1, res.classifier_names, res.class_values, res.weights, classifiers=res.classifiers, loaded=res.loaded, test_type=res.test_type, labels=res.labels) 
    16001601    for te in res.results: 
    16011602        mres.results.append( te ) 
     
    16591660    import corn 
    16601661    ## merge multiple iterations into one 
    1661     mres = Orange.evaluation.testing.ExperimentResults(1, res.classifier_names, res.class_values, res.weights, classifiers=res.classifiers, loaded=res.loaded) 
     1662    mres = Orange.evaluation.testing.ExperimentResults(1, res.classifier_names, res.class_values, res.weights, classifiers=res.classifiers, loaded=res.loaded, test_type=res.test_type, labels=res.labels) 
    16621663    for te in res.results: 
    16631664        mres.results.append( te ) 
     
    26032604    label_num = len(res.labels) 
    26042605    example_num = gettotsize(res) 
    2605      
     2606 
    26062607    for e in res.results: 
    26072608        aclass = e.actual_class 
Note: See TracChangeset for help on using the changeset viewer.