<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>E1n1verse &#187; MDS</title>
	<atom:link href="http://einiverse.eingang.org/tag/mds/feed/" rel="self" type="application/rss+xml" />
	<link>http://einiverse.eingang.org</link>
	<description>WoW, Learning, and Teaching by Michelle A. Hoyle</description>
	<lastBuildDate>Wed, 04 Jan 2012 13:17:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Metric MDS &amp; Data Delivered</title>
		<link>http://einiverse.eingang.org/2004/06/04/metric-mds-data-delivered/</link>
		<comments>http://einiverse.eingang.org/2004/06/04/metric-mds-data-delivered/#comments</comments>
		<pubDate>Sat, 05 Jun 2004 01:47:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[analys1s]]></category>
		<category><![CDATA[phd1ng]]></category>
		<category><![CDATA[analysis]]></category>
		<category><![CDATA[MatLab]]></category>
		<category><![CDATA[MDS]]></category>
		<category><![CDATA[meeting with supervisor]]></category>
		<category><![CDATA[metric]]></category>
		<category><![CDATA[multidimensional scaling]]></category>
		<category><![CDATA[progress]]></category>
		<category><![CDATA[tasks]]></category>

		<guid isPermaLink="false">http://einiverse.eingang.org/blogs/2004/06/04/metric-mds-data-delivered/</guid>
		<description><![CDATA[I had a good meeting with Thufir on May 14th, lasting almost the full allotted hour. This was because I&#8217;ve recently had a breakthrough with my MATLAB analysis and can quantitatively evaluate the similarity between different people or different algorithms with my multi-dimensional scaling (MDS) diagrams. I took some output to the meeting which compared [...]]]></description>
			<content:encoded><![CDATA[<p>I had a good meeting with <abbr title="Names have been changed to protected the innocent.  Thufir Hawat is my supervisor">Thufir</abbr> on May 14th, lasting almost the full allotted hour.  This was because I&#8217;ve recently had a breakthrough with my MATLAB analysis and can quantitatively evaluate the similarity between different people or different algorithms with my multi-dimensional scaling (MDS) diagrams.  I took some output to the meeting which compared my half-baked algorithm against the cosine normalization version.  Both use hypernyms, but how they weigh the hypernyms is different.  My automated analysis algorithm also produces an MDS cluster diagram as output for each of the data files provided (see anal1ahyper and anal2ahyper).</p>
<p align="center"><a href="/archives/images/anal1ahyper060404.html" title="Click for full-size version of this image"><img src="/archives/images/anal1ahyper060404-thumb.png" width="50%" height="50%" border="0" alt="Multidimensional scaling visual representation of document similarity using Anal1a" /></a></p>
<p align="center"><a href="/archives/images/anal2ahyper060404.html" title="Click for full-size version of this image"><img src="/archives/images/anal2ahyper060404-thumb.png" width="50%" height="50%" border="0" alt="Multidimensional scaling visual representation of document similarity using Anal2a" /></a></p>
<p>Anal1a, in terms of clumping, doesn&#8217;t look very good, at least not anymore.   That was not previously the case, but I had revised my algorithm to make it symmetrical as per the insructions of a computing statistician here at the University of Sussex.  He claimed that the Procrustes Rotation needed symmetric data and my nonsymmetric data, where Doc1 vs Doc2 didn&#8217;t have the same similarity as Doc2 vs Doc1, was not going to work.  That change has, I believe, altered the efficacy of the algorithm and things are no longer clumped together as promisingly as they were previously.    The clumps should be a two- or three-letter short code followed by a digit.  Therefore, ac1 and ac2 belong together.  Pl1, pl2, and pl3 belong together, and so on.  The clumping is significantly better in the already symmetric cosine normalization algorithm (anal2a).  The two speech processing documents are clumped together (sp1 and sp2), all of the Power PC and G4 documents are together (pp1, pp2, g4c), and the three Pine Lake tornado stories are clumped far away from everything else (which is all computer-related) and together on their own.  Excellent clumping, in fact.  So the hypernym hypothesis looks like, on these short documents, it is working well with cosine normalization.</p>
<p align="center"><a href="/archives/images/anal1ahyperVsala2ahyper060404.html" title="Click for full-size version of this image"><img src="http://einiverse.eingang.org/archives/images/anal1ahyperVsala2ahyper060404-thumb.png" width="50%" height="50%" border="0" alt="Visual representation of Anal1a mapped onto Anal2a using Procrustes Rotation" /></a></p>
<p>Here&#8217;s the final bit of loveliness: comparing one MDS cluster diagram against another.  MDS output is mapped to the vector space independently.  That is, the same data will produce the same visualization or mapping, but different data is mapped to a different vector space, so you cannot just compare one MDS matrix to another directly.  That is where Procrustes Rotation comes in.  It applies a series of intelligent matrix transformations, trying to map the second vector matrix onto the source vector matrix.  As a side benefit, essential in my case, it always provides a fitness measure to tell you how close the two were. on a scale of 0 to 1.  So these two, as you can see (see above image), even after the transformations, were not that close together.  As it happens, though, this is not particularly useful information to know.  I am currently more interested in assessing how close the two algorithms are to human classifiers.</p>
<p>This recent success gave us plenty to discuss, particularly with respect to metric and non-metric data.  The MDS community calls source data metric when the similarity or dissimilarity data is symmetric.   That is, the value at row 2, column 1 is the same as the value at row 1, column 2.  Classical multi-dimensional scaling (MDS) is designed to only work with metric data.  SPSS includes the ALSCAL and PROXSCAL MDS algorithms which can work with non-metric data, but MATLAB&#8217;s classical MDS does not because it treats things as Eucledean distances&#8211;another reason why I had to alter the Anal1a algorithm.  The primary reason I now had metric data for everything, however, was because the computing statistician had told me I needed it for the Procrustes.  Hawever, as we were examining my output, it occurred to me that Procrustes did not really care if the data was symmetric, so long as the dimensions of the data were the same (the same number of rows and columns).   Which leads us to question whether the application of the method is statistically sensible or not.    To that end, I need to track down a new computing statistician and perhaps a mathematician and discuss the process with them.  My original computing statistician has retired. </p>
<p>Earlier I said that comparing one machine to another, to see how they fit is not useful information, but what would be interesting is to prepare a matrix of all the possible combinations of human judgements, cosine normalization, and weird formula:</p>
<pre>
cosine   wrd form.   human
cosine (anal2a)		x
weird formula (anal1a)           x
human                                        x
</pre>
<p>So that is my task for my next meeting (on the 16th of June).  Before then, I need to figure out how to get MATLAB to take multiple tables as data.  In SPSS, I could paste in several tables (representing all of the people&#8217;s individual data, for example) and it would work with that.   That is necessary in order to aggregate the peopel to do the comparison.  Onward ho, then!  Progress at last!</p>
<p><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Feiniverse.eingang.org%2F2004%2F06%2F04%2Fmetric-mds-data-delivered%2F&amp;linkname=Metric%20MDS%20%26amp%3B%20Data%20Delivered" title="Twitter" rel="nofollow" target="_blank"><img src="http://einiverse.eingang.org/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_diigo" href="http://www.addtoany.com/add_to/diigo?linkurl=http%3A%2F%2Feiniverse.eingang.org%2F2004%2F06%2F04%2Fmetric-mds-data-delivered%2F&amp;linkname=Metric%20MDS%20%26amp%3B%20Data%20Delivered" title="Diigo" rel="nofollow" target="_blank"><img src="http://einiverse.eingang.org/wp-content/plugins/add-to-any/icons/diigo.png" width="16" height="16" alt="Diigo"/></a><a class="a2a_button_friendfeed" href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Feiniverse.eingang.org%2F2004%2F06%2F04%2Fmetric-mds-data-delivered%2F&amp;linkname=Metric%20MDS%20%26amp%3B%20Data%20Delivered" title="FriendFeed" rel="nofollow" target="_blank"><img src="http://einiverse.eingang.org/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Feiniverse.eingang.org%2F2004%2F06%2F04%2Fmetric-mds-data-delivered%2F&amp;title=Metric%20MDS%20%26amp%3B%20Data%20Delivered" id="wpa2a_2">Share/Save</a></p>]]></content:encoded>
			<wfw:commentRss>http://einiverse.eingang.org/2004/06/04/metric-mds-data-delivered/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dirty Data Done Dirt Cheap</title>
		<link>http://einiverse.eingang.org/2004/06/04/dirty-data-done-dirt-cheap/</link>
		<comments>http://einiverse.eingang.org/2004/06/04/dirty-data-done-dirt-cheap/#comments</comments>
		<pubDate>Fri, 04 Jun 2004 16:44:15 +0000</pubDate>
		<dc:creator>Eingang</dc:creator>
				<category><![CDATA[analys1s]]></category>
		<category><![CDATA[phd1ng]]></category>
		<category><![CDATA[analysis]]></category>
		<category><![CDATA[MatLab]]></category>
		<category><![CDATA[MDS]]></category>
		<category><![CDATA[phd process]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://einiverse.eingang.org/blogs/2004/06/04/dirty-data-done-dirt-cheap/</guid>
		<description><![CDATA[I have to confess to feeling a bit stupid. I have been struggling with MATLAB for weeks now, trying to get it to read in my data files so I can automate my analyses. My data is in a tab-delimited file and looks something like: Doc1 Doc2 Doc3 Doc4 Doc1 100 76 18 91 Doc2 [...]]]></description>
			<content:encoded><![CDATA[<p>I have to confess to feeling a bit stupid.  I have been struggling with MATLAB for weeks now, trying to get it to read in my data files so I can automate my analyses.  My data is in a tab-delimited file and looks something like:</p>
<pre>
Doc1	Doc2	Doc3	Doc4
Doc1	100	76	18	91
Doc2	76	100	22	35
Doc3	18	22	100	65
Doc4	91	34	65	100
</pre>
<p>This is not too dissimilar from the <a href="http://www.ece.osu.edu/matlab/techdoc/matlab_env/import_5.html#35378">labelled diagram</a>, part of the MATLAB documentation on data importing.  Except that, if you look at the table below it, which describes which functions to use, they don&#8217;t have a function with a similar example to their labelled diagram.  Early on I thought I should be able to use <a href="http://www.ece.osu.edu/matlab/techdoc/ref/dlmread.html">dlmread</a>, which allows you specify rows/columns for starting points or a range.  My idea was just to have a range which excluded the non-numeric troublesome labels.   No matter what I did, though, I could not get it to work.  It was frustrating, because I could paste the data into the Import Wizard and that could handle the data fine.  I wrote people, I researched on the web, and I tried all sorts of things.  </p>
<p>Eventually, I came full-circle back to dlmread and experimented by making a small data file with unrelated data in it.  That worked fine.  So I then copied half of one of my data tables into the test file and tried that.  That also worked fine.  I copied the whole data table into the test file and used dlmread on it.  It worked fine!  What was the difference between the two identical data files other than their filenames?  When I uncovered the answer to that, I kicked myself.  My data files were generated years ago and stored on my Mac OS 9-based laptop.  My laptop and the data have since migrated to Apple&#8217;s swoopy <a href="http://www.apple.com/panther/">BSD-based</a> UNIX goodness and that&#8217;s the environment that MATLAB runs under.  So&#8230;  Have you guessed the problem?  Yes, it was linefeeds!  The data files had original Mac linefeeds and MATLAB wanted UNIX linefeeds.  D&#8217;oh!  It just goes to reaffirm that the things you don&#8217;t see can really hurt you.</p>
<p><span id="more-60"></span><br />
Once that was solved, work proceded rapidly apace as I was now able to finish automating the whole comparison process from start to finish.</p>
<pre>
function  [Anal1Raw, Anal2Raw, Anal1MDS, Anal2MDS, fit] =
processEinCiteData(firstFile, secondFile, runName, labels)
% Read in the similarity matrices from the two data files
Anal1Raw = dlmread(firstFile, '\t', 1, 1);
Anal2Raw = dlmread(secondFile, '\t', 1, 1);
% Set up default document name labels if we didn't get any
if nargin &lt; 4
labels = {&#39;g4c&#39;, &#39;pp1&#39;, &#39;pp2&#39;, &#39;msc&#39;, &#39;pl1&#39;, &#39;pl2&#39;, &#39;pl3&#39;, &#39;sp1&#39;, &#39;sp2&#39;, &#39;ac1&#39;, &#39;ac2&#39;, &#39;bws&#39;};
if nargin &lt; 3
runName = &#39;&#39;;
end
end
% Set up labels for the filenames
fileName1 = regexprep(firstFile, &#39;\..*$&#39;, &#39;&#39;);
fileName2 = regexprep(secondFile, &#39;\..*$&#39;, &#39;&#39;);
% Convert the similarity data to numbers below 1 for use in MDS
Anal1Raw = abs(100 - Anal1Raw)
Anal2Raw = abs(100 - Anal2Raw)
% Calculate the MDS and prepare a diagram showing the
% clusterings for the first document
[Anal1MDS, eigvals] = cmdscale(Anal1Raw);
figure(1);
plot(1:length(eigvals),eigvals,&#39;bo-&#39;);
graph2d.constantline(0,&#39;LineStyle&#39;,&#39;:&#39;,&#39;Color&#39;,[.7 .7 .7]);
axis([1,length(eigvals),min(eigvals),max(eigvals)*1.1]);
xlabel(&#39;Eigenvalue number&#39;);
ylabel(&#39;Eigenvalue&#39;);
plot(Anal1MDS(:,1),Anal1MDS(:,2),&#39;bo&#39;, &#39;MarkerFaceColor&#39;, &#39;b&#39;, &#39;MarkerSize&#39;, 10);
axis(max(max(abs(Anal1MDS))) * [-1.1,1.1,-1.1,1.1]); axis(&#39;square&#39;);
text(Anal1MDS(:,1)+1.5,Anal1MDS(:,2),labels,&#39;HorizontalAlignment&#39;,&#39;left&#39;);
hx = graph2d.constantline(0,&#39;LineStyle&#39;,&#39;-&#39;,&#39;Color&#39;,[.7 .7 .7]);
hx = changedependvar(hx,&#39;x&#39;);
hy = graph2d.constantline(0,&#39;LineStyle&#39;,&#39;-&#39;,&#39;Color&#39;,[.7 .7 .7]);
hy = changedependvar(hy,&#39;y&#39;);
title([&#39;\fontname{lucida}\fontsize{18}&#39; fileName1 &#39; MDS&#39;]);
xlabel([&#39;\fontname{lucida}\fontsize{14}&#39; runName &#39; on &#39; date], &#39;FontWeight&#39;, &#39;bold&#39;);
% Calculate the MDS and prepare a diagram showing the
% clusterings for the second document
[Anal2MDS, eigvals] = cmdscale(Anal2Raw);
figure(2);
plot(1:length(eigvals),eigvals,&#39;rd-&#39;);
graph2d.constantline(0,&#39;LineStyle&#39;,&#39;:&#39;,&#39;Color&#39;,[.7 .7 .7]);
axis([1,length(eigvals),min(eigvals),max(eigvals)*1.1]);
xlabel(&#39;Eigenvalue number&#39;);
ylabel(&#39;Eigenvalue&#39;);
plot(Anal2MDS(:,1),Anal2MDS(:,2),&#39;rd&#39;, &#39;MarkerFaceColor&#39;, &#39;r&#39;, &#39;MarkerSize&#39;, 10);
axis(max(max(abs(Anal2MDS))) * [-1.1,1.1,-1.1,1.1]); axis(&#39;square&#39;);
text(Anal2MDS(:,1)+1.5,Anal2MDS(:,2),labels,&#39;HorizontalAlignment&#39;,&#39;left&#39;);
hx = graph2d.constantline(0,&#39;LineStyle&#39;,&#39;-&#39;,&#39;Color&#39;,[.7 .7 .7]);
hx = changedependvar(hx,&#39;x&#39;);
hy = graph2d.constantline(0,&#39;LineStyle&#39;,&#39;-&#39;,&#39;Color&#39;,[.7 .7 .7]);
hy = changedependvar(hy,&#39;y&#39;);
title([&#39;\fontname{lucida}\fontsize{18}&#39; fileName2 &#39; MDS&#39;]);
xlabel([&#39;\fontname{lucida}\fontsize{14}&#39; runName &#39; on &#39; date], &#39;FontWeight&#39;, &#39;bold&#39;);
% Apply Procrustes to the two MDS results to map them
% into the same vector space and prepare a plot of the
% result
[fit, Z, transform] = procrustes(Anal1MDS, Anal2MDS);
figure(3);
plot(Anal1MDS(:,1), Anal1MDS(:,2), &#39;bo&#39;,&#39;MarkerFaceColor&#39;, &#39;b&#39;, &#39;MarkerSize&#39;, 10);
hold on
plot(Z(:,1), Z(:,2), &#39;rd&#39;, &#39;MarkerFaceColor&#39;, &#39;r&#39;, &#39;MarkerSize&#39;, 10);
hold off
text(Anal1MDS(:,1)+1.5,Anal1MDS(:,2), labels, &#39;Color&#39;, &#39;b&#39;);
text(Z(:,1)+1.5,Z(:,2),labels, &#39;Color&#39;, &#39;r&#39;);
xlabel([&#39;\fontname{lucida}\fontsize{14}&#39; runName &#39; on &#39; date], &#39;FontWeight&#39;, &#39;bold&#39;);
ylabel([&#39;\fontname{lucida}\fontsize{14}&#39; &#39;fit = &#39; num2str(fit, &#39;%2.4f&#39;)], &#39;FontWeight&#39;, &#39;bold&#39;);
titleStr = [&#39;\fontname{lucida}\fontsize{18}&#39; fileName1 ...
&#39; compared to &#39; fileName2];
title(titleStr, &#39;HorizontalAlignment&#39;, &#39;center&#39;, ...
&#39;VerticalAlignment&#39;, &#39;bottom&#39;);
legend({firstFile, secondFile}, 4);
</pre>
<p>At the end, I had a quantitative number, the degree of fit, between two diagrams after applying the Procrustes Rotation to them.  Finally!  On a whim, I fed in the same data table as both arguments to my comparison program.  That is, I compared the same data file to itself.  My hypothesis was that the resultant degree of fit should be either 0 or 1 (depending on which the fitness was measured).  Much to my surprise, no matter which data file I used, the result was never 0 or 1.   My previous Procrustes Analysis code was taken from some sample code in the MATLAB documentation and looked like: [D,Z] = procrustes(Anal1aMDS, Anal2aMDS(:,1:2));   That last bit in () is some kind of MATLAB scaling, which, being a novice to MATLAB, I didn&#8217;t realize.  So, in fact, my two diagrams weren&#8217;t the same which is why I wasn&#8217;t getting a 100% degree of fit.  I do not want to say how long it took me to narrow that down.  Once I did, though, it looked like I was basically set and I was able to quickly produce some comparisons between my &#8220;weird&#8221; half-baked metric and the cosine normalization one. One small step for EinKind.</p>
<p>This is a delayed entry from May 12th, 2004.</p>
<p><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Feiniverse.eingang.org%2F2004%2F06%2F04%2Fdirty-data-done-dirt-cheap%2F&amp;linkname=Dirty%20Data%20Done%20Dirt%20Cheap" title="Twitter" rel="nofollow" target="_blank"><img src="http://einiverse.eingang.org/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_diigo" href="http://www.addtoany.com/add_to/diigo?linkurl=http%3A%2F%2Feiniverse.eingang.org%2F2004%2F06%2F04%2Fdirty-data-done-dirt-cheap%2F&amp;linkname=Dirty%20Data%20Done%20Dirt%20Cheap" title="Diigo" rel="nofollow" target="_blank"><img src="http://einiverse.eingang.org/wp-content/plugins/add-to-any/icons/diigo.png" width="16" height="16" alt="Diigo"/></a><a class="a2a_button_friendfeed" href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Feiniverse.eingang.org%2F2004%2F06%2F04%2Fdirty-data-done-dirt-cheap%2F&amp;linkname=Dirty%20Data%20Done%20Dirt%20Cheap" title="FriendFeed" rel="nofollow" target="_blank"><img src="http://einiverse.eingang.org/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Feiniverse.eingang.org%2F2004%2F06%2F04%2Fdirty-data-done-dirt-cheap%2F&amp;title=Dirty%20Data%20Done%20Dirt%20Cheap" id="wpa2a_4">Share/Save</a></p>]]></content:encoded>
			<wfw:commentRss>http://einiverse.eingang.org/2004/06/04/dirty-data-done-dirt-cheap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dimensional MATLAB Reading</title>
		<link>http://einiverse.eingang.org/2003/09/23/dimensional-matlab-reading/</link>
		<comments>http://einiverse.eingang.org/2003/09/23/dimensional-matlab-reading/#comments</comments>
		<pubDate>Tue, 23 Sep 2003 17:15:48 +0000</pubDate>
		<dc:creator>Michelle</dc:creator>
				<category><![CDATA[analys1s]]></category>
		<category><![CDATA[analysis]]></category>
		<category><![CDATA[MatLab]]></category>
		<category><![CDATA[matrices]]></category>
		<category><![CDATA[MDS]]></category>
		<category><![CDATA[multidimensional scaling]]></category>

		<guid isPermaLink="false">http://einiverse.eingang.org/blogs/2003/09/23/dimensional-matlab-reading/</guid>
		<description><![CDATA[Played around a little more with MATAB, although I didn&#8217;t really get very far. I was trying to figure out how to use dlmread to import my data files properly into MATLAB automatically. It didn&#8217;t really seem to want to fly somehow. I spent some time trying to figure out how to automate my MATLAB [...]]]></description>
			<content:encoded><![CDATA[<p>Played around a little more with MATAB, although I didn&#8217;t really get very far.  I was trying to figure out how to use dlmread to import my data files properly into MATLAB automatically.  It didn&#8217;t really seem to want to fly somehow.<br />
I spent some time trying to figure out how to automate my MATLAB work.    I couldn&#8217;t figure out how to get it to import the tab-delimited data files that my programs had produced using the dlmread command which should put it into a matrix.  I can do it via the clipboard but not anyway else at the moment.  Reviewing various MATLAB tutorials on the web, looking for hints, I realized that I need to review my understanding and knowledge of matrices again, so I&#8217;ve added this to my list of things to be done.<br />
Assuming that my methodology is correct, which it might not be, I can now map one MDS cluttering onto another using the Procrustes in MATLAB.  I need to figure out now how to get a single measure of how different the two are from that.  I&#8217;m at least further along than before, so that&#8217;s promising.</p>
<p><span id="more-44"></span><br />
This is my current revised program:<br />
% Import anal1ahyp.txt into anal1a matrix variable.  Do this first!  It&#8217;s not done<br />
% automatically here.   Need first to do something like anal1a = abs(100 &#8211; anal1a) to<br />
% get proper dissimilarity values to work with.  The default ones in the files don&#8217;t<br />
% work as is.<br />
docs = {&#8216;g4c&#8217;, &#8216;pp1&#8242;, &#8216;pp2&#8242;, &#8216;msc&#8217;, &#8216;pl1&#8242;, &#8216;pl2&#8242;, &#8216;pl3&#8242;, &#8216;sp1&#8242;, &#8216;sp2&#8242;, &#8216;ac1&#8242;, &#8216;ac2&#8242;, &#8216;bws&#8217;};<br />
[Anal1aMDS, eigvals] = cmdscale(Anal1aRaw);<br />
plot(1:length(eigvals),eigvals,&#8217;bo-&#8217;);<br />
graph2d.constantline(0,&#8217;LineStyle&#8217;,':&#8217;,'Color&#8217;,[.7 .7 .7]);<br />
axis([1,length(eigvals),min(eigvals),max(eigvals)*1.1]);<br />
xlabel(&#8216;Eigenvalue number&#8217;);<br />
ylabel(&#8216;Eigenvalue&#8217;);<br />
plot(Anal1aMDS(:,1),Anal1aMDS(:,2),&#8217;bx&#8217;);<br />
axis(max(max(abs(Anal1aMDS))) * [-1.1,1.1,-1.1,1.1]); axis(&#8216;square&#8217;);<br />
text(Anal1aMDS(:,1),Anal1aMDS(:,2),docs,&#8217;HorizontalAlignment&#8217;,'left&#8217;);<br />
hx = graph2d.constantline(0,&#8217;LineStyle&#8217;,'-&#8217;,'Color&#8217;,[.7 .7 .7]);<br />
hx = changedependvar(hx,&#8217;x');<br />
hy = graph2d.constantline(0,&#8217;LineStyle&#8217;,'-&#8217;,'Color&#8217;,[.7 .7 .7]);<br />
hy = changedependvar(hy,&#8217;y');<br />
% Import anal2ahyp.txt into anal2a matrix variable.  Do this first!  It&#8217;s not done<br />
% automatically here.<br />
Anal2aRaw = abs(100 &#8211; Anal2aRaw);<br />
[Anal2aMDS, eigvals] = cmdscale(Anal2aRaw);<br />
% do procustes<br />
[D,Z] = procrustes(Anal1aMDS, Anal2aMDS(:,1:2));<br />
plot(Anal1aMDS(:,1), Anal1aMDS(:,2), &#8216;bo&#8217;, Z(:,1), Z(:,2), &#8216;rd&#8217;);<br />
text(Anal1aMDS(:,1)+0.5,Anal1aMDS(:,2), docs, &#8216;Color&#8217;, &#8216;b&#8217;);<br />
text(Z(:,1)+0.5,Z(:,2),docs, &#8216;Color&#8217;, &#8216;r&#8217;);<br />
xlabel(&#8216;East of the Sun&#8217;);<br />
ylabel(&#8216;West of the Moon&#8217;);<br />
legend({&#8216;Anal1a&#8217;, &#8216;Anal2a&#8217;}, 4);</p>
<p><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Feiniverse.eingang.org%2F2003%2F09%2F23%2Fdimensional-matlab-reading%2F&amp;linkname=Dimensional%20MATLAB%20Reading" title="Twitter" rel="nofollow" target="_blank"><img src="http://einiverse.eingang.org/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_diigo" href="http://www.addtoany.com/add_to/diigo?linkurl=http%3A%2F%2Feiniverse.eingang.org%2F2003%2F09%2F23%2Fdimensional-matlab-reading%2F&amp;linkname=Dimensional%20MATLAB%20Reading" title="Diigo" rel="nofollow" target="_blank"><img src="http://einiverse.eingang.org/wp-content/plugins/add-to-any/icons/diigo.png" width="16" height="16" alt="Diigo"/></a><a class="a2a_button_friendfeed" href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Feiniverse.eingang.org%2F2003%2F09%2F23%2Fdimensional-matlab-reading%2F&amp;linkname=Dimensional%20MATLAB%20Reading" title="FriendFeed" rel="nofollow" target="_blank"><img src="http://einiverse.eingang.org/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Feiniverse.eingang.org%2F2003%2F09%2F23%2Fdimensional-matlab-reading%2F&amp;title=Dimensional%20MATLAB%20Reading" id="wpa2a_6">Share/Save</a></p>]]></content:encoded>
			<wfw:commentRss>http://einiverse.eingang.org/2003/09/23/dimensional-matlab-reading/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

