source: orange/docs/reference/rst/code/outlier2.py @ 9372:aef193695ea9

Revision 9372:aef193695ea9, 356 bytes checked in by mitar, 2 years ago (diff)

Moved documentation to the separate directory.

Line 
1import Orange
2
3data = Orange.data.Table("bridges")
4outlier_det = Orange.preprocess.outliers.OutlierDetection()
5outlier_det.set_examples(data, Orange.distance.instances.EuclideanConstructor(data))
6outlier_det.set_knn(3)
7z_values = outlier_det.z_values()
8for ex,zv in sorted(zip(data, 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.