source: orange/Orange/testing/regression/tests_20/reference_examplesdistance.py @ 9952:986e9cd806f4

Revision 9952:986e9cd806f4, 455 bytes checked in by Miha Stajdohar <miha.stajdohar@…>, 2 years ago (diff)

Tests moved and renamed from orange 20.

Line 
1# Description: Shows how to construct and use classes for measuring distances between examples
2# Category:    distances
3# Classes:     ExamplesDistanceConstructor, ExamplesDistance
4# Uses:        lenses
5# Referenced:  ExamplesDistance.htm
6
7
8import orange
9
10data = orange.ExampleTable("lenses")
11
12distance = orange.ExamplesDistanceConstructor_Manhattan(data)
13
14ref = data[0]
15print "*** Reference example: ", ref
16for ex in data:
17    print ex, distance(ex, ref)
Note: See TracBrowser for help on using the repository browser.