Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

bbjonah/Maternal-Mortality-Risk-Prediction-in-Low-Resource-Settings

Domain:

healthcare

Record type:

model
Creator:
bbj
Host:
This project uses machine learning to predict maternal mortality risk in low-resource settings using synthetic healthcare data. It analyzes maternal health, clinical, and healthcare access factors to identify high-risk pregnancies, generate risk scores, and support data-driven maternal health interventions and early risk detection. # ========================================================== # Maternal Mortality Risk Prediction in Low-Resource Settings # ========================================================== # Author: Jona Buka # Description: # Machine Learning pipeline for predicting maternal mortality # risk using synthetic maternal healthcare data. # ========================== # IMPORT LIBRARIES # ========================== import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import warnings warnings.filterwarnings("ignore") from sklearn.model_selection import train_test_split from sklearn.impute import SimpleImputer from sklearn.preprocessing import LabelEncoder from sklearn.metrics import ( classification_report, confusion_matrix, accuracy_score, roc_auc_score, roc_curve ) from sklearn.ensemble import RandomForestClassifier from sklearn.compose import ColumnTransformer from sklearn.pipeline import Pipeline from sklearn.preprocessing import OneHotEncoder from sklearn.impute import SimpleImputer from sklearn.metrics import ConfusionMatrixDisplay from imblearn.over_sampling import SMOTE import joblib # ========================== # LOAD DATASET # ========================== df = pd.read_csv("maternal_mortality_dataset.csv") print("Dataset Shape:", df.shape) print(df.head()) # ========================== # TARGET VARIABLE # ========================== target = "maternal_death" # ========================== # REMOVE DATA LEAKAGE FEATURES # ========================== # These variables directly indicate death outcome leakage_columns = [ "time_to_death_hours", "cause_of_death", "maternal_near_miss" ] # Drop patient identifier id_columns = ["patient_id"] columns_to_drop = leakage_columns + id_columns existing_cols = [col for col in columns_to_drop if col in df.columns] df.drop(columns=existing_cols, inplace=True) # ========================== # HANDLE DATE COLUMN # ========================== if "admission_date" in df.columns: df["admission_date"] = …

Visit

github.com