Ignore:
Timestamp:
02/06/12 16:07:38 (2 years ago)
Author:
Miha Stajdohar <miha.stajdohar@…>
Branch:
default
rebase_source:
d0fdd5953653d1fb7d35eccd4e76473e8d3d2422
Message:

Changed data set path.

File:
1 edited

Legend:

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

    r9374 r9743  
    55 
    66import orange 
    7 data = orange.ExampleTable("../../datasets/adult_sample") 
     7data = orange.ExampleTable("adult_sample.tab") 
    88print "Classes:", len(data.domain.classVar.values) 
    99print "Attributes:", len(data.domain.attributes), ",", 
    1010 
    1111# count number of continuous and discrete attributes 
    12 ncont=0; ndisc=0 
     12ncont = 0; ndisc = 0 
    1313for a in data.domain.attributes: 
    1414    if a.varType == orange.VarTypes.Discrete: 
     
    2525r = [0.] * len(c) 
    2626for i in range(len(c)): 
    27     r[i] = c[i]*100./len(data) 
     27    r[i] = c[i] * 100. / len(data) 
    2828for i in range(len(data.domain.classVar.values)): 
    2929    print ", %d(%4.1f%s) with class %s" % (c[i], r[i], '%', data.domain.classVar.values[i]), 
Note: See TracChangeset for help on using the changeset viewer.