source: orange/Orange/doc/reference/basicattrstat.py @ 9671:a7b056375472

Revision 9671:a7b056375472, 506 bytes checked in by anze <anze.staric@…>, 2 years ago (diff)

Moved orange to Orange (part 2)

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.