source: orange/docs/reference/rst/code/scoring-relief-caching.py @ 9372:aef193695ea9

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

Moved documentation to the separate directory.

Line 
1# Description: Shows why ReliefF needs to check the cached neighbours
2# Category:    statistics
3# Classes:     MeasureAttribute_relief
4# Uses:        iris
5# Referenced:  MeasureAttribute.htm
6
7import orange
8data = orange.ExampleTable("iris")
9
10r1 = orange.MeasureAttribute_relief()
11r2 = orange.MeasureAttribute_relief(check_cached_data = False)
12
13print "%.3f\t%.3f" % (r1(0, data), r2(0, data))
14for ex in data:
15    ex[0] = 0
16print "%.3f\t%.3f" % (r1(0, data), r2(0, data))
Note: See TracBrowser for help on using the repository browser.