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-advanced.py

    r9724 r9823  
    99 
    1010# Load some data 
    11 table = Orange.data.Table("iris.tab") 
     11iris = Orange.data.Table("iris.tab") 
    1212 
    1313# Construct a distance matrix using Euclidean distance 
    14 dist = Orange.distance.Euclidean(table) 
    15 matrix = Orange.core.SymMatrix(len(table)) 
    16 for i in range(len(table)): 
     14dist = Orange.core.ExamplesDistanceConstructor_Euclidean(iris) 
     15matrix = Orange.core.SymMatrix(len(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 Torgerson approximation and calculate stress 
     
    3434 
    3535# Print the points out 
    36 for (p, e) in zip(mds.points, table): 
     36for (p, e) in zip(mds.points, iris): 
    3737    print p, e 
Note: See TracChangeset for help on using the changeset viewer.