source: orange/Orange/doc/modules/outlier2.py @ 9764:37a653a650bb

Revision 9764:37a653a650bb, 568 bytes checked in by Miha Stajdohar <miha.stajdohar@…>, 2 years ago (diff)

Removed obsolete try/catch block.

Line 
1# Description: Shows how to use outlier detection
2# Category:    Outlier detection
3# Classes:     orngOutlier
4# Uses:        bridges
5# Referenced:  OutlierDetection.htm
6
7import orange, orngOutlier
8
9data = orange.ExampleTable("bridges")
10outlierDet = orngOutlier.OutlierDetection()
11outlierDet.setExamples(data, orange.ExamplesDistanceConstructor_Euclidean(data))
12outlierDet.setKNN(3)
13zValues = outlierDet.zValues()
14sorted = []
15for el in zValues: sorted.append(el)
16sorted.sort()
17for i, el in enumerate(zValues):
18    if el > sorted[-6]: print  data[i], "Z-score: %5.3f" % el
Note: See TracBrowser for help on using the repository browser.