source: orange/Orange/testing/regression/tests_20/modules_kmeans-run-callback.py @ 9952:986e9cd806f4

Revision 9952:986e9cd806f4, 266 bytes checked in by Miha Stajdohar <miha.stajdohar@…>, 2 years ago (diff)

Tests moved and renamed from orange 20.

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.