\documentclass[11pt]{article}
\usepackage{latexsym}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{epsfig}
\usepackage[tight]{subfigure}

\newcommand{\handout}[5]{
  \noindent
  \begin{center}
  \framebox{
    \vbox{
      \hbox to 5.78in { {#1} \hfill #2 }
      \vspace{4mm}
      \hbox to 5.78in { {\Large \hfill #5  \hfill} }
      \vspace{2mm}
      \hbox to 5.78in { {\em #3 \hfill #4} }
    }
  }
  \end{center}
  \vspace*{4mm}
}

\newcommand{\lecture}[5]{\handout{#1}{#2}{#3}{#4}{#5}}

\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{observation}[theorem]{Observation}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{fact}[theorem]{Fact}
\newtheorem{assumption}[theorem]{Assumption}

% 1-inch margins, from fullpage.sty by H.Partl, Version 2, Dec. 15, 1988.
\topmargin 0pt
\advance \topmargin by -\headheight
\advance \topmargin by -\headsep
\textheight 8.9in
\oddsidemargin 0pt
\evensidemargin \oddsidemargin
\marginparwidth 0.5in
\textwidth 6.5in

\parindent 0in
\parskip 1.5ex
%\renewcommand{\baselinestretch}{1.25}

\begin{document}

\lecture{Statistical Techniques in Robotics (16-831, F09)}{Lecture \#23 11/10/2009}{Lecturer: Drew Bagnell}{Scribe: Jack Singleton}{Kernel Review and Novelty Detection}

\section{Review Online Kernel Machine}
\begin{itemize}
\item inner product: \[<f,g> = \sum_i \sum_j \alpha_i \beta_j K(x_i,x_j) = \alpha^TK\beta\]
\item $f \epsilon H_k, f=\sum \alpha_i K(x_i, \cdot)$
\item$K$ is the Kernel Matrix
	\begin{itemize}
		\item[-] $K$ is positive definite (ex: $K(x_1,x_2)=x_1^Tx_2$)
		\item[-] The bigger the kernel width, the smoother the output and larger the computations
		\item[-] The smaller the kernel width, the more regret we will pay because all points will be constrained.
	\end{itemize}
\item Do online gradient descent with functions:
\begin{enumerate}
\item Initialize \[f=0\]
\item Receive \[x_t\]
\item Predict using \[f(x_t) = \sum_{i=1}^n \alpha_i K(x_i, x_t)\]
\item Receive \[y_t = C_t(f(x_t))\]
\item Update \[f_{t+1} \leftarrow  f_t + \eta_{t+1} C'(f(x_t))K(x_i, x_t)  \]
Math sidenote: derivative computed with chain rule: \[\frac{dC}{dx} = C'(f(x_t))\cdot f'(x_t) = C'(f(x_t))\cdot K(x_i,x_t)\]
\item Shrink weights by $(1-\eta_t \lambda) $
\end{enumerate}
\item As time progresses and the data set grows, the prediction step will take longer and longer to compute.  To shorten this computation time you may want to throw out old data points.  In class we talked about throwing out points by age or by weight.

\item The regret is computed with: \[Regret = \sum_t (C_t(f_t(x_t)) - C_t(f^*(x_t))) | f^* \in H_k\]
The regret bound:\[Regret = ||\nabla C_t(f)||_k \cdot ||f^*||_k \sqrt T \]
$||f^*||$ is the size of the function.  $||\nabla C_t(f)||$ can get as big as $\alpha^TK\alpha$.



\item \textbf{Representer Theorem}: For every loss function of the form $\sum C(f(x_i)) + \gamma ||f||^2 $ the optimal solution, $f^*$, is in the span of $K(x_i,\cdot)$.

(informally): Given a loss function and regularizer objective 
with many data points $\{x_i\}$, the minimizing solution $f^*$ can be represented as
\begin{equation}
f^*(\cdot) = \sum_i \alpha_i K(x_i, \cdot)
\end{equation}

\item
Alternate idea from class: perform gradient descent in the space of $\alpha$ coefficients: $\nabla_{\alpha} L$
	\begin{itemize}
	\item Takes $n^2$ iterations to get same performance ($n$ = number of iterations of functional gradient descent)
	\item Every iteration is $O(T^2)$
	\end{itemize}
\end{itemize}

\section{Novelty Detection}
\begin{itemize}
\item Call something "not novel" if $f \geq threshold$
\item SVM novelty loss \[\mathcal{L}=max(0,\gamma - f(x))\]
if $f(x) > \gamma$ \[\nabla \mathcal{L} = 0\]
else \[f = f + \alpha K(x_i,\cdot)\]
\end{itemize}
\underline{Tricks}
\begin{enumerate}
\item Use supervised learning to pick kernel
\item Race to be not novel: if you run out of time to declare something not novel, then just call it novel and move on.
\item kd-tree
\item move-to-front
\end{enumerate}
\end{document}
