<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://nemenmanlab.org/~ilya/index.php?action=history&amp;feed=atom&amp;title=Physics_380%2C_2010%3A_Fourier_Analysis</id>
	<title>Physics 380, 2010: Fourier Analysis - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://nemenmanlab.org/~ilya/index.php?action=history&amp;feed=atom&amp;title=Physics_380%2C_2010%3A_Fourier_Analysis"/>
	<link rel="alternate" type="text/html" href="https://nemenmanlab.org/~ilya/index.php?title=Physics_380,_2010:_Fourier_Analysis&amp;action=history"/>
	<updated>2026-05-17T09:40:52Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://nemenmanlab.org/~ilya/index.php?title=Physics_380,_2010:_Fourier_Analysis&amp;diff=283&amp;oldid=prev</id>
		<title>Ilya: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://nemenmanlab.org/~ilya/index.php?title=Physics_380,_2010:_Fourier_Analysis&amp;diff=283&amp;oldid=prev"/>
		<updated>2018-07-04T16:28:41Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 16:28, 4 July 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Ilya</name></author>
		
	</entry>
	<entry>
		<id>https://nemenmanlab.org/~ilya/index.php?title=Physics_380,_2010:_Fourier_Analysis&amp;diff=282&amp;oldid=prev</id>
		<title>nemenman&gt;Ilya at 03:19, 19 October 2010</title>
		<link rel="alternate" type="text/html" href="https://nemenmanlab.org/~ilya/index.php?title=Physics_380,_2010:_Fourier_Analysis&amp;diff=282&amp;oldid=prev"/>
		<updated>2010-10-19T03:19:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{PHYS380-2010}}&lt;br /&gt;
==Lectures 11, 12 ==&lt;br /&gt;
&lt;br /&gt;
==Homework (due Oct 8)==&lt;br /&gt;
#In class, we discussed the rate-distortion theorems, and in particular its Information Bottleneck form (Tishby et al, 2000), which, for a given distribution of a signal &amp;lt;math&amp;gt; x&amp;lt;/math&amp;gt; and the relevance variable &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;P(x,y)&amp;lt;/math&amp;gt;, tries to compress &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; into &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;, while preserving as much information in &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt; as possible about &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;. That is, the method maximizes &amp;lt;math&amp;gt;L=I(z,y)-\lambda I(x,z)&amp;lt;/math&amp;gt; over &amp;lt;math&amp;gt;P(z|x)&amp;lt;/math&amp;gt;, and the parameter &amp;lt;math&amp;gt;\lambda&amp;lt;/math&amp;gt; controls the tradeoff between the strength of the compression and the amount of information retained about &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;. Let's explore this approach numerically.&lt;br /&gt;
#*Download the following program [[media:bottle2.m|bottle2.m]], which takes on its input the joint distribution of &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, the suggested dimensionality of &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;, and the value of &amp;lt;math&amp;gt;\beta=1/\lambda&amp;lt;/math&amp;gt;. The routine outputs &amp;lt;math&amp;gt;P(z|x)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P(y|z)&amp;lt;/math&amp;gt;.&lt;br /&gt;
#*You will also need auxiliary functions [[media:llog2.m|llog2.m]] and [[media:unzero.m|unzero.m]]. Download them and place them into the same folder/directory as bottle2.m&lt;br /&gt;
#*Recall the homework problem from the last week and, as &amp;lt;math&amp;gt;P(x)&amp;lt;/math&amp;gt;, take a distribution that allows 1, 5, 10, 20 molecules with an equal probability of 0.25. Use the code you wrote the last time to generate &amp;lt;math&amp;gt;P(x,y)&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; is obtained by Poisson smearing of &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;.&lt;br /&gt;
#*Run the Information bottleneck algorithm and plot &amp;lt;math&amp;gt;I(y,z)&amp;lt;/math&amp;gt; vs. &amp;lt;math&amp;gt;I(x,z)&amp;lt;/math&amp;gt; for different values of &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt; and for sizes of &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt; of 2, 3, 4, 5. How close do we come to recovering all of information about &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;? That is, how close is &amp;lt;math&amp;gt;I(y,z)/I(x,z)&amp;lt;/math&amp;gt; to 1? How different are the plots for different sizes of &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;? Discuss.&lt;br /&gt;
#Calculate Fourier coefficients for the following three functions defined for &amp;lt;math&amp;gt;-1\le t\le 1&amp;lt;/math&amp;gt;. (a) &amp;lt;math&amp;gt;x(t)=\left\{\begin{array}{ll}-1,&amp;amp;t&amp;lt;0\\0,&amp;amp;t=0\\+1,&amp;amp;t&amp;gt;0\end{array} \right.&amp;lt;/math&amp;gt;; (b) &amp;lt;math&amp;gt;x(t)=\left\{\begin{array}{ll}t+1,&amp;amp;t&amp;lt;0\\1,&amp;amp;t=0\\1-t,&amp;amp;t&amp;gt;0\end{array} \right.&amp;lt;/math&amp;gt;; (c)&amp;lt;math&amp;gt;x(t)=(t-1)^2(t+1)^2&amp;lt;/math&amp;gt;. Plot the first ten partial sums of the Fourier series for all of these functions to observe how the sums converge. Use one figure per function (that is, plot the ten sums on the same figure). Note that the Fourier coefficients decrease the slowest for the function that is discontinuous, (a), and the fastest for the function that is smooth, (c).&lt;br /&gt;
&lt;br /&gt;
==Homework (due Oct 15)==&lt;br /&gt;
Let's play a bit today with Fourier transforms&lt;br /&gt;
#Consider the following Langevin differential equation that we discussed in class: &amp;lt;math&amp;gt;\frac{dx}{dt}=-kx+c\eta&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;\eta&amp;lt;/math&amp;gt; is a Wiener process, that is, it is a Gaussian variable with &amp;lt;math&amp;gt;\langle\eta\rangle=0&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\langle\eta(t)\eta(t')\rangle=\delta(t-t')&amp;lt;/math&amp;gt;. &lt;br /&gt;
#*Write simple program that would solve this equation as a difference equation. That is, following our discussion in one of the previous homeworks, for a given &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt; and the temporal step size &amp;lt;math&amp;gt;\Delta t&amp;lt;/math&amp;gt;, we can define &amp;lt;math&amp;gt;x_n\equiv x(n\Delta t)&amp;lt;/math&amp;gt;, and then &amp;lt;math&amp;gt;\frac{x_{n+1}-x_{n}}{\Delta t}= -kx_n+\frac{c}{\sqrt{\Delta t}}\nu&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;\nu&amp;lt;/math&amp;gt; is a Gaussian random variable with zero mean and unit variance. This then gives &amp;lt;math&amp;gt;x_{n+1}=x_{n} -kx_n\Delta t+c\sqrt{\Delta t}\nu&amp;lt;/math&amp;gt;, which can be turned into a simple for-loop code for simulating a sequence of x's. &lt;br /&gt;
#*Simulate &amp;lt;math&amp;gt;N=1e5&amp;lt;/math&amp;gt; steps of this dynamics of &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;. Plot &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;. Describe what you see.&lt;br /&gt;
#*Take a Fourier transform of this &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; using the Matlab build-in &amp;lt;math&amp;gt;fft&amp;lt;/math&amp;gt; function.&lt;br /&gt;
#*Plot (in log-log scale) the power spectrum (that is &amp;lt;math&amp;gt;\left|\hat{x}(\omega)\right|^2\equiv \hat{x}(\omega)\hat{x}({-\omega})&amp;lt;/math&amp;gt;. &lt;br /&gt;
#*Using the expressions we derived in class, show that the power spectrum for this &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; should look like &amp;lt;math&amp;gt;\langle\hat{x}(\omega)\hat{x}({-\omega})\rangle=\frac{c^2}{k^2+\omega^2}&amp;lt;/math&amp;gt;. Compare this to your plot. Do they look similar? Think about why or why not.  (Hint -- they will be similar for about half of your plot).&lt;br /&gt;
#''For grad students only''. Can you also calculate the power spectrum for &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; that satisfies the following equations: &amp;lt;math&amp;gt;\begin{array}{l}\frac{dx}{dt}=-k_{xx}+k_{xy}y+c_x\eta_x\\\frac{dy}{dt}=-k_{yx}y+k_{yy}y + c_y\eta_y\end{array}&amp;lt;/math&amp;gt;, where all &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;'s are positive, and &amp;lt;math&amp;gt;\eta_x,\eta_y&amp;lt;/math&amp;gt; are uncorrelated noises in the two variables. Are there any special features in the power spectrum. How do you think &amp;lt;math&amp;gt;x(t)&amp;lt;/math&amp;gt; might look like given this spectrum?&lt;br /&gt;
&lt;br /&gt;
For these problems, we wrote the following functions:&lt;br /&gt;
*[[media:JCondJ.m|JCondJ.m]] -- takes a conditional distribution &amp;lt;math&amp;gt;Pzx=P(z|x)&amp;lt;/math&amp;gt; and the joint distribution &amp;lt;math&amp;gt;P(x,y)=pxy&amp;lt;/math&amp;gt; as an input and produces the joint &amp;lt;math&amp;gt;pzy=P(z,y)&amp;lt;/math&amp;gt; on the output.&lt;br /&gt;
*[[media:FSerVal.m|FSerVal.m]] -- takes the vector of time, the zeros cosine coefficient, and the rest of the cosine and the sine coefficients and produces the values of the corresponding partial sums.&lt;/div&gt;</summary>
		<author><name>nemenman&gt;Ilya</name></author>
		
	</entry>
</feed>