source: orange/Orange/doc/widgets/Unsupervised/DistanceFile.htm @ 9671:a7b056375472

Revision 9671:a7b056375472, 3.4 KB checked in by anze <anze.staric@…>, 2 years ago (diff)

Moved orange to Orange (part 2)

Line 
1<html>
2<head>
3<title>Distance File</title>
4<link rel=stylesheet href="../../../style.css" type="text/css" media=screen>
5<link rel=stylesheet href="../../../style-print.css" type="text/css" media=print></link>
6</head>
7
8<body>
9
10<h1>Distance File</h1>
11
12<img class="screenshot" src="../icons/DistanceFile.png">
13<p>Computes distances between examples in the data set</p>
14
15<h2>Channels</h2>
16
17<h3>Inputs</h3>
18
19<DL class=attributes>
20<DT>Examples</DT>
21<DD>A list of examples</DD>
22</dl>
23
24<h3>Outputs</h3>
25<DL class="attributes">
26<DT>Distance Matrix</DT>
27<DD>A matrix of example distances</DD>
28</dl>
29
30<h2>Description</h2>
31
32<p>Loads a distance matrix from a text file.</p>
33
34<p>The first line in the file has to start with the number of items - the dimension of the matrix. It can be followed by the word <em>labeled</em> or <em>labelled</em> if the file also contains the labels for the items. The rest of the file is the matrix, where the elements are separated by tabulators. If the items are labelled, the label has to be put in front of each line. The matrix can be given with the lower or the upper part, or both. Here are two examples.</p>
35
36<table>
37<tr><td><xmp>4
380.1
390.5    0.3
400.7    0.9    0.2
410.2    0.8    0.6    0.5
42</xmp></td>
43<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
44<td><xmp>4 labelled
45john   0.1
46joe    0.5    0.3
47jack   0.7    0.9    0.2
48jane   0.2    0.8    0.6    0.5
49</xmp>
50</td></tr></table>
51
52<img class="leftscreenshot" src="DistanceFile.png" alt="Distance File Widget" border=0>
53
54<P>The file is selected using button <span class="option">...</span>, which opens a file browser. File extension is arbitrary.</P>
55
56<p>Sometimes we get the labels in a separate example table. Say that we have a set of 15 examples in a data file, and the distance matrix represents distances between these examples. In this case, we would connect the widget providing these 15 examples (say a <a href="../Data/File.htm">File widget</a>) to the input of Distance File and select <span class="option">Use examples as items</span> in Items from input data. Distance File would attach the examples to the distance matrix, so further widget can, for instance, use a user-selected attribute to label the items.</p>
57
58<p>In another scenario, the distance matrix would represent distances between attributes of some data table. We similarly connect a data providing widget to Distance File, but select <span class="option">Use attribute names</span>. Distance File then labels the items with the names of the attributes.</p>
59
60<h2>Examples</h2>
61
62<P>The first schema loads the labelled distance file above and shows it with the <a href="DistanceMap.htm">Distance Map widget</a>.</P>
63
64<img class="screenshot" src="DistanceFile1-Schema.png"/>
65
66<img class="screenshot" style="clear:both" src="DistanceFile-DistanceMap1.png"/>
67
68<P>In the second schema the labels come from a file. The labels given in the file loaded by Distance File are replaced by the attribute names (since we checked <span class="option">Use attribute names</span>.</P>
69
70<img class="screenshot" src="DistanceFile2-Schema.png"/>
71
72<p>In the file widget we loaded the Iris data set, and the resulting distance map looks like this.</p>
73
74<img class="screenshot" style="clear:both" src="DistanceFile-DistanceMap2.png"/>
75
76<p>The widget can of course be connected to any other widget that can do something useful with the distances, such as <a href="MDS.htm">MDS</a> or <a href="HiearchicalClustering.htm">Hierarchical Clustering</a>.</p>
77
78</body>
79</html>
Note: See TracBrowser for help on using the repository browser.