From 99a963bb1799c87c3bbb8fc2ac04d003057d4db7 Mon Sep 17 00:00:00 2001 From: Alex Blank <38751347+blankinator@users.noreply.github.com> Date: Fri, 21 Mar 2025 11:57:00 +0100 Subject: [PATCH] started methodology --- main.bib | 35 ++++++++++++++++++++++++ thesis/sections/background.tex | 20 +++++++++++--- thesis/sections/methodology.tex | 47 ++++++++++++++++++++++++++++++++- 3 files changed, 98 insertions(+), 4 deletions(-) diff --git a/main.bib b/main.bib index ec36d7f..30d38e2 100644 --- a/main.bib +++ b/main.bib @@ -1304,6 +1304,7 @@ For additional {GBD} results and resources, visit the {GBD} 2019 Data Resources urldate = {2025-03-07}, date = {1992-05}, langid = {english}, + file = {PDF:/home/alex/Zotero/storage/JWE75VL3/Münster et al. - 1992 - Length and variation in the menstrual cycle—a cross‐sectional study from a Danish county.pdf:application/pdf}, } @online{pedroso_menstrual_2022, @@ -1369,3 +1370,37 @@ For additional {GBD} results and resources, visit the {GBD} 2019 Data Resources keywords = {Data processing, R (Computer program language), Time-series analysis}, file = {PDF:/home/alex/Zotero/storage/CIYMBUEW/Cryer and Chan - 2008 - Time series analysis with applications in R.pdf:application/pdf}, } + +@article{rosenfield_adolescent_2013, + title = {Adolescent Anovulation: Maturational Mechanisms and Implications}, + volume = {98}, + issn = {0021-972X, 1945-7197}, + url = {https://academic.oup.com/jcem/article-lookup/doi/10.1210/jc.2013-1770}, + doi = {10.1210/jc.2013-1770}, + shorttitle = {Adolescent Anovulation}, + pages = {3572--3583}, + number = {9}, + journaltitle = {The Journal of Clinical Endocrinology \& Metabolism}, + author = {Rosenfield, Robert L.}, + urldate = {2025-03-17}, + date = {2013-09}, + langid = {english}, + file = {PDF:/home/alex/Zotero/storage/BEF7PQT6/Rosenfield - 2013 - Adolescent Anovulation Maturational Mechanisms and Implications.pdf:application/pdf}, +} + +@article{murray_diagnosis_2005, + title = {Diagnosis and treatment of ectopic pregnancy}, + volume = {173}, + issn = {0820-3946, 1488-2329}, + url = {http://www.cmaj.ca/cgi/doi/10.1503/cmaj.050222}, + doi = {10.1503/cmaj.050222}, + abstract = {{ECTOPIC} {PREGNANCY} {IS} A {LIFE}- {AND} {FERTILITY}-threatening condition that is commonly seen in Canadian emergency departments. Increases in the availability and use of hormonal markers, coupled with advances in formal and emergency ultrasonography have changed the diagnostic approach to the patient in the emergency department with first-trimester bleeding or pain. Ultrasonography should be the initial investigation for symptomatic women in their first trimester; when the results are indeterminate, the serum β human chorionic gonadotropin (β-{hCG}) concentration should be measured. Serial measurement of β-{hCG} and progesterone concentrations may be useful when the diagnosis remains unclear. Advances in surgical and medical therapy for ectopic pregnancy have allowed the proliferation of minimally invasive or noninvasive treatment. Guidelines for laparoscopy and for methotrexate therapy are provided.}, + pages = {905--912}, + number = {8}, + journaltitle = {Canadian Medical Association Journal}, + author = {Murray, H.}, + urldate = {2025-03-17}, + date = {2005-10-11}, + langid = {english}, + file = {PDF:/home/alex/Zotero/storage/Y73KE57K/Murray - 2005 - Diagnosis and treatment of ectopic pregnancy.pdf:application/pdf}, +} diff --git a/thesis/sections/background.tex b/thesis/sections/background.tex index 126152f..5b6d867 100644 --- a/thesis/sections/background.tex +++ b/thesis/sections/background.tex @@ -41,11 +41,24 @@ throughout the menstrual cycle. \begin{figure} \centering - \includegraphics[width=0.7\textwidth]{background_menstrual_cycle_physiology} + \includegraphics[width=0.6\textwidth]{background_menstrual_cycle_physiology} \caption{Physiological changes during the menstrual cycle\cite{pedroso_menstrual_2022}.} \label{fig:background_menstrual_cycle_physiology} \end{figure} +Not every cycle results in ovulation—a phenomenon known as anovulation—which leads to a monophasic temperature pattern. +Anovulation can have various causes, including hormonal imbalances, stress, or underlying health conditions\cite{rosenfield_adolescent_2013}. + +Anovulation is reflected in temperature data as either an absence of a clear temperature rise or a rise +that is insufficient in magnitude or duration to be considered a reliable indicator of ovulation. +Distinguishing between ovulatory and anovulatory cycles is challenging, as the only definitive confirmation of +successful ovulation in a clinical sense is a positive pregnancy test. +Even ultrasound imaging can only confirm that an egg was released from its follicle—not whether it was fertilized or successfully implanted. + +%TODO: find source for this + +%TODO: show plot of different cycle types + \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. @@ -56,7 +69,7 @@ as illustrated in Figure~\ref{fig:background_pregnancy_chance}. \begin{figure} \centering - \includegraphics[width=0.8\textwidth]{background_pregnancy_chance_over_time} + \includegraphics[width=0.7\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} @@ -93,4 +106,5 @@ 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. \ No newline at end of file +Time series analysis encompasses various methods, ranging from simple statistical models to complex deep learning architectures. +Classical methods \ No newline at end of file diff --git a/thesis/sections/methodology.tex b/thesis/sections/methodology.tex index bce8b40..7ac257d 100644 --- a/thesis/sections/methodology.tex +++ b/thesis/sections/methodology.tex @@ -5,4 +5,49 @@ % 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 \ No newline at end of file +% 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}