source: orange/docs/reference/rst/code/outlier2.py @ 9823:7f9c3f3c6474

Revision 9823:7f9c3f3c6474, 368 bytes checked in by lanumek, 2 years ago (diff)

Changed names of data sets (table replaced with data or name of the data set).

Line 
1import Orange
2
3bridges = Orange.data.Table("bridges")
4outlier_det = Orange.preprocess.outliers.OutlierDetection()
5outlier_det.set_examples(bridges, Orange.distance.instances.EuclideanConstructor(bridges))
6outlier_det.set_knn(3)
7z_values = outlier_det.z_values()
8for ex,zv in sorted(zip(bridges, z_values), key=lambda x: x[1])[-5:]:
9    print ex, "Z-score: %5.3f" % zv
Note: See TracBrowser for help on using the repository browser.