Ignore:
Timestamp:
02/06/12 20:01:02 (2 years ago)
Author:
lanumek
Branch:
default
Children:
9835:e48466fc6eb2, 9841:05a160804431
rebase_source:
8cf30121654f25c9cb6d8ac9bdaf163e305d62da
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/reference/rst/code/outlier2.py

    r9724 r9823  
    11import Orange 
    22 
    3 data = Orange.data.Table("bridges") 
     3bridges = Orange.data.Table("bridges") 
    44outlier_det = Orange.preprocess.outliers.OutlierDetection() 
    5 outlier_det.set_examples(data, Orange.distance.Euclidean(data)) 
     5outlier_det.set_examples(bridges, Orange.distance.instances.EuclideanConstructor(bridges)) 
    66outlier_det.set_knn(3) 
    77z_values = outlier_det.z_values() 
    8 for ex,zv in sorted(zip(data, z_values), key=lambda x: x[1])[-5:]: 
     8for ex,zv in sorted(zip(bridges, z_values), key=lambda x: x[1])[-5:]: 
    99    print ex, "Z-score: %5.3f" % zv 
Note: See TracChangeset for help on using the changeset viewer.