source: orange/orange/doc/reference/basicattrstat.py @ 526:fe2d65da2b2a

Revision 526:fe2d65da2b2a, 506 bytes checked in by janezd <janez.demsar@…>, 10 years ago (diff)
  • moved documentation from a separate module to this one
Line 
1# Description: Shows how to compute and print out the basic attribute statistics
2# Category:    statistics
3# Classes:     DomainBasicAttrStat, BasicAttrStat
4# Uses:        iris
5# Referenced:  basicstat.htm
6
7import orange
8data = orange.ExampleTable("iris")
9bas = orange.DomainBasicAttrStat(data)
10
11print "%20s  %5s  %5s  %5s" % ("attribute", "min", "max", "avg")
12for a in bas:
13    if a:
14        print "%20s  %5.3f  %5.3f  %5.3f" % (a.variable.name, a.min, a.max, a.avg)
15
16print bas["sepal length"].avg       
Note: See TracBrowser for help on using the repository browser.