Changeset 9456:23addfdc685d in orange


Ignore:
Timestamp:
07/13/11 08:27:03 (3 years ago)
Author:
wencanluo <wencanluo@…>
Branch:
default
Convert:
f523ba42c2df3a15adfd680c68fea97dcc9cceab
Message:

update testing.py, replaced the deprecated keywords

Location:
orange
Files:
1 added
2 deleted
2 edited

Legend:

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

    r9452 r9456  
    775775    multilabel_flag = label.is_multilabel(examples) 
    776776     
    777     if multilabel_flag == 0 and not examples.domain.classvar: #single-label 
     777    if multilabel_flag == 0 and not examples.domain.class_var: #single-label 
    778778        raise ValueError("Test data set without class attribute") 
    779779     
     
    784784    nIterations = max(indices)+1 
    785785    if multilabel_flag == 0: #single-label 
    786         if examples.domain.classvar.vartype == Orange.data.Type.Discrete: 
    787             values = list(examples.domain.classvar.values) 
    788             basevalue = examples.domain.classvar.basevalue 
     786        if examples.domain.class_var.var_type == Orange.data.Type.Discrete: 
     787            values = list(examples.domain.class_var.values) 
     788            basevalue = examples.domain.class_var.base_value 
    789789        else: 
    790790            basevalue = values = None 
  • orange/Orange/multilabel/br.py

    r9453 r9456  
    4848 
    4949The following example demonstrates a straightforward invocation of 
    50 this algorithm (`mlc-br-example.py`_, uses `multidata.tab`_): 
     50this algorithm (`mlc-classify.py`_, uses `multidata.tab`_): 
    5151 
    52 .. literalinclude:: code/mlc-br-example.py 
     52.. literalinclude:: code/mlc-classify.py 
    5353   :lines: 1- 
    5454 
    55 .. _br_example.py: code/mlc-br-example.py 
     55.. _mlc-classify.py: code/mlc-br-example.py 
    5656.. _multidata.tab: code/multidata.tab 
    5757 
Note: See TracChangeset for help on using the changeset viewer.