\begin{frame}
	\myheading{Module 19.10: I Maps}
\end{frame}
\begin{frame}
	\begin{columns}
		\column{0.5\textwidth}
		%\begin{overlayarea}{\textwidth}{\textheight}
			%\vspace{0.2in}
			$I_I=\{(G \perp S|I,D),.....\}$
			
		%\end{overlayarea}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			\begin{itemize}
		  	\onslide<1->{\item Let P be a joint distribution over $X=X_1,X_2,...,X_n$}
				\vspace{0.1in}
				\onslide<2->{\item We define $I(P)$ as the set of independence assumptions that hold in $P$}
				\vspace{0.1in}
				\onslide<3->{\item Each element of this set is of the form $X_i \perp X_j|Z,Z \subseteq X|X_i,X_j$}
				\vspace{0.1in}
                                \onslide<4->{\item Let $I_I(G)$ be the set of independence assumptions associated with a graph G.}
			\end{itemize}
		\end{overlayarea}
	\end{columns}
\end{frame}
\begin{frame}
        \begin{columns}
                \column{0.5\textwidth}
                \begin{overlayarea}{\textwidth}{\textheight}
                        \vspace{0.2in}

                \end{overlayarea}
                \column{0.5\textwidth}
                \begin{overlayarea}{\textwidth}{\textheight}
                        \vspace{0.2in}
                        \begin{itemize}
                        \onslide<1->{\item We say that G is an I-map for P if $I_I(G) \subseteq I(P)$}
                                \vspace{0.1in}
                                \onslide<2->{\item $G$ does not mislead us about independencies in $P$}
                                \vspace{0.1in}
                                \onslide<3->{\item Any independence that G states must hold in $P$}
                                \vspace{0.1in}
                                \onslide<4->{\item But $P$ can have additional independencies.}
                        \end{itemize}
                \end{overlayarea}
        \end{columns}
\end{frame}
\begin{frame}
        \begin{columns}
                \column{0.5\textwidth}
                %\begin{overlayarea}{\textwidth}{\textheight}
                        %\vspace{0.7in}
                        \includegraphics[scale=0.5]{images/module10_11/mod1x_1.jpg}

                %\end{overlayarea}
                \column{0.5\textwidth}
                %\begin{overlayarea}{\textwidth}{\textheight}
                        %\vspace{0.2in}
                        \begin{itemize}
                        \onslide<1->{\item Consider this joint distribution over $X,Y$}
                                \vspace{0.1in}
                                \onslide<2->{\item We need to find a $G$ which is an I-map for this $P$}
                                \vspace{0.1in}
                                \onslide<3->{\item How do we find such a $G$?}
                        \end{itemize}
                %\end{overlayarea}
        \end{columns}
\end{frame}
\begin{frame}
        \begin{columns}
                \column{0.5\textwidth}
                \begin{overlayarea}{\textwidth}{\textheight}
                        \vspace{0.2in}

                \end{overlayarea}
                \column{0.5\textwidth}
                \begin{overlayarea}{\textwidth}{\textheight}
                        \vspace{0.2in}
                        \begin{itemize}
                        \onslide<1->{\item Well since there are only 2 variables here the only possibilities are $I(P)=\{(X\perp Y)\}$ or $I(P)=\Phi$} 
                                \vspace{0.1in}
                                \onslide<2->{\item From the table we can easily check $P(X,Y) = P(X).P(Y)$}
                                \vspace{0.1in}
                                \onslide<3->{\item $I(P)=\{(X \perp Y) \}$}
                                \vspace{0.1in}
                                \onslide<4->{\item Now can you come up with a G which satisfies $I(G)\subseteq I(P)$?}
                        \end{itemize}
                \end{overlayarea}
        \end{columns}
\end{frame}
\begin{frame}
        \begin{columns}
                \column{0.5\textwidth}
                \begin{overlayarea}{\textwidth}{\textheight}
                        %\vspace{0.2in}
                        \includegraphics[scale=0.5]{images/module10_11/mod1x_2.jpg}

                \end{overlayarea}
                \column{0.5\textwidth}
                %\begin{overlayarea}{\textwidth}{\textheight}
                        %\vspace{0.2in}
                        \begin{itemize}
                        \onslide<1->{\item Since we have only two variables there are only 3 possibilities for $G$}
                                \vspace{0.1in}
                                \onslide<2->{\item Which of these is an I-Map for $P$?}
                                \vspace{0.1in}
                                \onslide<3->{\item Well all three are I-Maps for $P$}
                                \vspace{0.1in}
                                \onslide<4->{\item They all satisfy the condition $I(G)\subseteq I(P)$}
                        \end{itemize}
                %\end{overlayarea}
        \end{columns}
\end{frame}
\begin{frame}
        \begin{columns}
                \column{0.5\textwidth}
                \begin{overlayarea}{\textwidth}{\textheight}
                        \vspace{0.2in}
                        \includegraphics[scale=0.5]{images/module10_11/mod1x_1.jpg}

                \end{overlayarea}
                \column{0.5\textwidth}
                %\begin{overlayarea}{\textwidth}{\textheight}
                        %\vspace{0.2in}
                        \begin{itemize}
                        \onslide<1->{\item Ofcourse, this was just a try example}
                                \vspace{0.1in}
                                \onslide<2->{\item In practice, we do not know $P$ and hence can't compute $I(P)$}
                                \vspace{0.1in}
                                \onslide<3->{\item We just make some assumptions about $I(P)$ and then construct a $G$ such that $I(G)\subseteq I(P)$}
                        \end{itemize}
                %\end{overlayarea}
        \end{columns}
\end{frame}
\begin{frame}
        \begin{columns}
                \column{0.5\textwidth}
                \begin{overlayarea}{\textwidth}{\textheight}
                        \vspace{0.2in}

                \end{overlayarea}
                \column{0.5\textwidth}
                \begin{overlayarea}{\textwidth}{\textheight}
                        \vspace{0.2in}
                        \begin{itemize}
                        \onslide<1->{\item So why do we care about I-Map?}
                                \vspace{0.1in}
                                \onslide<2->{\item If $G$ is an I-Map for a joint distribution P then P factorizes over $G$}
                                \vspace{0.1in}
                                \onslide<3->{\item What does that mean?}
                                \vspace{0.1in}
                                \onslide<4->{\item Well, it just means that can be written as a product of factors where each factor is a c.p.d associated with the nodes of $G$}
                        \end{itemize}
                \end{overlayarea}
        \end{columns}
\end{frame}
\begin{frame}
        \begin{columns}
                \column{0.5\textwidth}
                        \begin{block}{Theorem}
Let G be a BN structure over a set of random variables X and let P be a joint distribution over these variables. If G is an I-Map for P, then P factorizes according to G\\
\textbf{Proof:Exercise}
                        \end{block}

                \column{0.5\textwidth}
                        \begin{block}{Theorem}
                        	Let G be a BN structure over a set of random variables X and let P be a joint distribution over these variables. If P factorizes according to G, then G is an I-Map of P\\
                        	\textbf{Proof:Exercise}
                        \end{block}
        \end{columns}
\end{frame}
\begin{frame}
	\begin{columns}
		\column{0.5\textwidth}
		%\begin{overlayarea}{\textwidth}{\textheight}
			%\vspace{0.2in}
			\begin{center}
				\includegraphics[scale=0.4]{images/module10_11/mod1x_3.jpg}
			\end{center}
			
			\begin{itemize}
				\only<1>{\item What is this graph called?}
				\onslide<2->{\item Answer: A complete graph}
				\onslide<3->{\item The factorization entailed by the above graph is $P(X_3) P(X_5|X_3) P(X_1|X_3,X_5)$ $P(X_2|X_1,X_3,X_5) P(X_4|X_1,X_2,X_3,X_5)$}
				\onslide<4->{\item which is just chain rule of probability which hides for any distribution}
			\end{itemize}
			
		%\end{overlayarea}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			\begin{itemize}
				\onslide<1->{\item Consider a set of random variables $X_1,X_2,X_3,X_4,X_5$}
				\vspace{0.1in}
				\onslide<2->{\item There are many joint distributions possible}
				\vspace{0.1in}
				\onslide<3->{\item Each may entail different independence relations}
				\vspace{0.1in}
				\onslide<4->{\item For example, in some cases $L$ could be independent of $S$; in some not.}
				\vspace{0.1in}
				\onslide<5->{\item Can you think of a $G$ which will be an I-Map for any distribution over $P$?}
			\end{itemize}
		\end{overlayarea}
	\end{columns}
\end{frame}
\begin{frame}
	\begin{columns}
		\column{0.5\textwidth}
		%\begin{overlayarea}{\textwidth}{\textheight}
			%\vspace{0.2in}
			\includegraphics[scale=0.3]{images/module10_11/mod1x_4.jpg}
			\begin{itemize}
				\onslide<1->{\item A,B,C,D are 4 students}
				\onslide<2->{\item A and B study together sometimes}
				\onslide<3->{\item B and C study together sometimes}
				\onslide<4->{\item C and D study together sometimes}
				\onslide<5->{\item A and D study together sometimes}
				\onslide<6->{\item A and C never study together}
				\onslide<7->{\item B and D never study together}
			\end{itemize}
		%\end{overlayarea}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			\begin{itemize}
				\onslide<1->{\item To motivate undirected graphical models, let us consider a new example}
			\end{itemize}
		\end{overlayarea}
	\end{columns}
\end{frame}
\begin{frame}
	\begin{columns}
		\column{0.5\textwidth}
		%\begin{overlayarea}{\textwidth}{\textheight}
			%\vspace{0.2in}
			\includegraphics[scale=0.45]{images/module10_11/mod1x_4.jpg}
			
		%\end{overlayarea}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			\begin{itemize}
				\onslide<1->{\item To motivate undirected graphical models, let us consider a new example}
				\vspace{0.1in}
				\onslide<2->{\item Now suppose there was some misconception in the lecture due to some error made by the teacher}
				\vspace{0.1in}
				\onslide<3->{\item Each one of A,B,C,D could have independently cleared this misconception by thinking about it after the lecture.}
				\vspace{0.1in}
				\onslide<4->{\item In subsequent study pairs, each student could then pass on this information to their partner.}
			\end{itemize}
		\end{overlayarea}
	\end{columns}
\end{frame}
\begin{frame}
	\begin{columns}
		\column{0.5\textwidth}
		\includegraphics[scale=0.45]{images/module10_11/mod1x_4.jpg}
		
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			\begin{itemize}
				\onslide<1->{\item We are now interested in knowing whether a student still has the misconception or not}
				\vspace{0.1in}
				\onslide<2->{\item Or we are interested in P(A,B,C,D)}
				\vspace{0.1in}
				\onslide<3->{\item Where A,B,C,D can take values 0 (no misconception) or 1 (misconception)}
				\vspace{0.1in}
				\onslide<4->{\item How do we model this using a Bayesian Network?}
			\end{itemize}
		\end{overlayarea}
	\end{columns}
\end{frame}
\begin{frame}
	\begin{columns}
		\column{0.5\textwidth}
		\includegraphics[scale=0.45]{images/module10_11/mod1x_4.jpg}
		
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			\begin{itemize}
				\onslide<1->{\item First let us examine the conditional independencies in the problem}
				\vspace{0.1in}
				\onslide<2->{\item $A\perp C|\{B,D\}$ (because A and C never interact)}
				\vspace{0.1in}
				\onslide<3->{\item $B\perp D|\{A,C\}$ (because B and D never interact)}
				\vspace{0.1in}
				\onslide<4->{\item There are no other conditional independecies in the problem}
				\vspace{0.1in}
				\onslide<5->{\item Now, let's try to represent this using a Bayesian Network}
			\end{itemize}
		\end{overlayarea}
	\end{columns}
\end{frame}
\begin{frame}
	\begin{columns}
		\column{0.5\textwidth}
		\includegraphics[scale=0.45]{images/module10_11/mod1x_4.jpg}
		
		
		\column{0.5\textwidth}
			\begin{itemize}
				\onslide<1->{\item How about this one?}
				\vspace{0.1in}
				\onslide<2->{\item Indeed, it captures the following independence relation $A\perp C|\{B,D\}$}
				\vspace{0.1in}
				\onslide<3->{\item But it also implies that $B \not\perp D|\{A,C\}$}
			\end{itemize}
	\end{columns}
\end{frame}
\begin{frame}
	\begin{columns}
		\column{0.5\textwidth}
		\includegraphics[scale=0.45]{images/module10_11/mod1x_5.jpg}
		\newline
		\textbf{Perfect Map:} A graph G is a Perfect Map for a distribution $P$ if the independence relations implied by the graph are exactly the same as those implied by the distribution
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			\begin{itemize}
				\onslide<1->{\item Let us try a different network}
				\vspace{0.07in}
				\onslide<2->{\item Again, $A\perp C|\{B,D\}$}
				\vspace{0.07in}
				\onslide<3->{\item But $B\perp D|\{A,C\}$ (unconditional)}
				\vspace{0.07in}
				\onslide<4->{\item You can try other networks}
				\vspace{0.07in}
				\onslide<5->{\item Turns out there is no BN which can exactly capture the independence relations that we are interested in}
				\vspace{0.07in}
				\onslide<6->{\item There is no Perfect Map for this distribution}
			\end{itemize}
		\end{overlayarea}
	\end{columns}
\end{frame}
\begin{frame}
	\begin{columns}
		\column{0.5\textwidth}
		\includegraphics[scale=0.45]{images/module10_11/mod1x_4.jpg}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			%\vspace{0.2in}
			\begin{itemize}
				\onslide<1->{\item The problem is that a directed graphical model is not suitable for this example}
				%\vspace{0.04in}
				\onslide<2->{\item A directed edge between two nodes implies some kind of direction in the interaction}
				%\vspace{0.04in}
				\onslide<3->{\item For example, $(A\rightarrow B)$ could indicate that $A$ influences $B$ but not the other way round}
				%\vspace{0.04in}
				\onslide<4->{\item But in our example A and B are equal partners (they both contribute to the study discussion)}
				%\vspace{0.04in}
				\onslide<5->{\item We want to capture the strength of this interaction (and there is no direction here)}
			\end{itemize}
		\end{overlayarea}
	\end{columns}
\end{frame}
\begin{frame}
	\begin{columns}
		\column{0.5\textwidth}
		\includegraphics[scale=0.45]{images/module10_11/mod1x_4.jpg}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			\begin{itemize}
				\onslide<1->{\item We move on from DGMs to UGMs}
				\vspace{0.1in}
				\onslide<2->{\item Also known as Markov Network}
				\vspace{0.1in}
				\onslide<3->{\item The Markov Network on the left exactly captures the interaction inherent in the problem}
				\vspace{0.1in}
				\onslide<4->{\item But how do we parameterize this graph?}
			\end{itemize}
		\end{overlayarea}
	\end{columns}
\end{frame}
\begin{frame}
	\begin{columns}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			
		\end{overlayarea}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			\begin{itemize}
				\onslide<1->{\item Recall that in the directed case the factors were CPDs}
				\vspace{0.1in}
				\onslide<2->{\item And the joint distribution factorized over these CPDs}
				\vspace{0.1in}
				\onslide<3->{\item These CPDs were the factors of the ?}
				\vspace{0.1in}
				\onslide<4->{\item But CPDs don't make sense in the undirected case}
				\vspace{0.1in}
				\onslide<5->{\item There is no direction and hence no natural conditioning $A\perp B$ or $B \perp A$}
			\end{itemize}
		\end{overlayarea}
	\end{columns}
\end{frame}
\begin{frame}
	\begin{columns}
		\column{0.5\textwidth}
		\begin{overlayarea}{\textwidth}{\textheight}
			\vspace{0.2in}
			
		\end{overlayarea}
		\column{0.5\textwidth}
			\begin{itemize}
				\onslide<1->{\item So what should be the factors or parameters in this case?}
				\vspace{0.1in}
				\onslide<2->{\item $\Theta$: (What do we want these factors to capture)}
				\vspace{0.1in}
				\onslide<3->{\item $A$: The affinity between connected RVs}
				\vspace{0.1in}
			\end{itemize}
	\end{columns}
\end{frame}
