source: orange/orange/doc/Orange/rst/code/kmeans-run-callback.py @ 7743:5277d8c12ca8

Revision 7743:5277d8c12ca8, 258 bytes checked in by lanz <lan.zagar@…>, 3 years ago (diff)

Corrected the (broken) example scripts for kmeans.

Line 
1import Orange
2
3def callback(km):
4    print "Iteration: %d, changes: %d, score: %.4f" % (km.iteration, km.nchanges, km.score)
5   
6table = Orange.data.Table("iris")
7km = Orange.clustering.kmeans.Clustering(table, 3, minscorechange=0, inner_callback=callback)
Note: See TracBrowser for help on using the repository browser.