\documentclass{beamer}
\usepackage{graphics}
\usepackage{xcolor}
\usepackage{multirow}

%Information to be included in the title page:
\title{Multicast policy predictions under energy consumption and network coverage constraints}
\author{Loic Guegan, Issam Raïs}
\institute{UiT}
\date{2022}


\setbeamertemplate{navigation symbols}{}
\begin{document}

\frame{\titlepage}

\begin{frame}
  \frametitle{Context}
  Disseminate data:
  \begin{itemize}
      \setlength\itemsep{0.8em}
  \item Wireless communications
  \item Energy constraint
  \item Maximize coverage
  \end{itemize}
  \vspace{1cm}
  \centering
  \textbf{But energy and coverage are not deterministic}
\end{frame}

\begin{frame}
  \frametitle{Problem}
  \centering
  \includegraphics[scale=0.49]{../analysis/figures/dimension_energy-coverage.pdf}
\end{frame}

\begin{frame}
  \frametitle{Problem}
  \begin{center}
    \textbf{How to choose the correct policy for a given setup?}
  \end{center}
  \vspace{0.8cm}
  If:\\ \vspace{0.3cm}
  \begin{itemize}
  \item Perfect coverage not required:
    \begin{itemize}
    \item Just N+1,...,N+n redundancy (network coverage of n)
    \item Collaboration of n nodes (e.g 3 to monitor a phenomenon)
    \end{itemize}
  \item Have a target energy budget
  \item Minimizing energy consumption not required (low energy target)
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Problem}
  Inputs:
  \begin{itemize}
  \item Nodes setup:
    \begin{itemize}
    \item LoRa/NbIoT?
    \item Uptimes duration 60s/180s?
    \end{itemize}
  \item Requirements:
    \begin{itemize}
    \item Nodes energy consumption
    \item Network coverage
    \end{itemize}
  \end{itemize}
  \vspace{1cm}
  \centering
  \textbf{How can we predict which policy to use to meet the requirements?}
\end{frame}


\begin{frame}
  \frametitle{Solution}
  \begin{centering}
    \textbf{Use classification models!}
  \end{centering}\\ \vspace{1cm}
  We choose:
  \begin{itemize}
  \item K Nearrest Neighbours
  \item Decision Trees
  \end{itemize}
  \vspace{1cm}
  Two ML/Analytics approaches for training:
  \begin{itemize}
  \item Offline
  \item Online
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Offline: Accuracy}
  Two metrics:
  \begin{itemize}
  \item F1 Score
  \item Accuracy
  \end{itemize}
  \begin{table}[!ht]
    \centering
    \resizebox{\columnwidth}{!}{%
    \begin{tabular}{|l|l|l|l|l|l|}
    \hline
        \textbf{model} & f1\_baseline & f1\_hint & f1\_extended & f1\_hintandextended & accuracy \\ \hline
        \textit{knn} & 0.83 & 0.73 & 0.9 & 0.79 & 0.69 \\ \hline
        \textit{tree} & 0.9 & 0.75 & 0.86 & 0.79 & 0.7 \\ \hline
    \end{tabular}}   
  \end{table}
\end{frame}

\begin{frame}
  \frametitle{Offline: The hint case}
  \centering
  \includegraphics[scale=0.45]{../analysis/figures/dimension_energy-coverage.pdf}
\end{frame}

\begin{frame}
  \frametitle{Offline: The hint case}
  \centering
  \vspace{-0.7cm}
  \includegraphics[scale=0.55]{../analysis/figures/tree_false.pdf}
\end{frame}


\begin{frame}
  \frametitle{Offline: Accuracy (no hint)}
  \begin{table}[!ht]
    \centering
    \resizebox{\columnwidth}{!}{%
    \begin{tabular}{|l|l|l|l|l|l|}
    \hline
        \textbf{model} & f1\_baseline & f1\_hint & f1\_extended & f1\_hintandextended & accuracy \\ \hline
        \textit{knn} & 0.83 & 0.73 & 0.9 & 0.79 & 0.69 \\ \hline
        \textit{tree} & 0.9 & 0.75 & 0.86 & 0.79 & 0.7 \\ \hline
    \end{tabular}}   
  \end{table}
  %%% ----- No hint
  \begin{table}[!ht]
    \centering
    \resizebox{\columnwidth}{!}{%
    \begin{tabular}{|l|l|l|l|l|l|}
    \hline
        \textbf{model} & f1\_baseline & f1\_hint & f1\_extended & f1\_hintandextended & accuracy \\ \hline
        \textit{knn} & 0.88 & NA & 0.89 & \textbf{\color{red}0.91} & \textbf{\color{blue}0.81} \\ \hline
        \textit{tree} & 0.93 & NA & 0.86 & \textbf{\color{red}0.92} & \textbf{\color{blue}0.83} \\ \hline
    \end{tabular}}   
  \end{table}
\end{frame}

\begin{frame}
  \frametitle{Offline: Simulation results}
  Random:
  \begin{itemize}
  \item Energy budget $[min(e), max(e)]$
  \item Coverage target $[1, 12]$
  \end{itemize}
  \centering
  \begin{table}[!ht]
    \centering
    \resizebox{\columnwidth}{!}{%
    \begin{tabular}{|l|l|l|r|r|}
      \hline
      wireless & wakeupfor & model & $\overline{\Delta}$ Energy (J) & $\overline{\Delta}$ coverage \\ \hline
      \multirow{4}{*}{LoRa} & \multirow{2}{*}{60} & knn  & -171.89(120)  & -0.78(0.88) \\ \cline{3-5}
      & & tree                                           & -207.11(123)  & -1.05(0.90) \\ \cline{2-5}
      & \multirow{2}{*}{180} & knn                       & -2629.47(203) & 0.11(0.44) \\ \cline{3-5}
      & & tree                                           & {\color{red}-2924.29(173)} & {\color{blue}-1.44(0.38)} \\ \hline
      \multirow{4}{*}{NbIoT} & \multirow{2}{*}{60} & knn & -560.44(68)   & -0.53(0.38) \\ \cline{3-5}
      & & tree                                           & -521.77(62)   & 0.19(0.35) \\ \cline{2-5}
      & \multirow{2}{*}{180} & knn                       & -1543.86(378) & {\color{blue}1.51(0.43)} \\ \cline{3-5}
      & & tree                                           & {\color{red}-1874.18(357)} & 1.36(0.41) \\ \hline
    \end{tabular}}
  \end{table}
\end{frame}

\begin{frame}
  \frametitle{Online}
  Assumptions:
  \begin{itemize}
  \item One policy per day (round-robin)
  \item All nodes use the same policy
  \item One extra communication per day by the sender (learning)
  \item Energy consumption + Coverage known among the nodes
  \end{itemize}
  \vspace{1cm}
  Consequences:
  \begin{itemize}
  \item Each node build the same model
  \item Each node will take the same decision (policy)
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Online: KNN}
  \vspace{-1.7cm}\hfill\includegraphics[scale=0.38]{../analysis/figures/months_knn.pdf}        
  \begin{itemize}
  \item $\ne$ learning curves
  \item Easier predictions on less constraint scenarios
  \end{itemize}
\end{frame}


\begin{frame}
  \frametitle{Online: Tree}
  \vspace{-1.7cm}\hfill\includegraphics[scale=0.38]{../analysis/figures/months_tree.pdf}\hspace{-0.8cm}
  \begin{itemize}
  \item Baseline easier to predict
  \item Easier predictions on less constraint scenarios
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Summary}
  Results:
  \begin{itemize}
  \item \textit{Similar policies} could lower model's accuracy
  \item Work well with policies with \textit{low variances} in energy (fallback to energy budget (scale))
  \item Online ML:
    \begin{itemize}
    \item Learning curve hard to predict (long/short)
    \item Applicable to less energy constraint scenarios
    \end{itemize}
  \end{itemize}
  Contributions:
  \begin{itemize}
  \item Methodology
  \item A study (simulations) of online/offline model
  \end{itemize}
  Futur works:
  \begin{itemize}
  \item Cost of online classification (e.g: energy)
  \item Impact of parameters on training time (e.g: number of nodes)
  \item Opportunistic learning for online classification (e.g: use occuring communications for learning)
  \end{itemize}
\end{frame}



\end{document}
