Changeset 7648:a3c43789905d in orange


Ignore:
Timestamp:
02/11/11 11:38:32 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
56c9df821126321da151877ee20ce7a1e8b07018
Message:
  • fixed renames of score_fastsilhuoette
File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/clustering/kmeans.py

    r7535 r7648  
    226226 
    227227    if index == None: 
    228         return avg([score_fastsilhouette(km, i) for i in range(len(km.data))]) 
     228        return avg([score_fast_silhouette(km, i) for i in range(len(km.data))]) 
    229229    cind = km.clusters[index] 
    230230    a = km.distance(km.data[index], km.centroids[km.clusters[index]]) 
     
    266266 
    267267def plot_silhouette(km, filename='tmp.png', fast=False): 
    268     """ Saves a silhuette plot to filename, showing the distributions of silhouette scores in clusters. kmeans is a k-means clustering object. If fast is True use score_fastsilhouette to compute scores instead of score_silhouette. 
     268    """ Saves a silhuette plot to filename, showing the distributions of silhouette scores in clusters. kmeans is a k-means clustering object. If fast is True use score_fast_silhouette to compute scores instead of score_silhouette. 
    269269 
    270270    :param km: a k-means clustering object. 
     
    272272    :param filename: name of output plot. 
    273273    :type filename: string 
    274     :param fast: if True use :func:`score_fastsilhouette` to compute scores instead of :func:`score_silhouette` 
     274    :param fast: if True use :func:`score_fast_silhouette` to compute scores instead of :func:`score_silhouette` 
    275275    :type fast: boolean. 
    276276 
     
    278278    import matplotlib.pyplot as plt 
    279279    plt.figure() 
    280     scoring = score_fastsilhouette if fast else score_silhouette 
     280    scoring = score_fast_silhouette if fast else score_silhouette 
    281281    scores = [[] for i in range(km.k)] 
    282282    for i, c in enumerate(km.clusters): 
Note: See TracChangeset for help on using the changeset viewer.