source: orange/Orange/doc/reference/examplesdistance.py @ 9671:a7b056375472

Revision 9671:a7b056375472, 455 bytes checked in by anze <anze.staric@…>, 2 years ago (diff)

Moved orange to Orange (part 2)

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.