Ignore:
Timestamp:
03/15/11 14:57:05 (3 years ago)
Author:
lanz <lan.zagar@…>
Branch:
default
Convert:
a4d5dd3bc47b1cea11932b6f17ec5c28b3b34b4c
Message:

Corrected the (broken) example scripts for kmeans.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/doc/Orange/rst/code/kmeans-run-callback.py

    r7130 r7743  
    1 import orange 
    2 import Orange.cluster 
     1import Orange 
    32 
    43def callback(km): 
    54    print "Iteration: %d, changes: %d, score: %.4f" % (km.iteration, km.nchanges, km.score) 
    65     
    7 data = orange.ExampleTable("iris") 
    8 km = Orange.cluster.KMeans(data, 3, minscorechange=0, inner_callback=callback) 
     6table = Orange.data.Table("iris") 
     7km = Orange.clustering.kmeans.Clustering(table, 3, minscorechange=0, inner_callback=callback) 
Note: See TracChangeset for help on using the changeset viewer.