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


\section{Background}\label{sec:background}

\subsection{Physiological Background}\label{subsec:physiological_background}
\subsubsection{Menstrual Cycle}\label{subsec:menstrual_cycle}
The menstrual cycle describes the physiological changes in the female body that prepare it for pregnancy.
It is divided into two phases: the \textbf{follicular phase} and the \textbf{luteal phase}.
\\
During the follicular phase, the ovarian follicles mature, and the endometrium (the inner lining of the uterus) thickens
in preparation for a potential implantation of a fertilized egg.
Around day 14 of a typical cycle, ovulation occurs, marking the transition to the luteal phase.
Ovulation refers to the rupture of the mature ovarian follicle and the release of an egg cell into the fallopian tube.
Figure\ref{fig:background_basic_female_reproductive_system} illustrates the female reproductive system,
including the ovaries and the fallopian tubes.
\\
\begin{figure}
    \centering
    \includegraphics[width=0.4\textwidth]{background_female_reproductive_organs}
    \caption{The basic female reproductive system\cite{wikimedia_commons_basic_2019}.}
    \label{fig:background_basic_female_reproductive_system}
\end{figure}
Ovulation is triggered by a surge in \textbf{luteinizing hormone (LH)}
and \textbf{follicle-stimulating hormone (FSH)}, following a peak in estradiol levels.
As ovulation occurs, estradiol levels drop, progesterone levels begin to rise and a slight increase in body temperature
(typically around 0.5°C) can be observed.
This marks the beginning of the luteal phase.
\\
During the luteal phase, the endometrium thickens further, creating an optimal environment for embryo implantation.
LH and FSH levels decrease, while progesterone remains elevated to support endometrial maintenance.
If fertilization does not occur, progesterone levels drop, leading to the shedding of the endometrial lining along
with the unfertilized egg.
This process, known as menstruation, marks the beginning of a new cycle.
\\
The menstrual cycle typically lasts around 28 days, with ovulation occurring near the midpoint.
However, variations, particularly in the follicular phase length, are common and can be influenced by factors such as stress, diet, exercise and age\cite{silberstein_physiology_2000}.
Figure~\ref{fig:background_menstrual_cycle_physiology} provides a detailed overview of the hormonal and physiological changes
throughout the menstrual cycle.

\begin{figure}
    \centering
    \includegraphics[width=0.7\textwidth]{background_menstrual_cycle_physiology}
    \caption{Physiological changes during the menstrual cycle\cite{pedroso_menstrual_2022}.}
    \label{fig:background_menstrual_cycle_physiology}
\end{figure}

\subsubsection{Fertility Prediction}\label{subsec:fertility_prediction}
Throughout the menstrual cycle, the chance of fertilization varies significantly.
An egg cell released from the ovary during ovulation, can be fertilized for up to 24 hours.
However, since male sperm cells can survive up to 6 days inside the female reproductive tract,
the fertile window is typically defined as the five days before ovulation until one day after ovulation\cite{dunson_day-specific_1999}.
Research by \citeauthor{dunson_day-specific_1999} has shown that the highest chance of fertilization is around one day before ovulation,
as illustrated in Figure~\ref{fig:background_pregnancy_chance}.

\begin{figure}
    \centering
    \includegraphics[width=0.8\textwidth]{background_pregnancy_chance_over_time}
    \caption{Chance of fertilization depending on the day of the menstrual cycle.
    The highest chance is around one day before ovulation\cite{dunson_day-specific_1999}.}
    \label{fig:background_pregnancy_chance}
\end{figure}

It is important to note that fertility prediction is inherently dependent on ovulation prediction.
Since the probability of conception is tightly linked to ovulation timing, the accuracy of fertility prediction methods
is constrained by the precision of ovulation detection.
This relationship underscores the necessity of developing reliable ovulation prediction models,
as even small inaccuracies can significantly impact fertility assessments.

\subsubsection{Physiological Signs of Ovulation}\label{subsec:physiological_signs}
Several physiological signs correlate with ovulation and can be used for prediction.
As shown in Figure~\ref{fig:background_menstrual_cycle_physiology}, these include hormonal fluctuations (LH and FSH surges) and
changes in body temperature.
Additionally, variations in cervical mucus consistency, salivary ferning patterns,
and electrical resistance of the skin and vaginal mucosa have been observed\cite{silberstein_physiology_2000}.

Among these, ultrasonography provides the most accurate confirmation of ovulation by detecting follicular changes,
but it is costly and requires specialized equipment.
Hormone measurements in urine and blood are widely used and available in at-home test kits,
but they require frequent testing.
Temperature-based methods, particularly body temperature tracking, offer a non-invasive alternative by
detecting the slight temperature rise that follows ovulation.
Advances in wearable technology have further enabled continuous and automated temperature monitoring,
improving accessibility and usability\cite{alexander_fertilitatsmonitoring_2014, luo_detection_2020, yu_tracking_2022}.

\subsection{Technical Background}\label{subsec:technological_background}
\subsubsection{Time Series Analysis}\label{subsubsec:time_series_analysis}
Time series analysis is a fundamental tool for studying sequential data that evolves over time.
Unlike other data types, time series data has an inherent temporal order, where each data point is associated
with a timestamp, capturing its dependence on past values.
There are usually two main goals:
understanding the underlying mechanisms that lead to the observed data and predicting future data points based on the
historical information and potentially external factors\cite{cryer_time_2008}
\\
Time series analysis encompasses various methods, ranging from simple statistical models to complex deep learning architectures.