source: orange/Orange/doc/modules/kmeans-run-callback.py @ 9671:a7b056375472

Revision 9671:a7b056375472, 266 bytes checked in by anze <anze.staric@…>, 2 years ago (diff)

Moved orange to Orange (part 2)

Line 
1import orange
2import orngClustering
3
4def callback(km):
5    print "Iteration: %d, changes: %d, score: %.4f" % (km.iteration, km.nchanges, km.score)
6   
7data = orange.ExampleTable("iris")
8km = orngClustering.KMeans(data, 3, minscorechange=0, inner_callback=callback)
Note: See TracBrowser for help on using the repository browser.