source: orange/docs/reference/rst/code/kmeans-run-callback.py @ 9372:aef193695ea9

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

Moved documentation to the separate directory.

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.