%! Author = alex
%! Date = 3/6/25

\section{Methodology}\label{sec:methodology}

% why did I select tft over other methods -> include examples of time series and why I belief a complex model could help
% you did I apply it
% implementation details


\subsection{Data Collection \& Preprocessing}\label{subsec:data_collection_preprocessing}
\subsubsection{Data Collection}\label{subsubsec:data_collection}
The dataset used in this work was collected by \textit{VivoSensMedical GmbH}, a medical technology company based in Leipzig, Germany,
specializing in fertility tracking devices and applications.
Each entry in the dataset is derived from temperature measurements recorded by the \textit{OvulaRing} wearable
device\cite{alexander_fertilitatsmonitoring_2014}, which continuously measures core body temperature every 5 minutes.
The sensor is worn intra-vaginally and is designed for extended use, requiring removal only for data synchronization.
This enables high-resolution, long-term temperature tracking, providing a detailed view of menstrual cycle patterns.

% add a few example cycles
% TODO: stats about dataset
The dataset used for training and evaluation consists of 45000 cycles,

In addition to raw temperature values, the dataset includes user-specific metadata, such as health status, weight, and age.
Users can also manually input time-dependent markers, indicating events such as menstruation, ovulation, and intercourse,
which serve as contextual features for the model.
While these additional data points can enhance predictive accuracy, it is important to note that they are self-reported
and may be subject to errors or biases.

\subsubsection{Data Preprocessing}\label{subsubsec:data_preprocessing}
Not all cycles in the dataset can be used for training.
Cycles that are too short are excluded, as they usually do not contain enough information to make reliable predictions.
Additionally, cycles that are too long are also excluded, as they might contain multiple ovulation events or
pregnancies, which would make the prediction task ambiguous.
\subsubsection{Feature Engineering}\label{subsubsec:feature_engineering}

%TODO: show that a model without marker context and one with them is trained, to show the impact of the markers


\subsection{Time-Series Modeling Approach}\label{subsec:time-series_modeling_approach}
\subsubsection{Limitations of Traditional Time-Series Models}\label{subsubsec:limitations_of_traditional_time-series_models}
\subsubsection{Temporal Fusion Transformer}\label{subsubsec:temporal_fusion_transformer}
\subsubsection{Input \& Output Modeling}\label{subsubsec:input_output_modeling}

\subsection{Model Training}\label{subsec:model_training}
\subsubsection{Training Setup}\label{subsubsec:training_setup}
\subsubsection{Hyperparameter Tuning}\label{subsubsec:hyperparameter_tuning}
\subsubsection{Training Details}\label{subsubsec:training_details}

\subsection{Evaluation}\label{subsec:evaluation}
\subsubsection{Evaluation Metrics}\label{subsubsec:evaluation_metrics}
\subsubsection{Baseline Comparisons}\label{subsubsec:baseline_comparisons}
\subsubsection{Explainability \& Interpretability}\label{subsubsec:explainability_interpretability}
