Ignore:
Timestamp:
02/05/12 22:37:07 (2 years ago)
Author:
umek@…
Branch:
default
rebase_source:
eb6a120705f3462186b982a698c0a7ad9f947e24
Message:

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")

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/reference/rst/code/kmeans-silhouette.py

    r9372 r9638  
    11import Orange 
    22 
    3 table = Orange.data.Table("voting") 
     3voting = Orange.data.Table("voting") 
    44# table = Orange.data.Table("iris") 
    55 
    66for k in range(2, 8): 
    7     km = Orange.clustering.kmeans.Clustering(table, k, initialization=Orange.clustering.kmeans.init_diversity) 
     7    km = Orange.clustering.kmeans.Clustering(voting, k, initialization=Orange.clustering.kmeans.init_diversity) 
    88    score = Orange.clustering.kmeans.score_silhouette(km) 
    99    print k, score 
    1010 
    11 km = Orange.clustering.kmeans.Clustering(table, 3, initialization=Orange.clustering.kmeans.init_diversity) 
     11km = Orange.clustering.kmeans.Clustering(voting, 3, initialization=Orange.clustering.kmeans.init_diversity) 
    1212Orange.clustering.kmeans.plot_silhouette(km, "kmeans-silhouette.png") 
Note: See TracChangeset for help on using the changeset viewer.