source: orange/docs/reference/rst/code/scoring-relief-caching.py @ 9823:7f9c3f3c6474

Revision 9823:7f9c3f3c6474, 470 bytes checked in by lanumek, 2 years ago (diff)

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

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
8iris = orange.ExampleTable("iris")
9
10r1 = orange.MeasureAttribute_relief()
11r2 = orange.MeasureAttribute_relief(check_cached_data = False)
12
13print "%.3f\t%.3f" % (r1(0, iris), r2(0, iris))
14for ex in iris:
15    ex[0] = 0
16print "%.3f\t%.3f" % (r1(0, iris), r2(0, iris))
Note: See TracBrowser for help on using the repository browser.