\counterwithin{figure}{section}
\counterwithin{table}{section}

\section{Windowed Eating Model Results Replication}
\label{app:replication}

A replication experiment was performed for the windowed eating classification model from previous work~\cite{sharma2020}. The wrist motion data was sliced into $W = 6$ minute windows (5400 data) with $s = 15$ second (225 data) stride between them. Before processing, acceleration bias was removed with a trend filter, data was smoothed with a Gaussian filter with a window length of 15 data and $\sigma = 10.0$, and the data was $z$-score normalized with global trended standard deviations for each axis of data and all zero means. For training and testing, 5-fold cross validation was used. The classifier was trained for 30 epochs and the model with the best training accuracy was saved and used for testing. The windows of data used for testing were created with $W = 6$ minutes (5400 data) and $s = 1$ datum.

Time and episode metrics were measured after processing the model output with a dual-threshold hysteresis method. The approach was set up to mirror that in~\cite{sharma2020} and the two thresholds were set to $T_S = 0.8$ and $T_E = 0.4$ to match as well. The results of this experiment are reported in tables \ref{tab:app-replication-time} and \ref{tab:app-replication-episode}. Overall, the replicated time metrics were 1-4\% lower than reported and the episode TPR was 2\% lower. FP/TP also increased by 6\%. Comparing the replicated results to the daily pattern classifier results there is only a 2\% decline in episode TPR with a slightly larger 56\% decrease in FP/TP at the chosen threshold $T=0.1$.

\begin{table}[b!]
\renewcommand\arraystretch{1.5}
\centering
\begin{tabular}{|l|c|c|c|c|c|}
\hline
\rowcolor[HTML]{EFEFEF} 
Model   & TPR (\%) & TNR (\%)& F$_1$ (\%) & Precision (\%) & Acc$_W$ (\%) \\ \hline
Windowed Classifier (Reported in~\cite{sharma2020}) & 69                & 93                & 48               & 36                      & 80                   \\ \hline
Windowed Classifier (Replicated) & 68                & 92                & 44               & 33                      & 80                   \\ \hline
Daily Pattern Classifier   & 78                & 93                & 50               & 37                      & 85                   \\ \hline
\end{tabular}
\caption{Time evaluation metrics comparing reported and replicated results for the windowed eating classifier. Results for the daily pattern classifier (this work) are also shown for reference.} 
\label{tab:app-replication-time}
\end{table}

\begin{table}[b!]
\renewcommand\arraystretch{1.5}
\centering
\begin{tabular}{|l|c|c|}
\hline
\rowcolor[HTML]{EFEFEF} 
Model         & TPR (\%) & FP/TP \\ \hline
Windowed Classifier (Reported in~\cite{sharma2020}) & 89                & 1.7            \\ \hline
Windowed Classifier (Replicated) & 87                & 1.8           \\ \hline
Daily Pattern Classifier   & 85                & 0.8            \\ \hline
\end{tabular}
\caption{Episode evaluation metrics comparing reported and replicated results for the windowed eating classifier. Results for the daily pattern classifier are also shown for reference.} 
\label{tab:app-replication-episode}
\end{table}

All time and episode evaluation metrics measured for the daily pattern classifier are shown in table \ref{app:table-daily-results}. Similarly, these results are shown for the windowed eating classifier replication experiment in table \ref{app:table-window-results}.

\begin{table}
\renewcommand\arraystretch{1.5}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|}
\hline
\rowcolor[HTML]{EFEFEF} 
\textbf{}              & \multicolumn{5}{c|}{\cellcolor[HTML]{EFEFEF}\textbf{Time Metrics (\%)}}                                      & \multicolumn{3}{c|}{\cellcolor[HTML]{EFEFEF}\textbf{Episode Metrics}} \\ \hline
\rowcolor[HTML]{EFEFEF} 
\textbf{Threshold ($T$)} & \textbf{Acc$_W$} & \textbf{TPR} & \textbf{TNR} & \textbf{F$_1$} & \textbf{Precision} & \textbf{TPR (\%)}       & \textbf{F$_1$ (\%)}      & \textbf{FP/TP}      \\ \hline
0.01                   & 81.40              & 90.89             & 71.90             & 26.34            & 15.42                   & 94.97                   & 47.76                 & 2.14                \\ \hline
0.02                   & 84.21              & 88.00             & 80.42             & 32.80            & 20.20                   & 92.78                   & 52.05                 & 1.77                \\ \hline
0.03                   & 85.19              & 85.98             & 84.40             & 37.09            & 23.69                   & 91.17                   & 55.43                 & 1.52                \\ \hline
0.04                   & 85.58              & 84.36             & 86.80             & 40.23            & 26.47                   & 89.89                   & 58.04                 & 1.34                \\ \hline
0.05                   & 85.71              & 82.97             & 88.45             & 42.69            & 28.80                   & 88.77                   & 60.10                 & 1.21                \\ \hline
0.06                   & 85.70              & 81.74             & 89.66             & 44.69            & 30.82                   & 87.81                   & 61.80                 & 1.10                \\ \hline
0.07                   & 85.62              & 80.63             & 90.61             & 46.36            & 32.60                   & 86.94                   & 63.22                 & 1.02                \\ \hline
0.08                   & 85.50              & 79.62             & 91.37             & 47.78            & 34.20                   & 86.15                   & 64.43                 & 0.95                \\ \hline
0.09                   & 85.34              & 78.69             & 92.00             & 49.00            & 35.65                   & 85.42                   & 65.46                 & 0.89                \\ \hline
0.1                    & 85.16              & 77.79             & 92.53             & 50.06            & 36.99                   & 84.71                   & 66.33                 & 0.84                \\ \hline
0.15                   & 84.03              & 73.71             & 94.35             & 53.73            & 42.36                   & 81.55                   & 69.33                 & 0.66                \\ \hline
0.2                    & 82.78              & 70.11             & 95.44             & 55.81            & 46.45                   & 78.81                   & 70.93                 & 0.55                \\ \hline
0.25                   & 81.53              & 66.86             & 96.20             & 57.03            & 49.81                   & 76.33                   & 71.76                 & 0.48                \\ \hline
0.3                    & 80.27              & 63.77             & 96.77             & 57.66            & 52.71                   & 73.84                   & 72.00                 & 0.43                \\ \hline
0.35                   & 79.01              & 60.78             & 97.23             & 57.88            & 55.33                   & 71.37                   & 71.86                 & 0.39                \\ \hline
0.4                    & 77.70              & 57.79             & 97.61             & 57.71            & 57.73                   & 68.79                   & 71.34                 & 0.35                \\ \hline
0.45                   & 76.35              & 54.76             & 97.94             & 57.21            & 59.98                   & 66.10                   & 70.50                 & 0.33                \\ \hline
0.5                    & 74.90              & 51.58             & 98.23             & 56.33            & 62.11                   & 63.29                   & 69.38                 & 0.31                \\ \hline
0.55                   & 73.34              & 48.19             & 98.48             & 55.02            & 64.17                   & 60.28                   & 67.96                 & 0.29                \\ \hline
0.6                    & 71.63              & 44.54             & 98.72             & 53.23            & 66.19                   & 56.99                   & 66.17                 & 0.27                \\ \hline
0.65                   & 69.73              & 40.54             & 98.93             & 50.82            & 68.16                   & 53.26                   & 63.88                 & 0.26                \\ \hline
0.7                    & 67.58              & 36.03             & 99.14             & 47.60            & 70.17                   & 48.97                   & 60.94                 & 0.24                \\ \hline
0.75                   & 65.09              & 30.86             & 99.33             & 43.25            & 72.33                   & 43.94                   & 57.16                 & 0.23                \\ \hline
0.8                    & 62.13              & 24.75             & 99.52             & 37.16            & 74.53                   & 37.57                   & 51.69                 & 0.21                \\ \hline
\end{tabular}
\caption{Time and episode evaluation metrics for the daily pattern classifier at various threshold values $T$}
\label{app:table-daily-results}
\end{table}

\begin{table}
\renewcommand\arraystretch{1.5}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|}
\hline
\rowcolor[HTML]{EFEFEF} 
 \multicolumn{2}{|c|}{\cellcolor[HTML]{EFEFEF}\textbf{Threshold}}      & \multicolumn{5}{c|}{\cellcolor[HTML]{EFEFEF}\textbf{Time Metrics (\%)}}        & \multicolumn{3}{c|}{\cellcolor[HTML]{EFEFEF}\textbf{Episode Metrics}} \\ \hline
\rowcolor[HTML]{EFEFEF} 
\textbf{$T_S$} & \textbf{$T_E$} & \textbf{Acc$_W$} & \textbf{TPR} & \textbf{TNR} & \textbf{F$_1$} & \textbf{Precision} & \textbf{TPR (\%)}       & \textbf{F$_1$ (\%)}      & \textbf{FP/TP}      \\ \hline
0.65          & 0.3           & 80.79         & 77.96        & 83.62        & 33.65       & 21.56              & 93.35                   & 37.76                 & 3.26                \\ \hline
0.7           & 0.3           & 80.93         & 76.12        & 85.74        & 35.92       & 23.65              & 91.68                   & 42.31                 & 2.68                \\ \hline
0.75          & 0.3           & 81.08         & 74.34        & 87.82        & 38.58       & 26.27              & 90.09                   & 47.36                 & 2.15                \\ \hline
0.8           & 0.3           & 80.67         & 71.50        & 89.85        & 41.08       & 29.10              & 87.00                   & 52.71                 & 1.67                \\ \hline
0.8           & 0.4           & 80.02         & 68.18        & 91.87        & 44.04       & 32.90              & 86.81                   & 50.37                 & 1.85                \\ \hline
0.85          & 0.3           & 80.05         & 68.21        & 91.90        & 44.06       & 32.92              & 82.88                   & 58.04                 & 1.25                \\ \hline
0.9           & 0.3           & 78.32         & 62.59        & 94.04        & 46.77       & 38.01              & 76.69                   & 63.02                 & 0.86                \\ \hline
\end{tabular}
\caption{Time and episode evaluation metrics for the windowed eating classifier at various threshold values $T_S$, $T_E$}
\label{app:table-window-results}
\end{table}

The effect of various values of $T_S$ was also investigated to compare with reported figures and the results of changing $T$ with the daily pattern classifier. These results are shown in figure \ref{fig:app-replication-tpr}. Overall, similar deviation can be seen between the reported and replicated results. The replicated results exhibit lower episode true positive rates for $T_S$ values below 0.75 and higher FP/TP ratios for $T_S$ values above 0.75. Still, for every episode TPR, the daily pattern classifier offers lower FP/TP than the windowed eating classifier. It is important to note that these values shown are at a $T_E$ threshold of 0.3 to match those reported in a similar figure from~\cite{sharma2020}. The results from tables \ref{tab:app-replication-time} and \ref{tab:app-replication-episode} on page \pageref{tab:app-replication-time} are with $T_S = 0.8$ and $T_E = 0.4$.
\vfill
\begin{figure}[h!]
\centering
\includegraphics[width=\textwidth]{img/threshold_comparison_tpr_replicated.pdf}
\caption{Effect of threshold $T_S$ (number below points) on the window-based classifier with $T_E$ = 0.3 reported in~\cite{sharma2020} and replicated. The effect of threshold $T$ (number next to points) on episode TPR and FP/TP for the daily pattern model is also shown for reference.}
\label{fig:app-replication-tpr}
\end{figure}
\vfill
