Changeset 9724:318e91106d47 in orange for Orange/clustering/kmeans.py

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

Renames in Orange.distance.

File:
1 edited

Unmodified
Removed
• Orange/clustering/kmeans.py

 r9671 :param k: the number of clusters. :type k: integer :param distfun: a distance function. :type distfun: :class:`orange.ExamplesDistance` """ """ return data.getitems(random.sample(range(len(data)), k)) :type k: integer :param distfun: a distance function. :type distfun: :class:`orange.ExamplesDistance` :type distfun: :class:`Orange.distance.Distance` """ center = data_center(data) :type k: integer :param distfun: a distance function. :type distfun: :class:`orange.ExamplesDistance` :type distfun: :class:`Orange.distance.Distance` """ sample = orange.ExampleTable(random.sample(data, min(self.n, len(data)))) def __init__(self, data=None, centroids=3, maxiters=None, minscorechange=None, stopchanges=0, nstart=1, initialization=init_random, distance=orange.ExamplesDistanceConstructor_Euclidean, distance=Orange.distance.Euclidean, scoring=score_distance_to_centroids, inner_callback = None, outer_callback = None): :type nstart: integer :param distance: an example distance constructor, which measures the distance between two instances. :type distance: :class:`orange.ExamplesDistanceConstructor` :type distance: :class:`Orange.distance.DistanceConstructor` :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`). :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.