Skip to content

Commit

Permalink
Merge pull request #12 from kashefy/pca
Browse files Browse the repository at this point in the history
Kernel PCA and layout fix for Online PCA
  • Loading branch information
kashefy authored May 6, 2020
2 parents bf183f5 + 01c452c commit 95d8d87
Show file tree
Hide file tree
Showing 38 changed files with 1,476 additions and 436 deletions.
21 changes: 21 additions & 0 deletions latex/headerMIslides.tex
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,27 @@
\tikzset{myrect/.style={rectangle, fill=#1!20, draw=#1!75, text=black}}
\tikzstyle{axes}=[]

% sticky note
\usepackage{xparse}
\usetikzlibrary{shadows}
\definecolor{myyellow}{RGB}{242,226,149}
\NewDocumentCommand\StickyNote{O{6cm}mO{6cm}}{%
\begin{tikzpicture}
\node[
drop shadow={
shadow xshift=2pt,
shadow yshift=-4pt
},
inner xsep=7pt,
fill=myyellow,
xslant=0.05,
yslant=-0.05,
inner ysep=10pt
]
{\parbox[t][#1][c]{#3}{#2}};
\end{tikzpicture}%
}

% from tex.stackexchange useful to align substacks

\makeatletter
Expand Down
8 changes: 4 additions & 4 deletions notes/02_online-pca/2_apply-online-pca.tex
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ \subsection{Novelty filter}
}
}

\notesonly{- Yes by using the \emph{Anti-Hebbian rule}}

\end{frame}

\subsubsecname{Novelty Filter with normalization}
\subsubsection{Novelty Filter with normalization}

\begin{frame}\frametitle{\subsubsecname}

\notesonly{- Yes by using the}

\begin{block}{Anti-Hebbian rule:}
\begin{equation}
\Delta w_j = \overbrace{-}^{\substack{ \text{``Anti''-} \\ \text{Hebbian} }} \varepsilon y^{(\alpha)} x_j^{(\alpha)}
Expand Down Expand Up @@ -200,7 +200,7 @@ \section{PCA vs. online PCA}
\only<2>{
\slidesonly{
\begin{center}
\includegraphics[width=0.2\textwidth]{img/mem_pca_vs_online_pca}%
\includegraphics[width=0.2\textwidth]{img/meme_pca_vs_online_pca}%
\end{center}
}
}
Expand Down
2 changes: 2 additions & 0 deletions notes/02_online-pca/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ slides: $(projname).slides.tex $(projname).tex
$(compile) $(projname).slides.tex
bibtex $(projname).slides
$(compile) $(projname).slides.tex
$(compile) $(projname).slides.tex
# $(compile) --interaction=batchmode $(projname).slides.tex
mv $(projname).slides.pdf $(targetname).slides.pdf

Expand All @@ -24,6 +25,7 @@ notes: $(projname).notes.tex $(projname).tex
$(compile) $(projname).notes.tex
bibtex $(projname).notes
$(compile) $(projname).notes.tex
$(compile) $(projname).notes.tex
# $(compile) --interaction=batchmode $(projname).notes.tex
mv $(projname).notes.pdf $(targetname).notes.pdf

Expand Down
42 changes: 42 additions & 0 deletions notes/03_kernel-pca/0_recap.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

\section{linear PCA: Recap}

\begin{frame}\frametitle{\secname}
\begin{itemize}
\item Requires \pause

centering the data.
\only<2>{
\slidesonly{
\begin{center}
\includegraphics[width=0.2\textwidth]{img/mem_notthisagain}%
\end{center}
}
}

\pause

\item Eigenvalue problem: $\vec C\,\vec e = \lambda \vec e$
\item limited to \underline{linear} correlations
\end{itemize}


\begin{center}
\includegraphics[width=0.5\textwidth]{img/scatter}%
\captionof{figure}{linear vs. non-linear correlations}
\end{center}

Kernel PCA for finding non-linear features.\\


\end{frame}

\begin{frame}\frametitle{What is Kernel PCA about?}

Don't panic! Kernel PCA is essentially standard linear PCA applied to a non-linearly transformed version of the data.

\begin{center}
\includegraphics[width=0.3\textwidth]{img/koffer}%
\end{center}

\end{frame}
Loading

0 comments on commit 95d8d87

Please sign in to comment.