source: orange/orange/doc/reference/examplesdistance.py @ 526:fe2d65da2b2a

Revision 526:fe2d65da2b2a, 455 bytes checked in by janezd <janez.demsar@…>, 10 years ago (diff)
  • moved documentation from a separate module to this one
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.