% Name sthlm Beamer Theme :: HEAVILY based on the hsrmbeamer theme
%
% Author Mark Hendry Olson :: Original Author of the hsrmbeamer theme is Benjamin Weiss
%
% Email sayhi@hendryolson.com
%
% Website http://hendryolson.com
%
% License
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% See http://www.gnu.org/licenses/.
%
% Description This presentation is a demonstration of the sthlm beamer
% theme, which is HEAVILY based on the HSRM beamer theme created by Benjamin Weiss
% (benjamin.weiss@student.hs-rm.de), which can be found on GitHub
% <https://github.com/hsrmbeamertheme/hsrmbeamertheme>.
%
% Created 20130731-102346
%
% Log
% 2014-07-08
% -Redesigned for pdfLaTeX using the New PX font
% -Removed all IEGS logos and backgrounds
% -Released as a WriteLaTeX template
%
% 2013-08-01
% - Added overlay effect thanks to: <http://www.cgogolin.de/Computer.html>
%
% 2013-07-31
% - Replaced HSRM beamer theme title page background pdf
% - Replaced HSRM beamer theme logo with IEGS apple logo
% - Redefined HSRM color theme with an ios7 inspired color scheme
% - Changed how mini-frames show subsection progress
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
%
% LOADING DOCUMENT
%
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\documentclass[compress]{beamer}
\usetheme{sthlm}
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
% LOADING BEAMER PACKAGES
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\usepackage{
booktabs,
datetime,
dtk-logos,
graphicx,
multicol,
pgfplots,
ragged2e,
tabularx,
tikz,
wasysym
}
\pgfplotsset{compat=1.8}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{newpxtext,newpxmath}
\usepackage{listings}
\lstset{ %
language=[LaTeX]TeX,
basicstyle=\normalsize\ttfamily,
keywordstyle=,
numbers=left,
numberstyle=\tiny\ttfamily,
stepnumber=1,
showspaces=false,
showstringspaces=false,
showtabs=false,
breaklines=true,
frame=tb,
framerule=0.5pt,
tabsize=4,
framexleftmargin=0.5em,
framexrightmargin=0.5em,
xleftmargin=0.5em,
xrightmargin=0.5em
}
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
% LOADING TIKZ LIBRARIES
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\usetikzlibrary{
backgrounds,
mindmap
}
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
% BEAMER OPTIONS
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\setbeameroption{show notes}
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
% BEAMER COMMANDS
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
%
% PRESENTATION INFORMATION
%
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\title{PCA}
\subtitle{Principal Component Analysis}
\date{\today}
\author{\texttt{Parabhat Soni}}
\institute{MTech CSE}
\hypersetup{
pdfauthor = {Mark H. Olson: sayhi@hendryolson.com},
pdfsubject = {Mathematics, },
pdfkeywords = {},
pdfmoddate= {D:\pdfdate},
pdfcreator = {WriteLaTeX}
}
\begin{document}
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
%
% TITLE PAGE
%
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\maketitle
%\begin{frame}[plain]
% \titlepage
%\end{frame}
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
%
% TABLE OF CONTENTS: OVERVIEW
%
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\section*{Overview}
\begin{frame}{Overview}
% For longer presentations hideallsubsections
\tableofcontents[hideallsubsections]
\end{frame}
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
%
% SECTION: BACKGROUND
%
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\section{Introduction}
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
% FRAME: What is PCA?
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\begin{frame}{What is PCA?}
Central idea of principal component analysis:
\begin{itemize}
\item reduce of dimensionality of a data set consisting of large number of interrelated variables
\item retaining as much as possible of the variation present in the data set.
\item This is achieved by transforming to a new set of variables, principal components(PCs)
\item Pcs are uncorrelated and ordered so that the first few retains the most of the variation present.
\end{itemize}
\end{frame}
\begin{frame}{What is PCA?}
PCA finds a linear projection of high dimensional data into a lower dimensional subspace such as:
\begin{itemize}
\item The variance retained is maximized.(??)
\end{itemize}
\end{frame}
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
%
% SECTION: STRUCTURE
%
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\section{Pre-requisites}
\begin{frame}{Pre Requisites}
Some of the pre requisites:
\begin{enumerate}
\item Eigen vectors
\begin{enumerate}
\item \texttt{ If A is a square matrix then a non zero vector v is an eigenvector of A if there is a scalar quantity such that }
\begin{block}{}
\[
A \upsilon = \lambda\upsilon
\]
\end{block}
\end{enumerate}
\end{enumerate}
\end{frame}
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
%
% SECTION: ADDITIONAL FEATURES
%
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\section{Derivation}
\begin{frame}{PCA - Derivation}
Given a zero-mean random variable \[X \epsilon R^{D}, \] the first principal component of X is defined as \[\upsilon_{1} = arg max_{\upsilon 1} var(Xv_{1})\]
\[Subject \ to: \upsilon_{1}^{T}\upsilon_{1} = 1\]
Rewrite in terms of the covariance matrix: \[ var(X\upsilon_{1}) = \frac{1}{N-1}(X\upsilon_{1})^{T}(X\upsilon_{1})=\upsilon_{1}^{T}C\upsilon_{1}\]
Solved via constrained optimisation using Lagranges method:\[L(\upsilon_{1},\lambda_{1}) = \upsilon_{1}^{T}C\upsilon_{1}+\lambda_{1}(1-\upsilon_{1}^{T}\upsilon_{1})\]
\end{frame}
\begin{frame}{PCA - Derivation contd...}
Constrained Optimisation: \[L(\upsilon_{1},\lambda_{1}) = \upsilon_{1}^{T}C\upsilon_{1}+\lambda_{1}(1-\upsilon_{1}^{T}\upsilon_{1})\]
Gradient with respect to v:
\[\frac{dL(\upsilon_{1},\lambda_{1})} {d\upsilon_{1}} = 2C\upsilon_{1} - 2\lambda_{1}\upsilon{1} \Rightarrow C\upsilon_{1} = \lambda_{!}\upsilon_{1} \]
\setbeamercolor{sthlmRed}{fg=sthlmRed,bg=white}
\begin{beamercolorbox}[wd=\linewidth,ht=2ex,dp=0.7ex]{sthlmRed}
\texttt{This is the eigenvector problem!}
\end{beamercolorbox}
Multiply by v1T:\[\lambda_{1}=\upsilon_{1}^{T}C\upsilon_{1}\]
\setbeamercolor{sthlmRed}{fg=sthlmRed,bg=white}
\begin{beamercolorbox}[wd=\linewidth,ht=2ex,dp=0.7ex]{sthlmRed}
\texttt{The projection variance is the eigenvalue}
\end{beamercolorbox}
And further we can find more PCs.
\end{frame}
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
%
% SECTION: TUTORIAL
%
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\section{PCA - Steps to be followed}
\begin{frame}{PCA - Steps to be followed}
PCA Steps: Transform an N x d matrix into an N × m matrix :
\begin{itemize}
\item Centralized the data (subtract the mean).
\item Calculate the × covariance matrix:
\[C=\frac{1}{N-1}X^{T}X\]
\item Calculate the eigenvectors of the covariance matrix.
\item Select m eigenvectors that correspond to the largest m eigenvalues to be the new basis.
\end{itemize}
\end{frame}
\section{Useful properties of PCA}
\begin{frame}{Useful properties of PCA}
PCA Steps: Transform an N x d matrix into an N × m matrix :
\begin{itemize}
\item Centralized the data (subtract the mean).
\item Calculate the × covariance matrix:
\[C=\frac{1}{N-1}X^{T}X\]
\item Calculate the eigenvectors of the covariance matrix.
\item Select m eigenvectors that correspond to the largest m eigenvalues to be the new basis.
\end{itemize}
\end{frame}
\section{gPCA - Generalized Principal Component Analysis}
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
% SUBSECTION: TUTORIAL
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\subsection{the class}
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
% FRAME: Theme Options
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\begin{frame}{Theme Options}
This theme comes with some options to change it's appearance.
\begin{table}[]
\begin{tabularx}{\linewidth}{l>{\raggedright}X}
\toprule
\textbf{Option} & \textbf{Description} \tabularnewline
\midrule
\texttt{nosectionpages} & Section pages will be supressed.\tabularnewline
\bottomrule
\end{tabularx}
\label{tab:options}
\end{table}
\end{frame}
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
% FRAME: Presentation Structure
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\begin{frame}[containsverbatim]{Presentation Structure}
A section page will be generated and the section name included in the presentation header for each section of the presentation with the current section being emphasized. If you include subsections in your presentation, then a small block will appear under the section name in the header for each frame. Once a frame has been viewed it will turn green.
It's worth noting that a frame can make up multiple slides.
\begin{lstlisting}
\section{Main Section}
\subsection{Main Subsection}
\begin{frame}
\frametitle{Presentation Stucture}
% Frame Contents Here
\end{frame}
\end{lstlisting}
\end{frame}
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
% FRAME: Table of Contents
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\begin{frame}[containsverbatim]{Table of Contents}
Include a listing of the presentation's sections
\begin{lstlisting}
\maketitle
\end{lstlisting}
For those longer presentations - keep the table of contents compact.
\begin{lstlisting}
\begin{frame}{Overview}
\tableofcontents[hideallsubsections]
\end{frame}
\end{lstlisting}
\end{frame}
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
% FRAME: Quotations
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\begin{frame}[containsverbatim]{Quotations}
At any time you can highlight text by using the \lstinline!\alert! definition:
\begin{itemize}
\item \alert{This is super important!}
\end{itemize}
The sthlm presentation has both \lstinline! and \lstinline!! definitions for quoting text.
\begin{itemize}
\item[] >This text has been quoted<
\item[] >>This text has been double quoted<<
\end{itemize}
\end{frame}
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
% FRAME: Notes
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\begin{frame}{Notes}
There are a couple different ways in which you can present your presentation.
\begin{itemize}
\item Splitshow (Mac OS X)\\\url{https://code.google.com/p/splitshow/}
\item pdf-presenter (Windows)\\\url{https://code.google.com/p/pdf-presenter/}
\end{itemize}
\end{frame}
\note{
Let me include a note for this particular slide.
\begin{itemize}
\item Splitshow (Mac OS X)\\\url{https://code.google.com/p/splitshow/}
\item pdf-presenter (Windows)\\\url{https://code.google.com/p/pdf-presenter/}
\end{itemize}
}
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
% FRAME: Multiple Columns
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\begin{frame}{Multiple Columns}
\begin{multicols}{2}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\begin{itemize}
\item Point 1
\item Point 2
\end{itemize}
\end{multicols}
\end{frame}
\begin{frame}{References}
\begin{thebibliography}{10}
\beamertemplatebookbibitems
\bibitem{Oppenheim2009}
Alan~V.~Oppenheim
\newblock Discrete-Time Signal Processing
\newblock Prentice Hall Press, 2009
\beamertemplatearticlebibitems
\bibitem{EBU2011}
European~Broadcasting~Union
\newblock Specification of the Broadcast Wave Format (BWF)
\newblock 2011
\end{thebibliography}
\end{frame}
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
%
% SECTION: Conclusion
%
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\begin{frame}{About}
This sthlm beamer theme is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.\\
If you have any questions or comments
\begin{itemize}
\item \url{sayhi@hendryolson.com}
\end{itemize}
\end{frame}
\end{document}