source: orange/docs/reference/rst/code/kmeans-run-callback.py @ 9638:eb3af38491f2

Revision 9638:eb3af38491f2, 256 bytes checked in by umek@…, 2 years ago (diff)

Changed table to data or name of the data set.

For example - instead of

table = Orange.data.Table("housing")

is changed to

housing = Orange.data.Table("housing")

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