
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072
PPDCARE: AN AI-POWERED POSTPARTUM DEPRESSION RISK PREDICTION SYSTEM USING MACHINE LEARNING
Mrs. K.Kumari Devi1 , Thurasam Prathibha2 , Tippana Akhila3 ,Vanthala Suguna4,Varri Nikshitha5
1Professor, Dept. of Computer Science and Engineering, Andhra University College of Engineering for Women, Andhra Pradesh, India
2-5 B. Tech, Final year Student, Andhra University College of Engineering for Women, Andhra Pradesh, India ***
Abstract - Postpartum Depression (PPD) is a clinically significantmentalhealthconditionaffectinganestimated10–20% of new mothers globally, yet it remains chronically underdiagnosedinprimarycaresettingsduetotheabsenceof structured, data-driven screening tools at the point of care. This paper presents PPDCare, a full-stack web application designed to empower obstetricians and psychiatrists with an intelligent, real-time PPD risk assessment platform. The system leverages a Random Forest machine learning classifier achieving 97.67% accuracy trained on a structuredpostpartumsymptomdatasetofover1,500clinical records. Built using Python (Flask) as the backend, HTML/CSS/JavaScript for the frontend, and SQLite as the persistent data store, PPDCare provides doctors with a structured eight-symptom patient assessment form, probability-calibrated risk classification (Low, Moderate, High), auto-generated clinical explanations, symptom-level visualizations(barchartandradarchart),downloadablePDF reports,andlongitudinalpatienttrendtracking.Comparative evaluation of three models Random Forest (97.67%), KNearest Neighbors (89.37%), and Support Vector Machine (82.39%) confirms Random Forest as the optimal classifier forthisdomain.Theproposedsystemoffersascalable,secure, andclinicallyinterpretablesolutionthat augments physician decision-making in postpartum mental healthcare.
Key Words : Postpartum Depression, PPD Risk Prediction, Random Forest, KNN, SVM, Flask, Clinical Decision Support, Mental Health Screening, Symptom Visualization, SQLite.
1. INTRODUCTION
PostpartumDepression(PPD)isamooddisorderthataffects new mothers typically within the first year following childbirth. Unlike the transient "baby blues," PPD is characterized by persistent sadness, severe anxiety, sleep disturbances, loss of appetite, difficulty bonding with the newborn, and in severe cases, thoughts of self-harm. AccordingtotheWorldHealthOrganization,PPDaffects10–20%ofwomenpost-deliveryglobally,withprevalencerates in developing nations estimated to be even higher due to limitedaccesstospecializedpsychiatriccare[1].
Despite its clinical significance, PPD is routinely underdiagnosed in routine obstetric follow-up visits. The
EdinburghPostnatalDepressionScale(EPDS)remainsthe goldstandardscreeningtool;however,itsadministrationis inconsistentinbusyclinicalenvironments,andphysicians frequently rely on subjective assessments rather than structured,evidence-basedscoring[2].Thisgapinclinical practicemotivatesthedevelopmentofatechnology-assisted screening system that integrates seamlessly into the clinician'sworkflow.
This paper presents PPDCare, a clinician-facing web applicationthatautomates postpartummental healthrisk assessment using a Random Forest machine learning classifier. The system enables registered doctors to input structured patient symptom data through a standardized assessmentform,receiveaninstantprobability-calibrated risk score, review auto-generated clinical explanations linkedtothepatient'sspecificsymptoms,visualizesymptom profilesthroughbarandradarcharts,anddownloadformal PDF reports. The platform also maintains a longitudinal record of all patient assessments, enabling doctors to monitor risk evolution across multiple consultations and compareassessmentssidebyside.
The key contributions of this work are:
• A clinician-facing full-stack PPD screening platform with secure multi-doctor authentication and perdoctordataisolation.
• AtrainedRandomForestclassifierachieving97.67% accuracy with cross-validation, outperforming KNN (89.37%)andSVM(82.39%).
• Aprobability-calibratedthree-tierriskstratification engine(Low<0.30,Moderate0.30–0.70,High>0.70).
• Auto-generatedsymptom-levelclinicalexplanations mappeddirectlytotheeight-featureinputprofile.
• Interactivesymptomseverityvisualizations(barchart andradarchart)renderedusingChart.js.
• Longitudinal risk trend tracking and side-by-side patientassessmentcomparison.
• Downloadable, formally structured PDF reports generatedusingtheReportLablibrary.
2. REVIEW OF LITERATURE
Research on machine learning applications in postpartum mental health screening has grown substantially over the

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072
past decade. Cox et al. [3] established the foundational framework for standardized PPD screening through the Edinburgh Postnatal Depression Scale, which remains the most widely validated clinical instrument for postpartum moodassessment.Theirworkunderscoredthenecessityof structured,consistentsymptomevaluationasthebasisfor anydecisionsupportsystem.
Underwood et al. [4] conducted a systematic review of machinelearningmodelsappliedtoperinatalmentalhealth prediction, finding that ensemble methods particularly Random Forest and Gradient Boosting classifiers consistentlyoutperformedlogisticregressionandsingle-tree approachesinidentifyinghigh-riskpatients.Theiranalysis highlighted the importance of symptom-level feature engineering and cross-validated performance metrics in clinicalMLmodelevaluation.
Shatteetal.[5]surveyedthebroaderlandscapeofmachine learning in mental health and noted that clinical interpretabilityremainsacriticalgapindeployedsystems. Their review emphasized that black-box models face adoptionbarriersamonghealthcareproviderswhorequire explainable outputs directly referenceable during patient consultations afindingthatdirectlymotivatestheclinical explanationmoduleinPPDCare.
With respect to web-based clinical decision support, Kawamotoetal.[6]demonstratedthatsystemsintegrated directly into clinical workflows show significantly higher adoption rates and meaningful improvements in clinician adherencetoevidence-basedprotocols.Thearchitectureof PPDCare, which embeds the prediction engine within the standardpatientassessmentworkflow,alignsdirectlywith thisdesignprinciple.
Recent work by Rao et al. [7] on postpartum depression detectionusingsurvey-baseddatasetsandRandomForest classifiers reported accuracy values between 85–92%, suggestingthatthe97.67% accuracyachievedinPPDCare reflects the quality of the training dataset and the preprocessing pipeline applied to the post_natal clinical dataset.
3. METHODOLOGY
PPDCareisdesignedasamodular,multi-tierwebapplication following a client-server architecture. The Flask-based backend exposes RESTful routes consumed by the HTML/CSS/JavaScript frontend. Patient assessment data, doctorcredentials,andpredictionrecordsarepersistedina SQLiterelationaldatabase. Thepredictionengineisapretrained scikit-learn Random Forest model, loaded at applicationstartupviajoblibforlow-latencyinference.
3.1 Dataset
The system was trained on the post_natal clinical dataset comprisingover1,500structuredpostpartumassessments.
The dataset includes nine input features: Age (ordinal, encodedintofiveagebands:≤30,31–35,36–40,41–45,>45), Feeling Sad or Tearful, Irritable Towards Baby & Partner, Trouble Sleeping at Night, Problems Concentrating or Making Decisions, Overeating or Loss of Appetite, Feeling Anxious, Feeling of Guilt, and Problems of Bonding with Baby.Thebinarytargetvariable(SuicideAttempt)servesas aproxyforseverePPDriskclassification.Categoricalfeature values(Yes/No/Sometimes/Frequent)werelabel-encoded tointegerrepresentations(0,1,2)priortomodeltraining. An 80:20 train-test split with five-fold stratified crossvalidationwasapplied.
3.2 Machine Learning Model Selection
Three classifier architectures were evaluated on identical preprocessing pipelines: Random Forest (RF), K-Nearest Neighbors (KNN), and Support Vector Machine with RBF kernel (SVM). Table 1 presents the comparative performance.
1:
RandomForestdemonstratedsuperiorperformanceacross allmetrics,achievingacross-validatedaccuracyof96.48%± 1.25%,confirmingitsrobustnessandgeneralizability.The model'sensemblenature aggregatingpredictionsfrom100 decisiontrees providesinherentresistancetooverfitting and enables reliable probability calibration via predict_proba(), which underpins the three-tier risk stratificationengine.
3.3 System Architecture
ThePPDCaresystemfollowsafour-layerarchitecture:(1) PresentationLayer vanillaHTML5,CSS3,andJavaScript withChart.jsandJinja2templating;(2)ApplicationLayer Python Flask (v3.1.3) with RESTful route handlers; (3) IntelligenceLayer pre-trainedRandomForestmodelwith risk stratification and clinical explanation generation; and

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072
(4) Data Layer SQLite database with Werkzeug-hashed doctorcredentialsandJSON-basedper-doctorpatientrecord storage.
4. IMPLEMENTATION
4.1 Landing Page and Doctor Authentication
PPDCarepresentsabrandedlandingpageintroducingthe system'smissionanddirectingclinicianstotheDoctorLogin portal.Theauthenticationmoduleimplementssession-based multi-doctor login using Flask's server-side session management. Doctor passwords are securely hashed with Werkzeug's PBKDF2-SHA256 (generate_password_hash / check_password_hash) before SQLite storage, with each authenticatedsessionisolatingthedoctor'spatientrecords byemailidentity.


4.2 Patient Assessment Dashboard
Thepatientassessmentformistheprimaryclinicalinterface of PPDCare. Doctors enter the patient's name and age, followed by eight symptom indicators: Feeling Sad or Tearful,IrritableTowardsBaby&Partner,TroubleSleeping at Night, Problems Concentrating or Making Decisions, OvereatingorLossofAppetite,FeelingAnxious,Feelingof Guilt,andProblemsofBondingwithBaby.Eachsymptomis captured via a dropdown selector with three severity levels No(0),Sometimes(1),andFrequent/Severe(2).Age isencodedintofiveordinalbandsconsistentwithtraining dataencodingbeforeinference

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

4.3 Risk Prediction Engine and Clinical Result
Uponformsubmission,theencodedfeaturevectorispassed tothepre-loadedRandomForestmodel.Themodelreturns aprobabilityscoreviapredict_proba(),mappedtoathreetier classification: Low (< 0.30), Moderate (0.30–0.70), or High (> 0.70). Each tier carries a standardized clinical recommendation. The clinical explanation builder (build_clinical_explanation)iteratesovertheeightsymptom valuesandgeneratesevidence-basedexplanatorysentences for symptoms scored at severity level 2, providing the clinician with an interpretable audit trail. A color-coded progressbarvisuallycommunicatestheriskprobabilityon theresultpage.

4.4 Symptom Severity Visualizations
Below the clinical summary, two Chart.js visualizations render the patient's complete symptom profile. The SymptomSeverityBarChartdisplaysalleightsymptomson theX-axisagainsttheirseverityscores(0–2)ontheY-axis, with color-coded bars: red for Severe (2), orange for Moderate(1).TheSymptomProfileRadarChartoverlaysthe eightscoresona normalizedspider-webgrid, providinga holistic visual representation of the patient's symptom pattern. Both charts are rendered client-side using asynchronous JavaScript with data injected via Jinja2 templatevariables.

4.5 Saved Records, Trend Analysis, and Assessment Comparison
The Saved Records page displays all patient assessments associatedwiththelogged-indoctor,listingeachpatient's ID, name, age, risk probability, risk level, severity, and recommendation with View Trend and Compare action buttons.TheRiskTrendpagerendersaChart.jslinechartof a selected patient's risk probability across all historical assessmentsforlongitudinalmonitoring.TheComparepage enables side-by-side rendering of two patient records by unique Patient ID (PAT-XXXXXX format), supporting differentialclinicalanalysis.PDFreportsaregeneratedondemandviaReportLab(canvas.CanvasonA4pagesize)and deliveredasin-memoryBytesIObuffers

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

5. RESULTS AND ANALYSIS
5.1 Model Performance
TheRandomForestclassifierachievedatestaccuracy of 97.67%, with F1 score, precision, and recall all at 97.67%.Five-foldstratifiedcross-validationyieldeda meanaccuracyof96.48%±1.25%,confirmingstrong generalizability. The significant performance gap between Random Forest and alternative models validatesthemodelselectiondecisionforthisclinical application.
5.2 System Functional Evaluation
All core system modules were evaluated for functional correctness.Table2summarizestheresults:
Table 2: Module Functionality Test Results
UserAuthentication (Signup/Login/Logout) Pass Securesession management; passwordhashing verified
PatientAssessmentForm Pass All8-symptom inputscorrectly encodedand submitted
RiskPredictionEngine(RF Pass Correctprobability outputandrisk-
ClinicalExplanation Generator Pass Severity-2 symptoms correctlymapped toexplanations
SymptomBarChart Visualization Pass Color-coded severityrendering confirmedcorrect
SymptomRadarChart Visualization Pass Radarpolygon accuratelyreflects symptomprofile
PDFReportDownload Pass Completereport generated;inmemorybuffer delivery SavedRecordsPage Pass Per-doctorrecord isolationandlisting verified
RiskTrendChart Pass Longitudinal probabilityline chartrenders correctly
AssessmentComparison Page Pass Side-by-siderecord comparison rendered accurately
The prediction engine correctly classified test patients acrossallthreerisktiers.ForthesamplepatientAnjali(Age: 33), with Frequent sleep disturbance, Irritability towards babyandpartneratSeverelevel,andremainingindicatorsat Sometimesseverity,themodelreturnedariskprobabilityof 0.17 (Low risk, Minimal symptoms), with two clinically appropriate explanations generated for the elevated symptommarkers.Thisvalidatesthesystem'sinterpretable clinicalreasoningcapabilityatthepointofcare.
6. CONCLUSION AND FUTURE SCOPE
ThispaperpresentedPPDCare,aclinician-facingAI-powered postpartum depression risk assessment system that integrates a high-accuracy Random Forest classifier (97.67%)withastructuredclinicalworkflow,interpretable symptom-level clinical explanations, interactive bar and radarchartvisualizations,longitudinaltrendtracking,side-

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072
by-side assessment comparison, and downloadable PDF reports.Thesystemaddressesacriticalgapinpostpartum care by providing obstetricians and psychiatrists with a data-driven,explainable,andworkflow-integratedscreening tool that can meaningfully improve early PPD detection rates.
ThecomparativeevaluationconfirmsRandomForestasthe optimalclassifierforthisdomain,outperformingKNNand SVMbysubstantialmarginsinbothheld-outtestaccuracy andcross-validatedgeneralization.Theclinicalexplanation module provides the layer of interpretability essential for physician trust and adoption of machine learning-based decisionsupportsystems.
Future Scope:
• Deploymenttoacloudplatform(AWS,Azure,orGCP) forinstitution-wideaccessandscalability.
• Integration with hospital Electronic Health Record (EHR)systemsviaHL7FHIRAPIsforseamlessdata exchange.
• Extension of the model to incorporate additional biomarkersincludinghormonaldata,priorpsychiatric history,andsocialsupportindicators.
• Development of a mobile application (Android and iOS) for community health worker deployment in ruralandunderservedregions.
• Implementation of SHAP (SHapley Additive exPlanations) values for global feature importance visualizationinthecliniciandashboard.
• Multi-language support to enhance accessibility for diversepatientandclinicianpopulations.
REFERENCES
[1] World Health Organization, "Maternal Mental Health," WHOFactSheet,Geneva,Switzerland,2023.
[2] P. S. Reck et al., "Review of the Edinburgh Postnatal Depression Scale: clinical application and psychometric properties," International Journal of Gynecology & Obstetrics,vol.164,pp.487-494,2024.
[3] J. L. Cox, J. M. Holden, and R. Sagovsky, "Detection of postnatal depression: Development of the 10-item Edinburgh Postnatal Depression Scale," British Journal of Psychiatry,vol.150,pp.782-786,1987.
[4] L. Underwood et al., "A systematic review of interventionsandtoolstoimprovepostnatalmentalhealth screening,"BMCPregnancyandChildbirth,vol.17,no.1,pp. 1-14,2017.
[5] A. B. R. Shatte, D. M. Hutchinson, and S. J. Teague, "Machine learning in mental health: a scoping review of methodsandapplications,"PsychologicalMedicine,vol.49, no.9,pp.1426-1448,2019.
[6]K.Kawamoto,C.A.Houlihan,E.A.Balas,andD.F.Lobach, "Improvingclinicalpracticeusingclinicaldecisionsupport systems,"BMJ,vol.330,no.7494,pp.765-768,2005.
[7] N. Rao, P. Shankar, and V. Krishnamurthy, "Machine learningbasedpredictionofpostpartumdepressionusing symptom-based survey data," Journal of Biomedical Informatics,vol.128,p.104019,2022.
[8]L.Breiman,"RandomForests,"MachineLearning,vol.45, no.1,pp.5-32,2001.
[9] F. Pedregosa et al., "Scikit-learn: Machine Learning in Python,"JournalofMachineLearningResearch,vol.12,pp. 2825-2830,2011.
[10] R. Palaniappan, K. Ravi, and K. Krishnamurthy, "Postpartumdepressiondetectionusingmachinelearning:A comparativestudy,"ProcediaComputerScience,vol.167,pp. 1170-1180,2020.