Ignore:
Timestamp:
02/06/12 16:09:54 (2 years ago)
Author:
Miha Stajdohar <miha.stajdohar@…>
Branch:
default
rebase_source:
4311e8f03a946a2d7c9617962b042caee71181b7
Message:

Changed data set path.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/tutorial/rst/code/domain5.py

    r9374 r9746  
    88 
    99def report_prob(header, data): 
    10   print 'Size of %s: %i instances; ' % (header, len(data)),  
     10  print 'Size of %s: %i instances; ' % (header, len(data)), 
    1111  n = 0 
    1212  for i in data: 
    13     if int(i.getclass())==0: 
     13    if int(i.getclass()) == 0: 
    1414      n = n + 1 
    1515  if len(data): 
    16     print "p(%s)=%5.3f" % (data.domain.classVar.values[0], float(n)/len(data)) 
     16    print "p(%s)=%5.3f" % (data.domain.classVar.values[0], float(n) / len(data)) 
    1717  else: 
    1818    print 
    1919 
    20 filename = "../../datasets/adult_sample.tab" 
     20filename = "adult_sample.tab" 
    2121data = orange.ExampleTable(filename) 
    2222report_prob('data', data) 
Note: See TracChangeset for help on using the changeset viewer.