Ignore:
Timestamp:
02/06/12 20:01:02 (2 years ago)
Author:
lanumek
Branch:
default
Children:
9835:e48466fc6eb2, 9841:05a160804431
rebase_source:
8cf30121654f25c9cb6d8ac9bdaf163e305d62da
Message:

Changed names of data sets (table replaced with data or name of the data set).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/reference/rst/code/mds-euclid-torgerson-3d.py

    r9724 r9823  
    88 
    99# Load some data 
    10 table = Orange.data.Table("iris.tab") 
     10iris = Orange.data.Table("iris.tab") 
    1111 
    1212# Construct a distance matrix using Euclidean distance 
    13 dist = Orange.distance.Euclidean(table) 
    14 matrix = Orange.core.SymMatrix(len(table)) 
    15 matrix.setattr('items', table) 
    16 for i in range(len(table)): 
     13dist = Orange.distance.instances.EuclideanConstructor(iris) 
     14matrix = Orange.core.SymMatrix(len(iris)) 
     15matrix.setattr('items', iris) 
     16for i in range(len(iris)): 
    1717    for j in range(i+1): 
    18         matrix[i, j] = dist(table[i], table[j]) 
     18        matrix[i, j] = dist(iris[i], iris[j]) 
    1919 
    2020# Run the MDS 
Note: See TracChangeset for help on using the changeset viewer.