source: orange/orange/doc/Orange/rst/code/kmeans-run-callback.py @ 7130:12a00963a5e8

Revision 7130:12a00963a5e8, 266 bytes checked in by markotoplak, 3 years ago (diff)

Added Makefile for doc/Orange.

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