%Uncomment the following chunk of code and \end{document} at the end to
%test-compile this table only.
%\documentclass{article}

% ---------- PACKAGES ----------
%\usepackage[utf8]{inputenc}
%\usepackage{booktabs}       % for \toprule, \midrule, \bottomrule
%\usepackage{threeparttable} % for notes below tables
%\usepackage{array}          % for column width specification (p{width})
%\usepackage[margin=1in]{geometry} % reasonable margins
%\usepackage{amsmath}        % for math notation
%\usepackage{caption}        % better caption spacing
%\begin{document}

%-------------------------------

\begin{table}[h]
    \caption{A summary of the proposed modeling architecture with a doubling-halving structure.}
    \label{summary}
    \centering
    \footnotesize
    \begin{threeparttable}
    \begin{tabular}{@{}l p{4.2cm} c p{6.0cm}@{}}
        \toprule
        \textbf{Layer} & \textbf{Description} & \textbf{Eq #s} & \textbf{Operations and output shape} \\
        \midrule
        Input & $F$ time series of length $T$ from ``batch size'' of participants & -- & Array $x$ of size $(\text{batch size}, F, T)$ \\
        \midrule
        \multicolumn{4}{c}{\textbf{Feature-wise Scattering Transform}} \\
        Scattering1D & Applied to each feature independently & Eqs \ref{level0}---\ref{level2} & $S_J[.]x[.]$; $(\text{batch size}, F, S, T')$ \\
        ReLU & Activation function & -- & $\sigma(S_J[.]x[.])$; $(\text{batch size}, F, S, T')$ \\
        Concatenation & Concatenates feature-wise outputs & -- &  Reshape $\sigma(S_J[.]x[.])$ \rightarrow (\text{batch size}, F \times S, T')$ \\
        \midrule
        \multicolumn{4}{c}{\textbf{Feature Extraction}} \\
        Flatten & Converts to a dense representation & -- & $x_{MLP}$; $(\text{batch size}, F \times S \times T')$ \\
        \midrule
        \multicolumn{4}{c}{\textbf{Fully Connected Layers}} \\
        Dense + ReLU & First dense layer ($H$) & Eq. \ref{layer1} & $a^{[1]}$;  $(\text{batch size}, H^{[1]}=D)$ \\
        Dropout & Dropout regularization & -- & --; $(\text{batch size}, H^{[1]} = D)$ \\
        \midrule
        \multicolumn{4}{c}{\textbf{Hidden Layers (Doubling Phase)}} \\
        Dense + ReLU & Hidden layer 2 & -- & $a^{[2]}$; (\text{batch size}, H^{[2]})$ \\
        Dropout & Regularization & -- & --; $(\text{batch size}, H^{[2]})$ \\
        Dense + ReLU & Hidden layer 3 & -- & $a^{[3]}$; $(\text{batch size}, 2H^{[2]}) \\
        Dropout & Regularization & -- & --; $(\text{batch size}, 2H^{[2]}) \\
        \midrule
        \multicolumn{4}{c}{\textbf{Hidden Layers (Halving Phase)}} \\
        Dense + ReLU & Hidden layer 4 & -- & $a^{[4]}$; (\text{batch size}, H^{[2]})$ \\
        Dropout & Regularization & -- & --; $(\text{batch size}, H^{[2]})$ \\
        Dense + ReLU & Hidden layer 5 & -- & $a^{[5]}$; $(\text{batch size}, \frac{H^{[2]}}{2})$ \\
        Dropout & Regularization & -- & --; $(\text{batch size}, \frac{H^{[2]}}{2}))$ \\
        \midrule
        Dense & Final dense layer (flattened output) & Eq. \ref{outlayer} & $\hat{y}$; (\text{batch size}, T \times D)$ \\
        Reshape & Converts to final shape & -- & $(\text{batch size}, T \times D) \rightarrow (\text{batch size}, T, D)$ \\
        \bottomrule
    \end{tabular}
    \begin{tablenotes}
        \item $F$ = Number of input features (time series); $T$ = Time series length; batch size = Number of independent samples processed in one forward/backward pass, set to $N$ (participants in the training set);
        $S$ = Number of scattering coefficients per feature; $T'$ = Time steps after scattering;
        $H$ = Hidden dimension of first dense layer; $D$ = Output dimension; $\hat{Y}$ = final predicted output.
    \item Note: Layers with no specially designated notion for the output are marked with output `--'. 
    \item Five layers are shown here for illustration purposes, but the number of layers is generally a tunable integer greater than or equal to 3 under the doubling-halving structure (a first fully connected layer, followed by a layer with tunable number of neurons, and a final output layer); and 2 (a first fully connected layer and the output layer) under the partial confirmatory approach.
    \end{tablenotes}
    \end{threeparttable}
\end{table}

%\end{document}