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/hierarchical.py

    r9723 r9724  
    310310The most common things to cluster are certainly examples. To show how to 
    311311this is done, we shall now load the Iris data set, initialize a distance 
    312 matrix with the distances measure by :class:`ExamplesDistance_Euclidean` 
     312matrix with the distances measure by :class:`Euclidean` 
    313313and cluster it with average linkage. Since we don't need the matrix, 
    314314we shall let the clustering overwrite it (not that it's needed for 
     
    321321    matrix = Orange.core.SymMatrix(len(data)) 
    322322    matrix.setattr("objects", data) 
    323     distance = Orange.distance.EuclideanConstructor(data) 
     323    distance = Orange.distance.Euclidean(data) 
    324324    for i1, instance1 in enumerate(data): 
    325325        for i2 in range(i1+1, len(data)): 
     
    475475 
    476476def clustering(data, 
    477                distance_constructor=orange.ExamplesDistanceConstructor_Euclidean, 
     477               distance_constructor=Orange.distance.Euclidean, 
    478478               linkage=AVERAGE, 
    479479               order=False, 
     
    484484    :type data: :class:`Orange.data.Table` 
    485485    :param distance_constructor: Instance distance constructor 
    486     :type distance_constructor: :class:`Orange.distance.ExamplesDistanceConstructor` 
     486    :type distance_constructor: :class:`Orange.distance.DistanceConstructor` 
    487487    :param linkage: Linkage flag. Must be one of global module level flags: 
    488488     
     
    15111511 
    15121512def instance_distance_matrix(data, 
    1513             distance_constructor=orange.ExamplesDistanceConstructor_Euclidean, 
     1513            distance_constructor=Orange.distance.Euclidean, 
    15141514            progress_callback=None): 
    15151515    """ A helper function that computes an :class:`Orange.core.SymMatrix` of all 
     
    15191519    :type data: :class:`Orange.data.Table` 
    15201520     
    1521     :param distance_constructor: An ExamplesDistance_Constructor instance. 
     1521    :param distance_constructor: An DistanceConstructor instance. 
    15221522    :type distance_constructor: :class:`Orange.distance.DistanceConstructor` 
    15231523     
Note: See TracChangeset for help on using the changeset viewer.