Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update table settings 02 intrepretable models jakob #54

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions slides/02_interpretable-models/slides01-im-motivation.tex
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
\begin{frame}{Motivation}
%Achieving interpretability by using interpretable models is the most straightforward approach
%\bigskip
\begin{columns}[T, totalwidth = \linewidth]
\begin{columns}[T, totalwidth = \textwidth]
\begin{column}{0.55\textwidth}
\begin{itemize}
%\item Obtaining interpretations by using interpretable models is the easiest and least error-prone approach
Expand Down Expand Up @@ -105,7 +105,7 @@
\end{frame}

\begin{frame}{Disadvantages}
\begin{columns}
\begin{columns}[totalwidth=\textwidth]
\begin{column}{0.75\textwidth}
\begin{itemize}%[<+->]
\itemsep1em
Expand Down
10 changes: 5 additions & 5 deletions slides/02_interpretable-models/slides02-im-lm-simple.tex
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
\vspace{-0.2cm}
$$y = \theta_0 + \theta_1 x_1 + \theta_2 x_2 + \dots + \theta_p x_p + \epsilon = \xv^\top \thetab + \epsilon$$
\textbf{Feature importance}:
\begin{columns}[T, totalwidth=\linewidth]
\begin{columns}[T, totalwidth=\textwidth]
\begin{column}{0.6\textwidth}
\begin{itemize}
\item Absolute \textbf{t-statistic} value: $\hat\theta_j$ scaled with standard error ($SE(\hat\theta_j)$ $\hat =$ reliability of estimate)
Expand All @@ -164,7 +164,7 @@
\end{columns}
\vspace{0.3cm}
\only<2->{
\begin{columns}[T, totalwidth=\linewidth]
\begin{columns}[T, totalwidth=\textwidth]
\begin{column}{0.6\textwidth}
\begin{itemize}
\item \textbf{p-value}:
Expand Down Expand Up @@ -196,7 +196,7 @@
% \hat y = \hat \theta_0 + \hat \theta_1 \mathds{1}_{(seas = SPRING)} + \hat \theta_2 \mathds{1}_{(seas = SUMMER)} + \hat \theta_3 \mathds{1}_{(seas = FALL)} + \hat \theta_4 temp + \hat \theta_5 hum + \hat \theta_6 windspeed + \hat \theta_7 days\_since\_2011
% $$
% \end{footnotesize}
\begin{columns}[T, totalwidth=\linewidth]
\begin{columns}[T, totalwidth=\textwidth]
\begin{column}{0.43\linewidth}
\vspace*{-0.3cm}
\begin{align*}
Expand Down Expand Up @@ -246,7 +246,7 @@
\pause

\lz
%\begin{columns}[T, totalwidth=\linewidth]
%\begin{columns}[T, totalwidth=\textwidth]
%\begin{column}<5>{0.46\textwidth}
%\textbf{Vis.}: Boxplot of $\hat\theta_j x_j$-values (scale invariant)\\
%weights multiplied by actual feature value (better comparable due to different scales)
Expand Down Expand Up @@ -277,4 +277,4 @@
\end{frame}

\endlecture
\end{document}
\end{document}
14 changes: 7 additions & 7 deletions slides/02_interpretable-models/slides03-im-lm-extensions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

Equation above can be extended (polynomial regression) by including

\begin{columns}[T, totalwidth=\linewidth]
\begin{columns}[T, totalwidth=\textwidth]
\begin{column}{0.65\linewidth}
\begin{itemize}
\item \textbf{high-order effects} which have their own weights\\
Expand Down Expand Up @@ -115,7 +115,7 @@

\begin{frame}{Example: Interaction Effect}
\textbf{Example}: Interaction between \code{temp} and \code{season} will affect marginal effect of \code{temp}% with (right) and without (left) interaction.
\begin{columns}[T, totalwidth=\linewidth]
\begin{columns}[T, totalwidth=\textwidth]
\begin{column}{0.65\linewidth}
\includegraphics[width = \textwidth]{figure/lm_main_vs_interaction_effects.pdf}
\end{column}
Expand Down Expand Up @@ -151,7 +151,7 @@
\end{columns}
\vfill
\pause
\begin{columns}[T, totalwidth=\linewidth]
\begin{columns}[T, totalwidth=\textwidth]
\begin{column}{0.65\linewidth}
\textbf{Interpretation}: If \code{temp} increases by 1 $^{\circ}$C, bike rentals
\begin{itemize}[<+->]
Expand Down Expand Up @@ -180,7 +180,7 @@
\begin{column}{0.685\textwidth}
\includegraphics[width=0.5\textwidth, trim=0cm 0.1cm 10.4cm 0cm, clip]{figure/poly_main_vs_interaction_effects.pdf}\invisible<1>{\includegraphics[width=0.5\textwidth, trim=10cm 0.1cm 0.4cm 0cm, clip]{figure/poly_main_vs_interaction_effects.pdf}}
%\includegraphics[width = \textwidth]{figure/poly_main_vs_interaction_effects.pdf}
%\begin{columns}
%\begin{columns}[totalwidth=\textwidth]
%\begin{center}
%\adjincludegraphics[width=\textwidth, trim={0 0 {.55\width} 0}, clip]{figure/poly_main_vs_interaction_effects.pdf}

Expand Down Expand Up @@ -274,7 +274,7 @@
% % \item Penalization parameter $\lambda$ must be chosen (e.g., by CV) %or depending on the number of features to keep
% \end{itemize}

\begin{columns}[T, totalwidth=\linewidth]
\begin{columns}[T, totalwidth=\textwidth]
\begin{column}{0.6\textwidth}
\begin{itemize}
\item LASSO adds an $L_1$-norm penalization term ($\lambda||\theta||_1$) to least squares optimization problem
Expand Down Expand Up @@ -306,7 +306,7 @@
\item LASSO with main effects and interaction \code{temp} with \code{season}
\end{itemize}
\vspace{-0.5\topsep}
\begin{columns}[c, totalwidth=\linewidth]
\begin{columns}[c, totalwidth=\textwidth]
\begin{column}{0.65\textwidth}
\begin{itemize}
%\item LASSO with main effects and interaction \code{temp} with \code{season}
Expand Down Expand Up @@ -373,4 +373,4 @@
\end{frame}
\endlecture

\end{document}
\end{document}
6 changes: 3 additions & 3 deletions slides/02_interpretable-models/slides04-im-glm.tex
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
$\leadsto$ Bernoulli / Binomial distribution
\end{itemize}
\vspace{-0.5cm}
\begin{columns}
\begin{columns}[totalwidth=\textwidth]
\begin{column}{0.45\textwidth}
\begin{itemize}
\item Target is count variable \\(e.g., number of sold products)\\
Expand Down Expand Up @@ -96,7 +96,7 @@
%\end{column}
%\begin{column}{0.55\textwidth}

% \begin{columns}[c, totalwidth=\linewidth]
% \begin{columns}[c, totalwidth=\textwidth]
% \begin{column}{0.005\linewidth}
% \scriptsize
% \rotatebox[origin=c]{90}{\hspace{10pt}$P(y = 1)$}
Expand Down Expand Up @@ -268,4 +268,4 @@
%------------------------------------------------------------------

\endlecture
\end{document}
\end{document}
14 changes: 7 additions & 7 deletions slides/02_interpretable-models/slides05-im-gam-boosting.tex
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
\item<2-> Early stopping allows feature selection \& may prevent overfitting (regularization)
%\item Specifying loss and link function according to exponential family leads a (regularized) GLM
\end{itemize}
\begin{columns}[T, totalwidth=\linewidth]
\begin{columns}[T, totalwidth=\textwidth]
\begin{column}{0.49\linewidth}
\scriptsize
\begin{table}[ht]
Expand Down Expand Up @@ -233,7 +233,7 @@
\end{column}
\end{columns}

\begin{columns}[T, totalwidth=\linewidth]
\begin{columns}[T, totalwidth=\textwidth]
\begin{column}{0.49\linewidth}
\scriptsize
\centering
Expand Down Expand Up @@ -266,7 +266,7 @@
\end{itemize}
\medskip

\begin{columns}[T, totalwidth=\linewidth]
\begin{columns}[T, totalwidth=\textwidth]
\begin{column}{0.47\linewidth}
\hspace{46pt}{\scriptsize{1000 iterations}}
\includegraphics[width = \linewidth]{figure/compboost_pfi_base2.pdf}\\
Expand Down Expand Up @@ -305,7 +305,7 @@
\item BLs: linear and centered splines for numeric features, categorical for season
%and categorical base learner for season
\end{itemize}
\begin{columns}[T, totalwidth = \linewidth]
\begin{columns}[T, totalwidth = \textwidth]
\visible<2->{
\begin{column}{0.5\linewidth}
\hspace{45pt}{\scriptsize{Feature importance}}
Expand Down Expand Up @@ -343,7 +343,7 @@

% \begin{frame}{Decision Trees}

% \begin{columns}
% \begin{columns}[totalwidth=\textwidth]

% \begin{column}{0.3\textwidth}

Expand Down Expand Up @@ -486,7 +486,7 @@
% \item E.g., mean prediction for the first 105 days since 2011 is 1798 (applies to $\hat = 15\%$ of the data)
% \item \code{days\_since\_2011} shows highest feature importance (explains most of variance)
% \end{itemize}
% \begin{columns}[T]
% \begin{columns}[T, totalwidth=\textwidth]
% \begin{column}{0.4\textwidth}
% \vspace{1.5cm}
% \begin{table}[ht]
Expand Down Expand Up @@ -594,4 +594,4 @@


\endlecture
\end{document}
\end{document}
10 changes: 5 additions & 5 deletions slides/02_interpretable-models/slides06-im-rule-based.tex
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
% \item<2-> Early stopping allows feature selection and might prevent overfitting (regularization)
% %\item Specifying loss and link function according to exponential family leads a (regularized) GLM
% \end{itemize}
% \begin{columns}[T]
% \begin{columns}[T, totalwidth=\textwidth]
% \begin{column}{0.49\textwidth}
% \scriptsize
% \begin{table}[ht]
Expand Down Expand Up @@ -322,7 +322,7 @@
% \item BLs: linear and centered splines for numeric features, categorical for season
% %and categorical base learner for season
% \end{itemize}
% \begin{columns}[T]
% \begin{columns}[T, totalwidth=\textwidth]
% \visible<2->{
% \begin{column}{0.5\textwidth}
% \hspace{45pt}{\scriptsize{Feature importance}}
Expand Down Expand Up @@ -393,7 +393,7 @@
% \medskip
% \scriptsize
% \pause
% \begin{columns}[T, totalwidth = \linewidth]
% \begin{columns}[T, totalwidth = \textwidth]
% \begin{column}{0.7\textwidth}
% \textbf{Example (selection bias)}:
% $n = 200,\, Y \sim N(0,1)$ \\
Expand Down Expand Up @@ -483,7 +483,7 @@

% \textbf{Example:} Bike data (here: linear model with temp in final nodes)

% \begin{columns}[T]
% \begin{columns}[T, totalwidth=\textwidth]
% \begin{column}{0.8\textwidth}
% \includegraphics[width = \textwidth]{figure/bike_mob.pdf}
% \end{column}
Expand Down Expand Up @@ -568,4 +568,4 @@
\end{columns}
\end{frame}
\endlecture
\end{document}
\end{document}