hopefully final commit

This commit is contained in:
Alex Blank
2025-09-05 20:02:41 +00:00
parent a2fdf2f0a3
commit bf2e79cc4c
15 changed files with 709 additions and 449 deletions
+25 -16
View File
@@ -28,12 +28,12 @@ as they typically indicate erroneous entries, pregnancies, sensor failures, or d
In addition, incomplete cycles are filtered out, since new cycles continuously arrive from active users
and may not contain the full sequence of data required for retrospective labeling.
Temperature values outside the physiologically plausible rangebelow 35\textdegree C or above 43\textdegree C—are also excluded,
as they typically result from sensor malfunction or transmission errors.
Temperature values outside the physiologically plausible range, below 35\textdegree C or above 43\textdegree C,
are also excluded, as they typically result from sensor malfunction or transmission errors.
\subsubsection{Data Labeling}\label{subsubsec:data_labeling}
Supervised machine learning requires labeled datai.e., known target values for each input.
Supervised machine learning requires labeled data, i.e., known target values for each input.
In the context of this study, the relevant target is the ovulation day within each menstrual cycle.
The dataset contains over 40{,}000 cycles, making manual annotation unfeasible.
@@ -65,9 +65,9 @@ The next section details how these labels are incorporated into feature represen
The features used as model inputs have been divided into three categories:
\begin{itemize}
\item \textbf{Static features} - Characteristics, that remain constant across a user's cycle, such as age, height, or average ovulation day
\item \textbf{Known features} Inputs known a priori at each time step, such as time of day or calendar-based variables (e.g., month of the year).
\item \textbf{Observable features} Inputs available at the current time step, including raw and derived temperature values (e.g, rolling averages).
\item \textbf{Static features:} Characteristics, that remain constant across a user's cycle, such as age, height, or average ovulation day
\item \textbf{Known features:} Inputs known a priori at each time step, such as time of day or calendar-based variables (e.g., month of the year).
\item \textbf{Observable features:} Inputs available at the current time step, including raw and derived temperature values (e.g, rolling averages).
\end{itemize}
The target variables predicted by the model—like ovulation status or fertility probability—are described separately.
@@ -208,6 +208,12 @@ Together, the two outputs offer complementary information and improve interpreta
As discussed in Section~\ref{sec:discussion}, all predictions are subject to further interpretation before presentation in the product interface.
The model outputs represent data-driven estimates and do not constitute medical advice or diagnostic statements.
Although the models were trained to predict both targets, and fertility-probability as well as the ovulation-over indicator
are relevant for actual application of the models, the primary focus of this thesis lies on the fertility-probability target,
which is more central to the research objectives.
The ovulation-over indicator is included due to its practical relevance for potential real-world applications,
but it is not analyzed in depth, as it lies outsize the core scope of scientific investigation.
\begin{table}[htbp]
\centering
\begin{tabular}{@{}lp{0.62\linewidth}@{}}
@@ -355,7 +361,7 @@ Additionally, we'll show, how the convolutional hybrids extend their functionali
\label{fig:methodology_lstm_architecture}
\end{figure}
Recurrent neural networks, particularly GRUs and LSTMs, were tested for their ability to model long-term dependencies in the time series.
Recurrent neural networks, particularly LSTMs, were tested for their ability to model long-term dependencies in the time series.
Their sequential memory structure allows them to retain information across cycle days, but they may struggle with high-resolution input and longer sequences.
LSTMs, in particular, have a long history of strong performance in sequence prediction tasks.
For this study, a stack of LSTM layers was followed by a linear projection layer, mapping the hidden state at the final time
@@ -779,7 +785,7 @@ enabling comparability between models and providing interpretable performance me
\paragraph{Contraception Use-Case:}
For evaluating contraceptive effectiveness, we developed an algorithm inspired by the classical \emph{Pearl Index},
initially proposed by~\citeauthor{pearl_factors_1933} in~\citeyear{pearl_factors_1933}\cite{pearl_factors_1933}.
initially proposed by~\citeauthor{pearl_factors_1933} in~\citeyear{pearl_factors_1933}~\cite{pearl_factors_1933}.
\begin{figure}[htbp]
\centering
@@ -796,16 +802,14 @@ A day-specific probability of intercourse is computed for each user based on age
We assume, that the users don't have any health-related or non-health-related issues affecting fertility.
If a user's age is unknown, it is randomly drawn from the overall dataset distribution.
Only users with at least one continuous year of data are included.
To get a representative result, we use 500 randomly selected user years.
To get a representative result, we use 100 randomly selected user years.
Each day of data for a full year we count the following states by the algorithm:
\begin{itemize}
\item \emph{Sex}: Intercourse occurred.
\item \emph{No Sex}: no intercourse occurred.
\item \emph{Pregnancy}: fertility prediction allowed intercourse during a potentially fertile period, and it led to a pregnancy.
\item \emph{Correct Denial}: fertility prediction correctly indicated abstinence during a fertile period.
\item \emph{Incorrect Denial}: fertility prediction incorrectly indicated abstinence during an infertile period.
\item \emph{Pregnancy}: fertility prediction allowed intercourse during a potentially fertile period, and it led to a pregnancy.
\item \emph{No Pregnancy}: fertility prediction allowed intercourse during an infertile or potentially fertile period, but it did not lead to a pregnancy.
\end{itemize}
This categorization captures both the contraceptive accuracy (avoiding pregnancy) and the practicality
@@ -813,6 +817,10 @@ This categorization captures both the contraceptive accuracy (avoiding pregnancy
An algorithm achieving perfect contraceptive accuracy by always recommending abstinence would score highly but
significantly limit user acceptability and utility.
To add a control group, we compute the potential pregnancies and number of sexual intercourse without using the models predictions,
i.e., the group does not use any contraception.
In this case, sexual intercourse can happen unrestricted on every day.
\paragraph{Pregnancy Use-Case:}
For the pregnancy use-case, we developed a complementary algorithm to evaluate model performance for users attempting to conceive.
@@ -834,21 +842,22 @@ we assume an average frequency of six times per month.
We assume no health-related fertility impairments for comparative simplicity,
though we acknowledge that real-world fertility is influenced by numerous complex factors.
Similar to the contraception scenario, only users with at least one continuous year of data are considered.
For representative results, we use 500 randomly selected user years.
For representative results, we use 100 randomly selected user years.
For each day in a full year we count occurrences of the following states:
\begin{itemize}
\item \emph{Sex}: Intercourse occurred
\item \emph{No Sex}: No intercourse
\item \emph{Pregnancy}: Correct fertile prediction, intercourse occurred, resulting in pregnancy.
\item \emph{No Pregnancy}: Correct fertile prediction, intercourse occurred, but no pregnancy occurred.
\item \emph{Incorrect Deferral}: Incorrect non-fertile prediction, actual fertility was above threshold.
\item \emph{Correct Deferral}: Correct non-fertile prediction.
\item \emph{Incorrect Deferral}: Incorrect non-fertile prediction, actual fertility was above threshold.
\end{itemize}
This classification measures both fertility prediction accuracy and the impact of incorrect deferrals.
A model overly predicting fertility would increase potential pregnancy rates but negatively affect usability and trust due to misdirected efforts.
For the pregnancy case, we also compute a control group.
Here, every day is considered potentially fertile and thus allows for intercourse.
\subsection{Ethical Considerations}\label{subsec:ethical_considerations}
This study was conducted using pseudonymized data collected in accordance with the terms of service and privacy policy of the data provider, VivoSensMedical GmbH (Leipzig, Germany).