Changeset 9800:6d3897211a6c in orange


Ignore:
Timestamp:
02/06/12 18:26:10 (2 years ago)
Author:
Miha Stajdohar <miha.stajdohar@…>
Branch:
default
rebase_source:
f7bd58ff2194a544a5271b7d9c6922311f9c4f8d
Message:

Renamed format to to_string.

Location:
docs/reference/rst/code
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • docs/reference/rst/code/orngTree1.py

    r9372 r9800  
    1010for format in formats: 
    1111    print '\n\n*** FORMAT: "%s"\n' % format 
    12     print tree.format(leaf_str=format) 
     12    print tree.to_string(leaf_str=format) 
    1313 
    1414formats2 = [("%V", "."), ('%^.1CbA="Iris-virginica"% (%^.1CbP="Iris-virginica"%)', '.'), ("%V   %D %.2DbP %.2dbP", "%D %.2DbP %.2dbP")] 
    1515for fl, fn in formats2: 
    16     print tree.format(leaf_str=fl, node_str=fn) 
     16    print tree.to_string(leaf_str=fl, node_str=fn) 
    1717 
    1818 
     
    2222for format in formats: 
    2323    print '\n\n*** FORMAT: "%s"\n' % format 
    24     print tree.format(leaf_str=format) 
     24    print tree.to_string(leaf_str=format) 
    2525 
    2626formats2 = [("[SE: %E]\t %V %I(90)", "[SE: %E]"), ("%C<22 (%cbP<22)", "."), ("%C![20,22] (%^cbP![20,22]%)", ".")] 
    2727for fl, fn in formats2: 
    28     print tree.format(leaf_str=fl, node_str=fn) 
     28    print tree.to_string(leaf_str=fl, node_str=fn) 
  • docs/reference/rst/code/orngTree2.py

    r9372 r9800  
    2727            return Orange.classification.tree.insert_dot(strg, mo) 
    2828    return Orange.classification.tree.insert_num(strg, mo, margin) 
    29      
    30 my_format = [(re.compile("%"+Orange.classification.tree.fs 
    31     +"B"+Orange.classification.tree.by), replaceB)] 
    32              
    33 print tree.format(leaf_str="%V %^B% (%^3.2BbP%)", user_formats=my_format) 
     29 
     30my_format = [(re.compile("%" + Orange.classification.tree.fs 
     31    + "B" + Orange.classification.tree.by), replaceB)] 
     32 
     33print tree.to_string(leaf_str="%V %^B% (%^3.2BbP%)", user_formats=my_format) 
Note: See TracChangeset for help on using the changeset viewer.