Ignore:
Timestamp:
02/06/12 13:52:55 (2 years ago)
Author:
markotoplak
Branch:
default
Children:
9725:6c16952df555, 9752:cbd6f6f10f06
rebase_source:
be8730bf9f2e7e771332dfc8b3876c8a62826bd1
Message:

Renames in Orange.distance.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/clustering/kmeans.py

    r9671 r9724  
    294294    :param k: the number of clusters. 
    295295    :type k: integer 
    296     :param distfun: a distance function. 
    297     :type distfun: :class:`orange.ExamplesDistance` 
    298      """ 
     296    """ 
    299297    return data.getitems(random.sample(range(len(data)), k)) 
    300298 
     
    307305    :type k: integer 
    308306    :param distfun: a distance function. 
    309     :type distfun: :class:`orange.ExamplesDistance` 
     307    :type distfun: :class:`Orange.distance.Distance` 
    310308    """ 
    311309    center = data_center(data) 
     
    338336        :type k: integer 
    339337        :param distfun: a distance function. 
    340         :type distfun: :class:`orange.ExamplesDistance` 
     338        :type distfun: :class:`Orange.distance.Distance` 
    341339        """ 
    342340        sample = orange.ExampleTable(random.sample(data, min(self.n, len(data)))) 
     
    393391    def __init__(self, data=None, centroids=3, maxiters=None, minscorechange=None, 
    394392                 stopchanges=0, nstart=1, initialization=init_random, 
    395                  distance=orange.ExamplesDistanceConstructor_Euclidean, 
     393                 distance=Orange.distance.Euclidean, 
    396394                 scoring=score_distance_to_centroids, inner_callback = None, 
    397395                 outer_callback = None): 
     
    404402        :type nstart: integer 
    405403        :param distance: an example distance constructor, which measures the distance between two instances. 
    406         :type distance: :class:`orange.ExamplesDistanceConstructor` 
     404        :type distance: :class:`Orange.distance.DistanceConstructor` 
    407405        :param initialization: a function to select centroids given data instances, k and a example distance function. This module implements different approaches (:func:`init_random`, :func:`init_diversity`, :class:`init_hclustering`).  
    408406        :param scoring: a function that takes clustering object and returns the clustering score. It could be used, for instance, in procedure that repeats the clustering nstart times, returning the clustering with the lowest score. 
Note: See TracChangeset for help on using the changeset viewer.