Due date: Nov 24
The goal of this assignment is to become familiar with analyzing public time-series datasets. In this assignment we will be focused around the public CTU dataset for predicting fetal wellbeing. Please read this press release and the associated paper for an idea of what the task entails. The dataset is here.
For some context, CMU is part of an initiative to develop better sensors to track fetal health, a big part of this involves the design of physiologically-informed AI algorithms.
The primary goal of this assignment is learning how to make sense of a big dataset and learning what are useful questions to ask.
Dataset holds 552 records of fetal heart rate and contraction data. Each record is up to 90 minutes measured at 4 Hz, ending at delivery. Metadata includes cord pH, base deficit, BDecf, Apgar scores, etc.
Analyze the dataset in the following phases and document your findings in either a slide deck or a report (whichever is easiest). You can do additional analyses beyond what is listed. Typically when you begin digging you will naturally have your own questions, so please go ahead and add.
Our goal is fetal hypoxia detection (interchangeably referred to as acidosis here), using pH < 7.2 as the cutoff.
Dataset exploration. Understand what is within the dataset. What variables are present, what do they mean? a. Plot examples of one normal and hypoxic trace, what do you notice? b. Plot the distribution of cord pH. Report the positive rate at pH < 7.20 and at pH < 7.05. How might we address the challenge of data imbalance? c. Plot the distribution of different data acquisition methods (external Doppler ultrasound vs. fECG). d. Plot the correlations between different demographic variables (e.g. maternal age, birth weight etc.) with cord pH.
Signal missingness. Observe that signal dropout is common. a. Analyze the distribution of signal missingness across the cohort. How does this vary for hypoxic and normal cases? How does it vary based on data acquisition method? b. If we wanted to apply a signal quality filtering threshold e.g. discard signals where at most 10% is missing, how does this affect the number of records we can analyze? Does this affect the distribution between hypoxic and normal cases? How does data quality differ based on data acquisition method? Observe that for dropouts < 10 s, linear interpolation is applied, while those ≥ 10 s is logged as a missing segment.

Feature definitions. Typical analysis involves tracking the rate of contractions, accelerations and decelerations across time. Create a segmentation algorithm which does this and visualize the results.

Often features include a measure of fetal heart rate at baseline and variability. As well as count and rate of contractions, decelerations, and accelerations.
Classification. Typically the last 30 minutes is the most predictive of hypoxia. Compute a vector of features based on the last 30 minutes. Perform training and testing using cross-validation using a classifier of your choice. a. Plot the ROC with confidence intervals, report the AUC. b. Discuss which operating point you would select, and what is the sensitivity and specificity. c. How might you deal with data imbalance? d. How do your results change with and without the inclusion of clinical demographics and metadata? e. If you applied a signal quality cutoff, would your results improve? f. Can you show how predictive your algorithms would be 15 minutes before delivery? How about 30, 60 minutes before?
Subgroup analysis. How do outcomes differ when stratified across different demographic variables? What are biases that the algorithm has learned? Do they make sense?
Feature importance. Which features are the most important towards classification? Use Shapley values to quantify this. Select 1 false positive and 1 false negative produced by your algorithm and discuss whether the results make sense particularly in light of the feature importance values.

Time-varying risk score. Produce a risk score over time. You can use this paper.

Deliverables. A slide deck or report, whichever is easiest, plus your code with a short README.