Ignore:
Timestamp:
02/07/12 22:35:42 (2 years ago)
Author:
Matija Polajnar <matija.polajnar@…>
Branch:
default
Message:

Remove links from documentation to datasets. Remove datasets reference directory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/clustering/kmeans.py

    r9977 r9994  
    1616 
    1717The following code runs k-means clustering and prints out the cluster indexes 
    18 for the last 10 data instances (:download:`kmeans-run.py <code/kmeans-run.py>`, uses :download:`iris.tab <code/iris.tab>`): 
     18for the last 10 data instances (:download:`kmeans-run.py <code/kmeans-run.py>`): 
    1919 
    2020.. literalinclude:: code/kmeans-run.py 
     
    2929o be computed at each iteration we have to set :obj:`minscorechange`, but we can 
    3030leave it at 0 or even set it to a negative value, which allows the score to deteriorate 
    31 by some amount (:download:`kmeans-run-callback.py <code/kmeans-run-callback.py>`, uses :download:`iris.tab <code/iris.tab>`): 
     31by some amount (:download:`kmeans-run-callback.py <code/kmeans-run-callback.py>`): 
    3232 
    3333.. literalinclude:: code/kmeans-run-callback.py 
     
    4444    Iteration: 8, changes: 0, score: 9.8624 
    4545 
    46 Call-back above is used for reporting of the progress, but may as well call a function that plots a selection data projection with corresponding centroid at a given step of the clustering. This is exactly what we did with the following script (:download:`kmeans-trace.py <code/kmeans-trace.py>`, uses :download:`iris.tab <code/iris.tab>`): 
     46Call-back above is used for reporting of the progress, but may as well call a function that plots a selection data projection with corresponding centroid at a given step of the clustering. This is exactly what we did with the following script (:download:`kmeans-trace.py <code/kmeans-trace.py>`): 
    4747 
    4848.. literalinclude:: code/kmeans-trace.py 
     
    8282and finds more optimal centroids. The following code compares three different  
    8383initialization methods (random, diversity-based and hierarchical clustering-based)  
    84 in terms of how fast they converge (:download:`kmeans-cmp-init.py <code/kmeans-cmp-init.py>`, uses :download:`iris.tab <code/iris.tab>`, 
    85 :download:`housing.tab <code/housing.tab>`, :download:`vehicle.tab <code/vehicle.tab>`): 
     84in terms of how fast they converge (:download:`kmeans-cmp-init.py <code/kmeans-cmp-init.py>`): 
    8685 
    8786.. literalinclude:: code/kmeans-cmp-init.py 
     
    9695 
    9796The following code computes the silhouette score for k=2..7 and plots a  
    98 silhuette plot for k=3 (:download:`kmeans-silhouette.py <code/kmeans-silhouette.py>`, uses :download:`iris.tab <code/iris.tab>`): 
     97silhuette plot for k=3 (:download:`kmeans-silhouette.py <code/kmeans-silhouette.py>`): 
    9998 
    10099.. literalinclude:: code/kmeans-silhouette.py 
Note: See TracChangeset for help on using the changeset viewer.