<?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>Statistical Machine Learning and Visualization</title>
	<atom:link href="http://smlv.cc.gatech.edu/feed/" rel="self" type="application/rss+xml" />
	<link>http://smlv.cc.gatech.edu</link>
	<description>At the Georgia Institute of Technology</description>
	<lastBuildDate>Wed, 27 Feb 2013 04:48:32 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>New Book on Probability with R</title>
		<link>http://smlv.cc.gatech.edu/2012/09/06/taodvol1/</link>
		<comments>http://smlv.cc.gatech.edu/2012/09/06/taodvol1/#comments</comments>
		<pubDate>Thu, 06 Sep 2012 21:31:00 +0000</pubDate>
		<dc:creator>glebanon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[R-blog]]></category>

		<guid isPermaLink="false">http://smlv.cc.gatech.edu/?p=2883</guid>
		<description><![CDATA[My first book on probability is completed. HTML version is freely available at theanalysisofdata.com and print version coming soon at a discounted price. Also, check out chapters 4 and 5 (available in pdf format) of the upcoming second volume on R programming and R graphics. http://theanalysisofdata.com/probability/viewer1.html (single page viewer) http://theanalysisofdata.com/probability/viewer2.html (two page viewer) http://theanalysisofdata.com/probability/0/0-2.pdf (table [...]]]></description>
				<content:encoded><![CDATA[<p> My first book on probability is completed. HTML version is freely available at <a href="http://theanalysisofdata.com/">theanalysisofdata.com</a> and print version coming soon at a discounted price. Also, check out chapters 4 and 5 (available in pdf format) of the upcoming second volume on R programming and R graphics.</p>
<p><a href="http://theanalysisofdata.com/probability/viewer1.html">http://theanalysisofdata.com/probability/viewer1.html</a> (single page viewer)</p>
<p><a href="http://theanalysisofdata.com/probability/viewer2.html">http://theanalysisofdata.com/probability/viewer2.html</a> (two page viewer)</p>
<p><a href="http://theanalysisofdata.com/probability/0/0-2.pdf">http://theanalysisofdata.com/probability/0/0-2.pdf</a> (table of contents)</p>
<p><a href="http://theanalysisofdata.com/computing/R.pdf">http://theanalysisofdata.com/computing/R.pdf</a> (R programming pdf version)</p>
<p><a href="http://theanalysisofdata.com/computing/graphics.pdf">http://theanalysisofdata.com/computing/graphics.pdf</a> (R graphics pdf version)</p>
<p>The book represents my best effort at capturing the part of probability that is necessary and sufficient for an in-depth understanding of machine learning and statistics. It does not cover statistics, which will be described in a later volume. The book is part of the Analysis of Data Project (TAOD), which provides educational material on the area of data analysis.</p>
<ul>
<li>The project features comprehensive coverage of all relevant disciplines including probability, statistics, computing, and machine learning.</li>
<li>The content is almost self-contained and includes mathematical prerequisites and basic computing concepts.</li>
<li>The R programming language is used to demonstrate the contents. Full code is available, facilitating reproducibility of experiments and letting readers experiment with variations of the code.</li>
<li>The presentation is mathematically rigorous, and includes derivations and proofs in most cases.</li>
<li>HTML versions are freely available on the website <a href="http://theanalysisofdata.com/">http://theanalysisofdata.com</a>. Hardcopies are available at affordable prices.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://smlv.cc.gatech.edu/2012/09/06/taodvol1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CDA Discussion Board (Fall 2011)</title>
		<link>http://smlv.cc.gatech.edu/2011/08/23/cda-discussion-board-fall-2011/</link>
		<comments>http://smlv.cc.gatech.edu/2011/08/23/cda-discussion-board-fall-2011/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 13:17:43 +0000</pubDate>
		<dc:creator>glebanon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Courses]]></category>

		<guid isPermaLink="false">http://smlv.cc.gatech.edu/?p=2708</guid>
		<description><![CDATA[This wordpress site allows highlighting code and rendering equations written in LaTeX. Example of syntax highlighting in R: &#60;pre lang=”rsplus”&#62; a=4 # assigning value of 4 to a a # print value of a &#60;/pre&#62; Example of equation using LaTeX code: Example of syntax highlighting in R: a=4 # assigning value of 4 to a [...]]]></description>
				<content:encoded><![CDATA[<p>This wordpress site allows highlighting code and rendering equations written in LaTeX.</p>
<p>Example of syntax highlighting in R:</p>
<p>&lt;pre lang=”rsplus”&gt;<br />
a=4 # assigning value of 4 to a<br />
a # print value of a<br />
&lt;/pre&gt;</p>
<p>Example of equation using LaTeX code:</p>
<img src='http://s.wordpress.com/latex.php?latex=%20f%28x%29%3D%5Csin%28x%29%2Be%5Ex%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt=' f(x)=\sin(x)+e^x ' title=' f(x)=\sin(x)+e^x ' class='latex' />
<p>Example of syntax highlighting in R:</p>
<pre lang=”rsplus”>
a=4 # assigning value of 4 to a
a # print value of a
</pre>
]]></content:encoded>
			<wfw:commentRss>http://smlv.cc.gatech.edu/2011/08/23/cda-discussion-board-fall-2011/feed/</wfw:commentRss>
		<slash:comments>381</slash:comments>
		</item>
		<item>
		<title>Majorization Minimization: A Simple Recipe for Cute Optimization</title>
		<link>http://smlv.cc.gatech.edu/2011/08/17/majorization-minimization-a-simple-recipe-for-cute-optimization/</link>
		<comments>http://smlv.cc.gatech.edu/2011/08/17/majorization-minimization-a-simple-recipe-for-cute-optimization/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 19:41:16 +0000</pubDate>
		<dc:creator>jvdillon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[em]]></category>
		<category><![CDATA[inference]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[parameter learning]]></category>

		<guid isPermaLink="false">http://smlv.cc.gatech.edu/?p=2610</guid>
		<description><![CDATA[Guy has a note on the EM algorithm, and I wanted to show how one can both explain and generalize EM in a very straightforward way. (You should probably read his note before continuing&#8211;or see the Miscellanea at the bottom to jog your memory.) EM is a special case of coordinate descent algorithms known as [...]]]></description>
				<content:encoded><![CDATA[<p> Guy has a <a href="http://www.cc.gatech.edu/~lebanon/notes/missingDataEM.pdf">note on the EM algorithm</a>, and I wanted to show how one can both explain and generalize EM in a very straightforward way.  (You should probably read his note before continuing&#8211;or see the Miscellanea at the bottom to jog your memory.)</p>
<p>EM is a special case of coordinate descent algorithms known as majorization-minimization procedures (MMP).  Majorization-minimization procedures operate by iteratively (nearly-) minimizing an upper bound of the objective which is tight at the previous iteration&#8217;s (near-) minimizer.  In other words, to guarantee the procedure minimizes our objective <img src='http://s.wordpress.com/latex.php?latex=f%28%5Ctheta%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='f(\theta)' title='f(\theta)' class='latex' />, we require the following three properties:</p>
<ol>
<li> <img src='http://s.wordpress.com/latex.php?latex=f%28%5Ctheta%5E%7B%28t%29%7D%29%3Dg%28%5Ctheta%5E%7B%28t%29%7D%7C%5Ctheta%5E%7B%28t%29%7D%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='f(\theta^{(t)})=g(\theta^{(t)}|\theta^{(t)})' title='f(\theta^{(t)})=g(\theta^{(t)}|\theta^{(t)})' class='latex' />
<li> <img src='http://s.wordpress.com/latex.php?latex=f%28%5Ctheta%29%20%5Cle%20g%28%5Ctheta%7C%5Ctheta%5E%7B%28t%29%7D%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='f(\theta) \le g(\theta|\theta^{(t)})' title='f(\theta) \le g(\theta|\theta^{(t)})' class='latex' />
<li> <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta%5E%7B%28t%2B1%29%7D%20%5Cin%20%5C%7B%20%5Ctheta%5Cin%5CTheta%20%3A%20g%28%5Ctheta%7C%5Ctheta%5E%7B%28t%29%7D%29%20%5Cle%20g%28%5Ctheta%5E%7B%28t%29%7D%7C%5Ctheta%5E%7B%28t%29%7D%29%5C%7D.&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\theta^{(t+1)} \in \{ \theta\in\Theta : g(\theta|\theta^{(t)}) \le g(\theta^{(t)}|\theta^{(t)})\}.' title='\theta^{(t+1)} \in \{ \theta\in\Theta : g(\theta|\theta^{(t)}) \le g(\theta^{(t)}|\theta^{(t)})\}.' class='latex' />
</ol>
<p>That these conditions guarantee convergence, i.e., <img src='http://s.wordpress.com/latex.php?latex=%5Ctheta%5E%7B%28t%29%7D%5Cto%5Ctheta%5E%7B%2A%7D%3D%5Carg%5Cmin_%5Ctheta%20f%28%5Ctheta%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\theta^{(t)}\to\theta^{*}=\arg\min_\theta f(\theta)' title='\theta^{(t)}\to\theta^{*}=\arg\min_\theta f(\theta)' class='latex' />, follows from the so-called descent property, i.e.,<br />
<img src='http://s.wordpress.com/latex.php?latex=%20%20f%28%5Ctheta%5E%7B%28t%29%7D%29%5Cstackrel%7B%5C%3B1.%7D%7B%5Cvphantom%7B%5Cge%7D%3D%7Dg%28%5Ctheta%5E%7B%28t%29%7D%7C%5Ctheta%5E%7B%28t%29%7D%29%5Cstackrel%7B%5C%3B3.%7D%7B%5Cge%7D%20g%28%5Ctheta%5E%7B%28t%2B1%29%7D%7C%5Ctheta%5E%7B%28t%29%7D%29%20%5Cstackrel%7B%5C%3B2.%7D%7B%5Cge%7D%20f%28%5Ctheta%5E%7B%28t%2B1%29%7D%29.%20%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='  f(\theta^{(t)})\stackrel{\;1.}{\vphantom{\ge}=}g(\theta^{(t)}|\theta^{(t)})\stackrel{\;3.}{\ge} g(\theta^{(t+1)}|\theta^{(t)}) \stackrel{\;2.}{\ge} f(\theta^{(t+1)}).  ' title='  f(\theta^{(t)})\stackrel{\;1.}{\vphantom{\ge}=}g(\theta^{(t)}|\theta^{(t)})\stackrel{\;3.}{\ge} g(\theta^{(t+1)}|\theta^{(t)}) \stackrel{\;2.}{\ge} f(\theta^{(t+1)}).  ' class='latex' /></p>
<p>From this view we see that EM is a special case, i.e.,<br />
<img src='http://s.wordpress.com/latex.php?latex=%20%20%5Cbegin%7Barray%7D%7Brl%7D%20%20f%28%5Ctheta%29%20%26%5Cstackrel%7Bdef%7D%7B%3D%7D%20-%5Clog%20p_%5Ctheta%28x%29%5C%5C%20%20%26%3D-%5Clog%20p_%5Ctheta%28x%29%20%5Cpm%20D%28p_%7B%5Ctheta%27%7D%28Y%7Cx%29%7C%7Cp_%5Ctheta%28Y%7Cx%29%29%5C%5C%20%20%26%5Cle%20-%5Clog%20p_%5Ctheta%28x%29%20%2B%20D%28p_%7B%5Ctheta%27%7D%28Y%7Cx%29%7C%7Cp_%5Ctheta%28Y%7Cx%29%29%5C%5C%20%20%26%3D%20D%28p_%7B%5Ctheta%27%7D%28Y%7Cx%29%7C%7Cp_%5Ctheta%28Y%2Cx%29%29%5C%5C%20%20%26%5Cstackrel%7Bdef%7D%7B%3D%7D%20g%28%5Ctheta%7C%5Ctheta%27%29.%20%20%5Cend%7Barray%7D%20%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='  \begin{array}{rl}  f(\theta) &amp;\stackrel{def}{=} -\log p_\theta(x)\\  &amp;=-\log p_\theta(x) \pm D(p_{\theta&#039;}(Y|x)||p_\theta(Y|x))\\  &amp;\le -\log p_\theta(x) + D(p_{\theta&#039;}(Y|x)||p_\theta(Y|x))\\  &amp;= D(p_{\theta&#039;}(Y|x)||p_\theta(Y,x))\\  &amp;\stackrel{def}{=} g(\theta|\theta&#039;).  \end{array}  ' title='  \begin{array}{rl}  f(\theta) &amp;\stackrel{def}{=} -\log p_\theta(x)\\  &amp;=-\log p_\theta(x) \pm D(p_{\theta&#039;}(Y|x)||p_\theta(Y|x))\\  &amp;\le -\log p_\theta(x) + D(p_{\theta&#039;}(Y|x)||p_\theta(Y|x))\\  &amp;= D(p_{\theta&#039;}(Y|x)||p_\theta(Y,x))\\  &amp;\stackrel{def}{=} g(\theta|\theta&#039;).  \end{array}  ' class='latex' /><br />
This result (and that the MM conditions are met) follows from <a href="http://en.wikipedia.org/wiki/Gibbs%27_inequality">Gibbs&#8217; Inequality</a>, i.e., <img src='http://s.wordpress.com/latex.php?latex=D%28q%7C%7Cp%29%5Cge%200&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='D(q||p)\ge 0' title='D(q||p)\ge 0' class='latex' /> for all distributions <img src='http://s.wordpress.com/latex.php?latex=q%2Cp&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='q,p' title='q,p' class='latex' /> with equality iff <img src='http://s.wordpress.com/latex.php?latex=q&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='q' title='q' class='latex' /> is identically <img src='http://s.wordpress.com/latex.php?latex=p&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p' title='p' class='latex' />.</p>
<p>For more information and a handful of alternative majorization recipes, see the excellent 2004 tutorial by David Hunter and Kenneth Lange, <a href="http://www.dam.brown.edu/people/geman/am261-2008/Tutorial%20on%20MM.pdf">A Tutorial on MM Algorithms</a>.  For a clever application of MM, check-out <a href="http://ai.stanford.edu/~ang/papers/icml09-MMAlgorithmHyperparemeterLearning.pdf">this paper</a> by Andrew Ng and pals.</p>
<p>Most (all?) of the majorizers listed by Lange exploit convexity of the objective. When the objective is nonlinear, it is <a href="http://www.stat.ucla.edu/~yuille/pubs/optimize_papers/cccp_nips01.ps.gz">always possible</a> to rewrite it as a difference of convex functions and then apply the MMP to the subtracted convex function.  However it is typically quite challenging to formulate <img src='http://s.wordpress.com/latex.php?latex=f&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='f' title='f' class='latex' /> as a difference of convex functions.  </p>
<p>Miscellanea:<br />
Alternative (equivalent) ways to derive EM:</p>
<p>Alt1: (KL-Div)<br />
<img src='http://s.wordpress.com/latex.php?latex=%20%20%5Cbegin%7Barray%7D%7Brl%7D%20%20%5Clog%20p_%5Ctheta%28x%29%20%26%3D%20-D%28q%28Z%29%7C%7Cp_%5Ctheta%28x%29%29%5C%5C%20%20%26%3D%20-D%28q%28Z%29%7C%7C%5Cfrac%7Bp_%5Ctheta%28x%2CZ%29%7D%7Bp_%5Ctheta%28Z%7Cx%29%7D%29%5C%5C%20%20%26%3D%20-D%28q%28Z%29%7C%7Cp_%5Ctheta%28x%2CZ%29%29%20%2BD%28%7Bq%28Z%29%7D%7C%7Cp_%5Ctheta%28Z%7Cx%29%29%29%5C%5C%20%20%26%5Cge%20-D%28q%28Z%29%7C%7Cp_%5Ctheta%28x%2CZ%29%29%20%20%5Cend%7Barray%7D%20%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='  \begin{array}{rl}  \log p_\theta(x) &amp;= -D(q(Z)||p_\theta(x))\\  &amp;= -D(q(Z)||\frac{p_\theta(x,Z)}{p_\theta(Z|x)})\\  &amp;= -D(q(Z)||p_\theta(x,Z)) +D({q(Z)}||p_\theta(Z|x)))\\  &amp;\ge -D(q(Z)||p_\theta(x,Z))  \end{array}  ' title='  \begin{array}{rl}  \log p_\theta(x) &amp;= -D(q(Z)||p_\theta(x))\\  &amp;= -D(q(Z)||\frac{p_\theta(x,Z)}{p_\theta(Z|x)})\\  &amp;= -D(q(Z)||p_\theta(x,Z)) +D({q(Z)}||p_\theta(Z|x)))\\  &amp;\ge -D(q(Z)||p_\theta(x,Z))  \end{array}  ' class='latex' /><br />
where the bound follows from Gibbs&#8217; inequality.</p>
<p>Alt2: (Jensen)<br />
<img src='http://s.wordpress.com/latex.php?latex=%20%20%5Cbegin%7Barray%7D%7Brl%7D%20%20%5Clog%20p_%5Ctheta%28x%29%20%26%3D%20%5Clog%5Csum_z%20p_%5Ctheta%28x%2Cz%29%5C%5C%20%20%26%3D%20%5Clog%5Csum_z%20q%28z%29%5Cfrac%7Bp_%5Ctheta%28x%2Cz%29%7D%7Bq%28z%29%7D%5C%5C%20%20%26%5Cge%20%5Csum_z%20q%28z%29%5Clog%5Cfrac%7Bp_%5Ctheta%28x%2Cz%29%7D%7Bq%28z%29%7D%5C%5C%20%20%26%3D%20-D%28q%28Z%29%7C%7Cp_%5Ctheta%28x%2CZ%29%29%20%20%5Cend%7Barray%7D%20%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='  \begin{array}{rl}  \log p_\theta(x) &amp;= \log\sum_z p_\theta(x,z)\\  &amp;= \log\sum_z q(z)\frac{p_\theta(x,z)}{q(z)}\\  &amp;\ge \sum_z q(z)\log\frac{p_\theta(x,z)}{q(z)}\\  &amp;= -D(q(Z)||p_\theta(x,Z))  \end{array}  ' title='  \begin{array}{rl}  \log p_\theta(x) &amp;= \log\sum_z p_\theta(x,z)\\  &amp;= \log\sum_z q(z)\frac{p_\theta(x,z)}{q(z)}\\  &amp;\ge \sum_z q(z)\log\frac{p_\theta(x,z)}{q(z)}\\  &amp;= -D(q(Z)||p_\theta(x,Z))  \end{array}  ' class='latex' /><br />
where the bound follows from Jensen&#8217;s inequality.</p>
<p>Note that all of these derivations essentially just use <img src='http://s.wordpress.com/latex.php?latex=p%28x%29%3Dp%28x%2Cz%29%2Fp%28z%7Cx%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p(x)=p(x,z)/p(z|x)' title='p(x)=p(x,z)/p(z|x)' class='latex' /> and the definition of convexity.  For a great (but dated) overview on different incarnations of EM, see <a href="http://stat.wharton.upenn.edu/~steele/Courses/956/Resource/HiddenMarkovModels/EM/MengVanDyk97.pdf">this survey</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://smlv.cc.gatech.edu/2011/08/17/majorization-minimization-a-simple-recipe-for-cute-optimization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>X Seen by Y</title>
		<link>http://smlv.cc.gatech.edu/2011/08/16/x-seen-by-y/</link>
		<comments>http://smlv.cc.gatech.edu/2011/08/16/x-seen-by-y/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 14:44:03 +0000</pubDate>
		<dc:creator>glebanon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Funny]]></category>

		<guid isPermaLink="false">http://smlv.cc.gatech.edu/?p=2631</guid>
		<description><![CDATA[&#160; &#160; &#160; (this does not reflect the views of the anyone in the smlv group &#8211; post is intended as a comic relief)]]></description>
				<content:encoded><![CDATA[<p>
<a href="http://i.imgur.com/3YFTG.jpg"><img class="alignnone" title="X as seen by Y" src="http://i.imgur.com/3YFTG.jpg" alt="" width="470" height="470" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>(this does not reflect the views of the anyone in the smlv group &#8211; post is intended as a comic relief)</p>
]]></content:encoded>
			<wfw:commentRss>http://smlv.cc.gatech.edu/2011/08/16/x-seen-by-y/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Public courses at Stanford</title>
		<link>http://smlv.cc.gatech.edu/2011/08/16/public-courses-at-stanford/</link>
		<comments>http://smlv.cc.gatech.edu/2011/08/16/public-courses-at-stanford/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 12:51:12 +0000</pubDate>
		<dc:creator>glebanon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Courses]]></category>

		<guid isPermaLink="false">http://smlv.cc.gatech.edu/?p=2627</guid>
		<description><![CDATA[I am very impressed with Stanford. They are opening up several courses to the public using online participation (including video), for free. Two classes that are relevant to my area are AI and Machine Learning. Both will for sure be outstanding. The first is taught by Sebastian Thrun and Peter Norvig &#8211; both leading researchers [...]]]></description>
				<content:encoded><![CDATA[<p>
I am very impressed with Stanford. They are opening up several courses to the public using online participation (including video), for free.</p>
<p>Two classes that are relevant to my area are <a href="http://www.ai-class.com/">AI</a> and <a href="http://ml-class.org/">Machine Learning</a>. Both will for sure be outstanding. The first is taught by Sebastian Thrun and Peter Norvig &#8211; both leading researchers in AI. The second is taught by Andrew Ng who is also an outstanding researcher. I also believe all three are excellent teachers.</p>
<p>58,000 people <a href="http://www.nytimes.com/2011/08/16/science/16stanford.html?_r=1&amp;hpw">already registered</a> for the AI class. What a nice opportunity for grad students, but also for undergrads, highschool students, professionals, and retired people.</p>
]]></content:encoded>
			<wfw:commentRss>http://smlv.cc.gatech.edu/2011/08/16/public-courses-at-stanford/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Semaphores in Matlab</title>
		<link>http://smlv.cc.gatech.edu/2011/08/10/semaphores-in-matlab/</link>
		<comments>http://smlv.cc.gatech.edu/2011/08/10/semaphores-in-matlab/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 18:15:07 +0000</pubDate>
		<dc:creator>jvdillon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://smlv.cc.gatech.edu/?p=2612</guid>
		<description><![CDATA[Matlab Central download SEMAPHORE Interfaces with POSIX semaphore. This mex file provides an interface with the POSIX semaphore functionality. For more information, see [1,2]. SEMAPHORE(&#8216;create&#8217;,KEY,VAL) Initializes a semaphore which can later by accessed by KEY. The argument VAL specifies the initial value for the semaphore. SEMAPHORE(&#8216;destroy&#8217;,KEY) Destroys the semaphore indexed by KEY. Destroying a semaphore [...]]]></description>
				<content:encoded><![CDATA[<p> <a href="http://www.mathworks.com/matlabcentral/fileexchange/32489-semaphore">Matlab Central</a> <a href="http://www.mathworks.com/matlabcentral/fileexchange/32489-semaphore?controller=file_infos&#038;download=true">download</a></p>
<p>SEMAPHORE  Interfaces with POSIX semaphore.</p>
<p>This mex file provides an interface with the POSIX semaphore functionality. For more information, see [1,2].</p>
<p style="margin-left:.25in;text-indent:-.25in">
SEMAPHORE(&#8216;create&#8217;,KEY,VAL)<br />
   Initializes a semaphore which can later by accessed by KEY. The argument VAL specifies the initial value for the semaphore.</p>
<p style="margin-left:.25in;text-indent:-.25in">
SEMAPHORE(&#8216;destroy&#8217;,KEY)<br />
   Destroys the semaphore indexed by KEY. Destroying a semaphore that other processes or threads are currently blocked on (in &#8216;wait&#8217;) produces undefined behavior. Using a semaphore that has been destroyed produces undefined results, until the semaphore has been reinitialized using &#8216;init&#8217;.</p>
<p style="margin-left:.25in;text-indent:-.25in">
SEMAPHORE(&#8216;wait&#8217;,KEY)<br />
   Decrements (locks) the semaphore indexed by KEY. If the semaphore&#8217;s value is greater than zero, then the decrement proceeds, and the function returns, immediately. If the semaphore currently has the value zero, then the call blocks until either it becomes possible to perform the decrement (i.e., the semaphore value rises above zero), or a signal handler interrupts the call.</p>
<p style="margin-left:.25in;text-indent:-.25in">
SEMAPHORE(&#8216;post&#8217;,KEY)<br />
   Increments (unlocks) the semaphore indexed by KEY. If the semaphore&#8217;s value consequently becomes greater than zero, then another process or thread blocked in a &#8216;wait&#8217; call will be woken up and proceed to lock the semaphore.</p>
<p>[1] &#8211; `man 7posix semaphore.h`<br />
[2] &#8211; http://en.wikipedia.org/wiki/Semaphore_(programming)</p>
]]></content:encoded>
			<wfw:commentRss>http://smlv.cc.gatech.edu/2011/08/10/semaphores-in-matlab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symmetric Eigenvectors in MATLAB</title>
		<link>http://smlv.cc.gatech.edu/2011/06/14/symmetric-eigenvectors-in-matlab/</link>
		<comments>http://smlv.cc.gatech.edu/2011/06/14/symmetric-eigenvectors-in-matlab/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 22:49:21 +0000</pubDate>
		<dc:creator>fuxin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://smlv.cc.gatech.edu/?p=2602</guid>
		<description><![CDATA[Funny enough, till the current year of 2011, MATLAB is still computing symmetric eigenvalues/eigenvectors using the old EISPACK, but has upgraded all the other eigenvector computations to custom LAPACK libraries. Because EISPACK only uses a single core, in multi-core architectures, this make it slower to compute symmetric eigenvectors than asymmetric ones, see this example: &#62;&#62; [...]]]></description>
				<content:encoded><![CDATA[<p>
Funny enough, till the current year of 2011, MATLAB is still computing symmetric eigenvalues/eigenvectors using the old EISPACK, but has upgraded all the other eigenvector computations to custom LAPACK libraries. Because EISPACK only uses a single core, in multi-core architectures, this make it slower to compute symmetric eigenvectors than asymmetric ones, see this example:</p>
<p>&gt;&gt; S = rand(2000);<br />
&gt;&gt; S = S + S&#8217;;<br />
&gt;&gt; t= tic();[v,e] = eig(S);toc(t);<br />
Elapsed time is 20.249647 seconds.<br />
&gt;&gt; t= tic();S(1,2) = S(1,2) + 0.0001;[v,e] = eig(S);toc(t);<br />
Elapsed time is 16.336485 seconds.</p>
<p>Stupid enough. I really need eigenvectors faster so I wrote a simple wrapper with Intel MKL for eigenvector computation on symmetric matrices.</p>
<p><a title="http://www.cc.gatech.edu/~fli/mex_dsyev.mexa64" href="http://www.cc.gatech.edu/~fli/mex_dsyev.mexa64">http://www.cc.gatech.edu/~fli/mex_dsyev.mexa64</a></p>
<p><a title="Source Code" href="http://www.cc.gatech.edu/~fli/mex_dsyev.cpp" target="_blank">http://www.cc.gatech.edu/~fli/mex_dsyev.cpp</a></p>
<p>&gt;&gt; t = tic();[v,e] = mex_dsyev(S);toc(t);<br />
Elapsed time is 2.971105 seconds.</p>
<p>Experiments are done on dice with 8 cores. You can see that MKL implicitly use all the 8 cores to compute, that&#8217;s the simplest way to parallelize to me.</p>
<p>I&#8217;ll look to compile it in Windows, but I don&#8217;t have MKL in Windows for now.</p>
]]></content:encoded>
			<wfw:commentRss>http://smlv.cc.gatech.edu/2011/06/14/symmetric-eigenvectors-in-matlab/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The woes of 0*log(0).</title>
		<link>http://smlv.cc.gatech.edu/2011/06/07/the-woes-of-0log0/</link>
		<comments>http://smlv.cc.gatech.edu/2011/06/07/the-woes-of-0log0/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 15:53:27 +0000</pubDate>
		<dc:creator>jvdillon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Matlab]]></category>
		<category><![CDATA[statistical computing]]></category>

		<guid isPermaLink="false">http://smlv.cc.gatech.edu/?p=2591</guid>
		<description><![CDATA[When computing entropy, log-likelihood, etc. it is common to treat 0*log(0)=0 as per the interpretation of an event of measure zero. Contrary to this &#8220;statistical convention,&#8221; IEEE floating-point defines 0*-Inf as NaN (not-a-number). Moreover IEEE defines NaN+7.2 as NaN (where 7.2 could be any non-NaN numeric). In Matlab this is particularly annoying when one wishes [...]]]></description>
				<content:encoded><![CDATA[<p>
When computing entropy, log-likelihood, etc. it is common to treat 0*log(0)=0 as per the interpretation of an event of measure zero.  Contrary to this &#8220;statistical convention,&#8221; IEEE floating-point defines 0*-Inf as NaN (not-a-number).  Moreover IEEE defines NaN+7.2 as NaN (where 7.2 could be any non-NaN numeric).</p>
<p>In Matlab this is particularly annoying when one wishes to compute the dot product p&#8217;*log(p) where p is a pmf shaped as a column vector since the result is NaN whenever one or more elements of p are zero.</p>
<p>One workaround is to use the statistics toolbox, i.e., nansum(p.*log(p)). However this method is substantially slower, uses more intermediate memory, and doesn&#8217;t always work well for more general multiplication operators (tensor product).</p>
<p>A neat trick is to exploit how Matlab sparse vectors work.  Assuming length(p)>1, the desired result can be achieved by: sparse(p)&#8217;*log(p) since Matlab assumes the product of any zero element and some other element is zero.</p>
<p>Interestingly enough, although favorable for statistical computing, it does violate the implications of floating-point conventions and could lead to unexpected results.</p>
]]></content:encoded>
			<wfw:commentRss>http://smlv.cc.gatech.edu/2011/06/07/the-woes-of-0log0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>1st Post</title>
		<link>http://smlv.cc.gatech.edu/2011/03/10/1st-post/</link>
		<comments>http://smlv.cc.gatech.edu/2011/03/10/1st-post/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 23:10:53 +0000</pubDate>
		<dc:creator>fuxin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://smlv.cc.gatech.edu/?p=2556</guid>
		<description><![CDATA[Hi everybody. My greetings to all of you \bow I&#8217;m new to the group and blog but somehow think that I should at least post something. But I&#8217;d never figured out what to write here. Well I&#8217;ve got some small stuff today. Because we discussed about Hadoop at some point and we were talking about [...]]]></description>
				<content:encoded><![CDATA[<p>
Hi everybody. My greetings to all of you <img src='http://smlv.cc.gatech.edu/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  \bow</p>
<p>I&#8217;m new to the group and blog but somehow think that I should at least post something. But I&#8217;d never figured out what to write here. Well I&#8217;ve got some small stuff today. Because we discussed about Hadoop at some point and we were talking about doing parallel optimization and potential out-of-sync from different processors doing a part of the task and possibilities to make them communicate at stages, I&#8217;m sorta interested in seeing how bad will the syncronization problem be.</p>
<p>Today I&#8217;m trying to clog the server by running multiple optimizations in parallel. And then I realized that would a small showcase of the sync problem. My setting is like I run 4 different pretty slow optimizations (same dataset one-against-all classification, therefore with different labels) on 4 CPUs on the server simulatenously using MATLAB&#8217;s parfor. And one can see the output of the 4 optimizations coming back in parallel. I&#8217;ve drawn this small figure to show the synchronization behaviors of these 4 processes.<br />
<a href="http://smlv.cc.gatech.edu/wp-content/uploads/2011/03/sync.jpg"><img class="alignnone size-medium wp-image-2558" title="sync" src="http://smlv.cc.gatech.edu/wp-content/uploads/2011/03/sync-300x261.jpg" alt="" width="300" height="261" /></a></p>
<p>So with this pretty basic setting (all processes on the same machine, using the same processor and running almost the same optimization), they are out-of-sync starting from around 14 iterations. However the sync problem is not huge in this case. One expects to get around +-2 iterations deviation between the processes.</p>
<p>Conclusion: 1) Out-of-sync exists even with very constrained setting. 2) The amount of it may be controlled when the setting is well-constrained.</p>
<p>Question: What happens if we have both global sync problem (sync between different computers on a grid) and local ones (sync within one computer), is there something to do to take advantage of the structure that local sync is more controllable than the global? Suppose each computer in the grid has 100 cores, is there something to do to exploit this architecture so we perform some better-synced parallel optimization within the computer and less well-synced ones outside on the less reliable network?</p>
]]></content:encoded>
			<wfw:commentRss>http://smlv.cc.gatech.edu/2011/03/10/1st-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux-like Mac OS</title>
		<link>http://smlv.cc.gatech.edu/2011/02/15/linux-like-mac-os/</link>
		<comments>http://smlv.cc.gatech.edu/2011/02/15/linux-like-mac-os/#comments</comments>
		<pubDate>Tue, 15 Feb 2011 15:01:36 +0000</pubDate>
		<dc:creator>glebanon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://smlv.cc.gatech.edu/?p=2533</guid>
		<description><![CDATA[I have been using Linux (Ubuntu with Gnome) for a few years now and found it excellent. It works beautifully with desktops and gone are the days of painful night-long linux frustrations. But the situation is not so smooth on laptops. Linux generally does not work smoothly on all laptop brands. There are problems with [...]]]></description>
				<content:encoded><![CDATA[
<p>I have been using Linux (Ubuntu with Gnome) for a few years now and found it excellent. It works beautifully with desktops and gone are the days of painful night-long linux frustrations. But the situation is not so smooth on laptops. Linux generally does not work smoothly on all laptop brands. There are problems with sound drivers, microphone drivers, web-cam, slow sleep/hibernate, and battery life is pretty bad. Perhaps most of these work well and only a few don&#8217;t and perhaps there are fixes out there available but this is nevertheless frustrating. In particular there are no fixes for the poor battery life and slow sleep/hibernate.</p>
<p>So despite swearing I&#8217;ll never do it I decided to take the plunge and get a Mac &#8211; specifically Macbook Air 13.3&#8221;. The verdict is that it&#8217;s a great laptop but I still like many things in Linux that Apple annoyingly decided to do differently.  I include below some tips on making a Mac behave more like Linux. The steps below are listed in chronological order &#8211; execute them one by one <em>right when you get your Mac</em>.</p>
<ol>
<li>When the computer asks for your full name and the user name choose two identical short names (think username for both). This ensures that you won&#8217;t get your full name in some places where linux expects the username.</li>
<li>Follow the steps in <a id="internal-source-marker_0.11334246606566012" href="http://support.apple.com/kb/HT1528">http://support.apple.com/kb/HT1528</a> to enable root account (that means you can sometimes use the su command rather than sudo). This is necessary for some of the steps.</li>
<li>To move your home directory from /User/username to /home/username. Start by &#8220;unlocking&#8221; the /home directory by commenting out the line in /etc/auto_master that starts with /home. Then remove and re-create the directory /home/username (use sudo for both actions). Next, move your home directory by CTRL-click the user name in the accounts part of the system preferences (first unlock it by entering your password). If you are doing that after the initial installation you may have files in your old home directory that should be moved (while making sure to change their ownership to the new username if needed).</li>
<li>Mac doesn&#8217;t let you maximize windows to full screen. It thinks it is smarter than you and decides by itself how to react when you press the + button to maximize a window.  This is particularly annoying for laptops with small screens. Installing the application Right Zoom (<a id="internal-source-marker_0.11334246606566012" href="http://www.macupdate.com/app/mac/30591/right-zoom">http://www.macupdate.com/app/mac/30591/right-zoom</a>) let&#8217;s you change this behavior. I recommend selecting the options apply for all applications and full screen maximization when the option button is pressed. This means you can still use Apple&#8217;s window maximization (click on window max button) or full screen maximization (click on window max button while pressing the Option key).</li>
<li>The default hostname in Mac is your computer name appended by a network id. This is bad since whenever you connect to the internet from different spots your hostname will be different which prevents you for example from using ssh with automatic authentication (no need to enter password every time). I am sure there are other complications caused by this. The hostname should be changed in two places to one short name: once in system_preferences-&gt;sharing and once with

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> scutil <span style="color: #660033;">--set</span> HostName newName</pre></td></tr></table></div>

</li>
<li>You probably want to customize your bash shell- either write it from scratch or import it from a previous computer. First, note that Mac uses .bash_profile rather than .bashrc so simply take your .bashrc file and rename it to .bash_profile. Second, remove any &#8211;color mention in your ls aliases since this will not work and cause Mac to complain. To show colors in ls put the following or something similar in your .bash_profile. This works nicely for black background shell but you may want to change the colors if you prefer white background

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CLICOLOR</span>=<span style="color: #000000;">1</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LSCOLORS</span>=Gxfxcxdxbxegedabagacad</pre></td></tr></table></div>

</li>
<li>Create an Apple account, install X-code, and then install Macports. You are now free to install a lot of linux tools including many excellent gnome programs:

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #c20cb9; font-weight: bold;">install</span> program_name</pre></td></tr></table></div>

</li>
<li>Proceed with the standard linux setup depending on your preferences: create ssh keys for automatic authentication, install emacs (my favorite is <a href="http://vgoulet.act.ulaval.ca/en/emacs/mac/">http://vgoulet.act.ulaval.ca/en/emacs/mac/</a> which includes ESS), latex (type sudo port install texlive), R, git, libreoffice, etc. Many of these programs may be installed either using macports (see above) or by installing the Mac application (search google, download dmg file and double click it). I chose the latter which works nicely.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://smlv.cc.gatech.edu/2011/02/15/linux-like-mac-os/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
