Skip to content

Commit

Permalink
Merge pull request #223 from chhoumann/table-caption-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivikhostrup authored Jun 12, 2024
2 parents 4689a36 + 9c39fe4 commit e8187a2
Show file tree
Hide file tree
Showing 22 changed files with 33 additions and 31 deletions.
2 changes: 1 addition & 1 deletion baseline/experiment_analysis/experiment_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2380,8 +2380,8 @@
" with open(path, \"w\") as file:\n",
" file.write(\"\\\\begin{table}[!htb]\\n\")\n",
" file.write(\"\\\\centering\\n\")\n",
" file.write(\"\\\\caption{Overview of model types for \\\\ce{\" + oxide_name + \"} oxide}.\\n\")\n",
" file.write(latex_table)\n",
" file.write(\"\\\\caption{Overview of model types for \\\\ce{\" + oxide_name + \"} oxide}\\n\")\n",
" file.write(\"\\\\label{tab:\" + oxide + \"_overview}\\n\")\n",
" file.write(\"\\\\end{table}\\n\")\n"
]
Expand Down
8 changes: 4 additions & 4 deletions report_thesis/src/sections/appendix/index.tex
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ \subsection{Cross-Validation Fold Plots for Major Oxides}\label{subsec:cv_plots}
\subsection{Initial Experiment: Model Hyperparameters}\label{subsec:initial_experiment_hyperparameters}
\begin{table}[!htb]
\centering
\caption{Explictly set hyperparameters for the \gls{pls}, \gls{svr}, ridge, \gls{lasso}, \gls{enet}, \gls{rf}, and \gls{etr} models. When not explicitly set, the default hyperparameters provided by the libraries listed in Section~\ref{sec:experimental_setup} are used.}
\begin{tabular}{@{}llp{0.5\textwidth}@{}}
\toprule
\textbf{Model} & \textbf{Hyperparameter} & \textbf{Value} \\
Expand Down Expand Up @@ -102,14 +103,14 @@ \subsection{Initial Experiment: Model Hyperparameters}\label{subsec:initial_expe
& \texttt{random\_state} & 42 \\
\midrule
\end{tabular}
\caption{Explictly set hyperparameters for the \gls{pls}, \gls{svr}, ridge, \gls{lasso}, \gls{enet}, \gls{rf}, and \gls{etr} models. When not explicitly set, the default hyperparameters provided by the libraries listed in Section~\ref{sec:experimental_setup} are used.}
\label{tab:combined_hyperparameters}
\end{table}

\FloatBarrier

\begin{table}[!htb]
\centering
\caption{Explictly set hyperparameters for the \gls{gbr} and \gls{xgboost} models. When not explicitly set, the default hyperparameters provided by the libraries listed in Section~\ref{sec:experimental_setup} are used. The \gls{ngboost} model does not have any explicitly set hyperparameters.}
\begin{tabular}{@{}llp{0.5\textwidth}@{}}
\toprule
\textbf{Model} & \textbf{Hyperparameter} & \textbf{Value} \\
Expand Down Expand Up @@ -149,7 +150,6 @@ \subsection{Initial Experiment: Model Hyperparameters}\label{subsec:initial_expe
& \texttt{eval\_metric} & rmse \\
\bottomrule
\end{tabular}
\caption{Explictly set hyperparameters for the \gls{gbr} and \gls{xgboost} models. When not explicitly set, the default hyperparameters provided by the libraries listed in Section~\ref{sec:experimental_setup} are used. The \gls{ngboost} model does not have any explicitly set hyperparameters.}
\label{tab:combined_hyperparameters}
\end{table}

Expand All @@ -173,14 +173,15 @@ \subsection{Initial Experiment: Model Hyperparameters}\label{subsec:initial_expe
\multicolumn{3}{l}{\textbf{Learning Rate:} 0.001} \\
\bottomrule
\end{tabular}
\caption{Summary of the Neural Network Architecture}
\caption{Summary of the \gls{ann} architecture.}
\label{tab:nn_architecture}
\end{table}

\FloatBarrier

\begin{table}[!htb]
\centering
\caption{Summary of the \gls{cnn} architecture.}
\begin{tabular}{lll}
\toprule
\textbf{Layer} & \textbf{Output Shape} & \textbf{Hyperparameter} \\ \midrule
Expand Down Expand Up @@ -211,7 +212,6 @@ \subsection{Initial Experiment: Model Hyperparameters}\label{subsec:initial_expe
\multicolumn{3}{l}{\textbf{Learning Rate:} 0.001} \\
\bottomrule
\end{tabular}
\caption{Summary of the Convolutional Neural Network Architecture}
\label{tab:cnn_architecture}
\end{table}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
\begin{table}[!htb]
\centering
\caption{Overview of model types for \ce{Al2O3} oxide.}
\begin{tabular}{llllllll}
\toprule
\ce{Al2O3} & Model Type & Transformer Type & PCA Type & Scaler Type & \gls{rmsecv} & Std. dev. CV & \gls{rmsep} \\
Expand All @@ -16,6 +17,5 @@
& \texttt{random\_forest} & \texttt{power\_transformer} & \texttt{none} & \texttt{max\_abs\_scaler} & 2.302 & 2.295 & 2.111 \\
\bottomrule
\end{tabular}
\caption{Overview of model types for \ce{Al2O3} oxide}
\label{tab:Al2O3_overview}
\end{table}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
\begin{table}[!htb]
\centering
\caption{Overview of model types for \ce{CaO} oxide.}
\begin{tabular}{llllllll}
\toprule
\ce{CaO} & Model Type & Transformer Type & PCA Type & Scaler Type & \gls{rmsecv} & Std. dev. CV & \gls{rmsep} \\
Expand All @@ -16,6 +17,5 @@
& \texttt{lasso} & \texttt{power\_transformer} & \texttt{none} & \texttt{min\_max\_scaler} & 1.529 & 1.514 & 1.684 \\
\bottomrule
\end{tabular}
\caption{Overview of model types for \ce{CaO} oxide}
\label{tab:CaO_overview}
\end{table}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
\begin{table}[!htb]
\centering
\caption{Overview of model types for \ce{FeO_T} oxide.}
\begin{tabular}{llllllll}
\toprule
\ce{FeO_T} & Model Type & Transformer Type & PCA Type & Scaler Type & \gls{rmsecv} & Std. dev. CV & \gls{rmsep} \\
Expand All @@ -16,6 +17,5 @@
& \texttt{random\_forest} & \texttt{quantile\_transformer} & \texttt{none} & \texttt{norm3\_scaler} & 3.079 & 3.044 & 2.018 \\
\bottomrule
\end{tabular}
\caption{Overview of model types for \ce{FeO_T} oxide}
\label{tab:FeOT_overview}
\end{table}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
\begin{table}[!htb]
\centering
\caption{Overview of model types for \ce{K2O} oxide.}
\begin{tabular}{llllllll}
\toprule
\ce{K2O} & Model Type & Transformer Type & PCA Type & Scaler Type & \gls{rmsecv} & Std. dev. CV & \gls{rmsep} \\
Expand All @@ -16,6 +17,5 @@
& \texttt{extra\_trees} & \texttt{power\_transformer} & \texttt{none} & \texttt{robust\_scaler} & 0.714 & 0.709 & 0.464 \\
\bottomrule
\end{tabular}
\caption{Overview of model types for \ce{K2O} oxide}
\label{tab:K2O_overview}
\end{table}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
\begin{table}[!htb]
\centering
\caption{Overview of model types for \ce{MgO} oxide.}
\begin{tabular}{llllllll}
\toprule
\ce{MgO} & Model Type & Transformer Type & PCA Type & Scaler Type & \gls{rmsecv} & Std. dev. CV & \gls{rmsep} \\
Expand All @@ -16,6 +17,5 @@
& \texttt{random\_forest} & \texttt{quantile\_transformer} & \texttt{none} & \texttt{norm3\_scaler} & 1.640 & 1.630 & 0.973 \\
\bottomrule
\end{tabular}
\caption{Overview of model types for \ce{MgO} oxide}
\label{tab:MgO_overview}
\end{table}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
\begin{table}[!htb]
\centering
\caption{Overview of model types for \ce{Na2O} oxide.}
\begin{tabular}{llllllll}
\toprule
\ce{Na2O} & Model Type & Transformer Type & PCA Type & Scaler Type & \gls{rmsecv} & Std. dev. CV & \gls{rmsep} \\
Expand All @@ -16,6 +17,5 @@
& \texttt{ridge} & \texttt{quantile\_transformer} & \texttt{none} & \texttt{norm3\_scaler} & 1.011 & 1.001 & 0.467 \\
\bottomrule
\end{tabular}
\caption{Overview of model types for \ce{Na2O} oxide}
\label{tab:Na2O_overview}
\end{table}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
\begin{table}[!htb]
\centering
\caption{Overview of model types for \ce{SiO2} oxide.}
\begin{tabular}{llllllll}
\toprule
\ce{SiO2} & Model Type & Transformer Type & PCA Type & Scaler Type & \gls{rmsecv} & Std. dev. CV & \gls{rmsep} \\
Expand All @@ -16,6 +17,5 @@
& \texttt{random\_forest} & \texttt{none} & \texttt{none} & \texttt{norm3\_scaler} & 5.204 & 5.192 & 3.788 \\
\bottomrule
\end{tabular}
\caption{Overview of model types for \ce{SiO2} oxide}
\label{tab:SiO2_overview}
\end{table}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
\begin{table}[!htb]
\centering
\caption{Overview of model types for \ce{TiO2} oxide.}
\begin{tabular}{llllllll}
\toprule
\ce{TiO2} & Model Type & Transformer Type & PCA Type & Scaler Type & \gls{rmsecv} & Std. dev. CV & \gls{rmsep} \\
Expand All @@ -16,6 +17,5 @@
& \texttt{pls} & \texttt{power\_transformer} & \texttt{kernel\_pca} & \texttt{robust\_scaler} & 0.441 & 0.441 & 0.411 \\
\bottomrule
\end{tabular}
\caption{Overview of model types for \ce{TiO2} oxide}
\label{tab:TiO2_overview}
\end{table}
2 changes: 1 addition & 1 deletion report_thesis/src/sections/background/data_overview.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ \subsection{Data Overview}\label{sec:data-overview}

\begin{table*}
\centering
\caption{Example of CCS data for a single location (from \citet{p9_paper}).}
\begin{tabular}{llllllll}
\toprule
wave & shot1 & shot2 & $\cdots$ & shot49 & shot50 & median & mean \\
Expand All @@ -16,7 +17,6 @@ \subsection{Data Overview}\label{sec:data-overview}
905.57349 & 1.9864713e+10 & 1.2956832e+10 & $\cdots$ & 1.9785415e+10 & 7.1994239e+09 & 1.1311150e+10 & 1.2201224e+10 \\
\bottomrule
\end{tabular}
\caption{Example of CCS data for a single location (from \citet{p9_paper})}
\label{tab:ccs_data_example}
\end{table*}

Expand Down
2 changes: 1 addition & 1 deletion report_thesis/src/sections/baseline_replica.tex
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ \section{Baseline \& Replica}\label{sec:baseline_replica}

\begin{table*}
\centering
\caption{\gls{rmse}s of the original and our replicas of the \gls{pls1-sm}, \gls{ica}, and \gls{moc} models.}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}lllllll}
\toprule
Element & \gls{pls1-sm} (original) & PLS1-SM (replica) & \gls{ica} (original) & ICA (replica) & \gls{moc} (original) & \gls{moc} (replica) \\
Expand All @@ -76,7 +77,6 @@ \section{Baseline \& Replica}\label{sec:baseline_replica}
\ce{K2O} & 0.72 & 0.72 & 0.98 & 1.38 & 0.82 & 1.91 \\
\bottomrule
\end{tabular*}
\caption{\gls{rmse}s of the original and our replicas of the \gls{pls1-sm}, \gls{ica}, and \gls{moc} models.}
\label{tab:replica_results_rmses}
\end{table*}

Expand Down
4 changes: 2 additions & 2 deletions report_thesis/src/sections/experiments/data_preparation.tex
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ \subsection{Data Preparation}\label{sec:data-preparation}

\begin{table*}
\centering
\caption{Excerpt from the composition dataset (from \citet{p9_paper}).}
\begin{tabular}{lllllllllllll}
\toprule
Target & Spectrum Name & Sample Name & \ce{SiO2} & \ce{TiO2} & \ce{Al2O3} & \ce{FeO_T} & \ce{MnO} & \ce{MgO} & \ce{CaO} & \ce{Na2O} & \ce{K2O} & \ce{MOC total} \\
Expand All @@ -38,7 +39,6 @@ \subsection{Data Preparation}\label{sec:data-preparation}
TB2 & --- & --- & 60.4 & 0.93 & 20.5 & 11.6536 & 0.047 & 1.86 & 0.2 & 1.29 & 3.86 & 100.7406 \\
\bottomrule
\end{tabular}
\caption{Excerpt from the composition dataset (from \citet{p9_paper})}
\label{tab:composition_data_example}
\end{table*}

Expand All @@ -48,6 +48,7 @@ \subsection{Data Preparation}\label{sec:data-preparation}

\begin{table*}
\centering
\caption{Excerpt from the final dataset (values have been rounded to two decimal places for brevity).}
\footnotesize
\begin{tabular}{llllllllllllllllllllll}
\toprule
Expand All @@ -66,6 +67,5 @@ \subsection{Data Preparation}\label{sec:data-preparation}
$\vdots$ & $\cdots$ & $\vdots$ & $\vdots$ & $\cdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ \\
\midrule
\end{tabular}
\caption{Excerpt from the final dataset (values have been rounded to two decimal places for brevity).}
\label{tab:final_dataset_example}
\end{table*}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
\gls{pls} & 4 \\
\gls{gbr} & 3 \\
\gls{ngboost} & 2 \\
\hline
\end{tabular}
\label{tab:best_model_occurrences}
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
$\ce{CaO}$ & 1.626 (\gls{svr}) & 1.467 (\gls{xgboost}) & 1.594 (\gls{svr}) & 1.457 (\gls{xgboost}) \\
$\ce{Na2O}$ & 0.387 (\gls{xgboost}) & 0.908 (\gls{pls}) & 0.387 (\gls{xgboost}) & 0.906 (\gls{pls}) \\
$\ce{K2O}$ & 0.524 (\gls{rf}) & 0.609 (\gls{gbr}) & 0.476 (\gls{rf}) & 0.610 (\gls{gbr}) \\
\hline
\end{tabular}%
\label{tab:best_results}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
\begin{table*}[]
\centering
\caption{Initial results for the different models and metrics.}
\resizebox{1\textwidth}{!}{%
\begin{tabular}{l|cccc|cccc|cccc}
Model & \multicolumn{4}{c}{Ridge} & \multicolumn{4}{c}{\gls{lasso}} & \multicolumn{4}{c}{\gls{enet}} \\
Expand Down Expand Up @@ -60,6 +61,5 @@
\hline
\end{tabular}%
}
\caption{Initial results for the different models and metrics.}
\label{tab:init_results}
\end{table*}
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ \subsection{Initial Results}
\end{figure*}

\begin{table}
\caption{Relative performance of each model compared to the best performing model, measured by normalized RMSECV and multiplied by 100 for percentage. A higher percentage indicates worse performance. The 'Diff. vs Prev.' column shows the difference in performance compared to the next best model, measured in percentage points.}
\begin{tabular}{lrr}
\toprule
Model & Relative Performance (\%) & Diff. vs Prev. \\
Expand All @@ -64,7 +65,6 @@ \subsection{Initial Results}
CNN & 143.18 & 15.36 \\
\bottomrule
\end{tabular}
\caption{Relative performance of each model compared to the best performing model, measured by normalized RMSECV and multiplied by 100 for percentage. A higher percentage indicates worse performance. The 'Diff. vs Prev.' column shows the difference in performance compared to the next best model, measured in percentage points.}
\label{tab:relative_performance}
\end{table}

Expand All @@ -74,15 +74,15 @@ \subsection{Initial Results}
\centering
\begin{minipage}{.7\textwidth}
\centering
\input{sections/experiments/inital_experiments/best_results_table.tex}
\caption{Lowest metric and corresponding model for each oxide.}
\input{sections/experiments/inital_experiments/best_results_table.tex}
\label{tab:best_results}
\end{minipage}%
\hspace{0.03\textwidth}
\begin{minipage}{.25\textwidth}
\centering
\input{sections/experiments/inital_experiments/best_model_occurrences_table.tex}
\caption{Occurrences of the best model for each oxide.}
\input{sections/experiments/inital_experiments/best_model_occurrences_table.tex}
\label{tab:best_model_occurrences}
\end{minipage}
\end{table*}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
\begin{table*}
\centering
\caption{Optuna preprocessing configuration ranges.}
\begin{tabular}{@{}l>{\ttfamily}lp{0.5\textwidth}@{}}
\toprule
\textbf{Model} & \textbf{Parameter} & \textbf{Range} \\ \midrule
Expand All @@ -22,13 +23,13 @@
MaxAbsScaler & - & - \\ \midrule
Norm3Scaler & - & - \\ \midrule
\end{tabular}
\caption{Optuna preprocessing configuration ranges.}
\label{tab:optuna_preprocessing_configurations}
\end{table*}


\begin{table*}
\centering
\caption{Optuna model configuration ranges.}
\begin{tabular}{@{}l>{\ttfamily}lp{0.5\textwidth}@{}}
\toprule
\textbf{Model} & \textbf{Parameter} & \textbf{Range} \\ \midrule
Expand Down Expand Up @@ -76,6 +77,5 @@
& min\_samples\_leaf & 1 - 10 \\ \cmidrule{2-3}
& max\_features & \{sqrt, log2\} \\ \bottomrule
\end{tabular}
\caption{Optuna model configuration ranges.}
\label{tab:optuna_model_configurations}
\end{table*}
6 changes: 3 additions & 3 deletions report_thesis/src/sections/experiments/stacking_ensemble.tex
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ \subsubsection{Results}\label{subsec:stacking_ensemble_results}

\begin{table}
\centering
\caption{Stacking ensemble results using the \gls{enet} model as the meta-learner with default hyperparameters.}
\begin{tabular}{lcccc}
\toprule
Oxide & \gls{rmsep} & STDDEV & \gls{rmsecv} & Std. Dev. CV \\
Expand All @@ -94,11 +95,11 @@ \subsubsection{Results}\label{subsec:stacking_ensemble_results}
\bottomrule
\end{tabular}
\label{tab:stacking_ensemble_results_enet}
\caption{Stacking ensemble results using the \gls{enet} model as the meta-learner with default hyperparameters.}
\end{table}

\begin{table}
\centering
\caption{Stacking ensemble results using the \gls{enet} model as the meta-learner with $\alpha = 0.1$.}
\begin{tabular}{lcccc}
\toprule
Oxide & \gls{rmsep} & STDDEV & \gls{rmsecv} & Std. Dev. CV \\
Expand All @@ -114,11 +115,11 @@ \subsubsection{Results}\label{subsec:stacking_ensemble_results}
\bottomrule
\end{tabular}
\label{tab:stacking_ensemble_results_enet_01}
\caption{Stacking ensemble results using the \gls{enet} model as the meta-learner with $\alpha = 0.1$.}
\end{table}

\begin{table}
\centering
\caption{Stacking ensemble results using the \gls{svr} model as the meta-learner with default hyperparameters.}
\begin{tabular}{lcccc}
\toprule
Oxide & \gls{rmsep} & STDDEV & \gls{rmsecv} & Std. Dev. CV \\
Expand All @@ -134,7 +135,6 @@ \subsubsection{Results}\label{subsec:stacking_ensemble_results}
\bottomrule
\end{tabular}
\label{tab:stacking_ensemble_results_svr}
\caption{Stacking ensemble results using the \gls{svr} model as the meta-learner with default hyperparameters.}
\end{table}

\begin{figure*}
Expand Down
2 changes: 1 addition & 1 deletion report_thesis/src/sections/introduction.tex
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ \section{Introduction}\label{sec:introduction}

\begin{table}
\centering
\caption{Table of terminology.}
\begin{tabularx}{\columnwidth}{lX} % l for left, X for the cell that should be wrapped
\toprule
Term & Definition \\
Expand All @@ -65,6 +66,5 @@ \section{Introduction}\label{sec:introduction}
Extreme Concentration Values & The concentration values of oxides in the targets that are significantly higher or lower than the majority of the data. \\
\bottomrule
\end{tabularx}
\caption{Table of Terms}
\label{tab:terms}
\end{table}
Loading

0 comments on commit e8187a2

Please sign in to comment.