diff --git a/Maternal health Risk Prediction/Maternal Health Risk Data Set.csv b/Maternal health Risk Prediction/Maternal Health Risk Data Set.csv
new file mode 100644
index 00000000..d58d799f
--- /dev/null
+++ b/Maternal health Risk Prediction/Maternal Health Risk Data Set.csv
@@ -0,0 +1,1015 @@
+Age,SystolicBP,DiastolicBP,BS,BodyTemp,HeartRate,RiskLevel
+25,130,80,15,98,86,high risk
+35,140,90,13,98,70,high risk
+29,90,70,8,100,80,high risk
+30,140,85,7,98,70,high risk
+35,120,60,6.1,98,76,low risk
+23,140,80,7.01,98,70,high risk
+23,130,70,7.01,98,78,mid risk
+35,85,60,11,102,86,high risk
+32,120,90,6.9,98,70,mid risk
+42,130,80,18,98,70,high risk
+23,90,60,7.01,98,76,low risk
+19,120,80,7,98,70,mid risk
+25,110,89,7.01,98,77,low risk
+20,120,75,7.01,100,70,mid risk
+48,120,80,11,98,88,mid risk
+15,120,80,7.01,98,70,low risk
+50,140,90,15,98,90,high risk
+25,140,100,7.01,98,80,high risk
+30,120,80,6.9,101,76,mid risk
+10,70,50,6.9,98,70,low risk
+40,140,100,18,98,90,high risk
+50,140,80,6.7,98,70,mid risk
+21,90,65,7.5,98,76,low risk
+18,90,60,7.5,98,70,low risk
+21,120,80,7.5,98,76,low risk
+16,100,70,7.2,98,80,low risk
+19,120,75,7.2,98,66,low risk
+22,100,65,7.2,98,70,low risk
+49,120,90,7.2,98,77,low risk
+28,90,60,7.2,98,82,low risk
+20,100,90,7.1,98,88,low risk
+23,100,85,7.1,98,66,low risk
+22,120,90,7.1,98,82,low risk
+21,120,80,7.1,98,77,low risk
+21,75,50,6.1,98,70,low risk
+12,95,60,6.1,102,60,low risk
+60,120,80,6.1,98,75,low risk
+55,100,65,6.1,98,66,low risk
+45,120,95,6.1,98,66,low risk
+35,100,70,6.1,98,66,low risk
+22,120,85,6.1,98,88,low risk
+23,120,90,6.1,98,60,low risk
+25,90,70,6.1,98,80,low risk
+30,120,80,6.1,98,70,low risk
+23,120,90,6.1,98,70,low risk
+32,120,90,7.5,98,70,low risk
+42,120,80,7.5,98,70,low risk
+23,90,60,7.5,98,76,low risk
+15,76,49,7.5,98,77,low risk
+15,120,80,7,98,70,low risk
+25,120,80,7,98,66,low risk
+22,100,65,7,98,80,low risk
+35,100,70,7,98,60,low risk
+19,120,85,7,98,60,low risk
+60,90,65,7,98,77,low risk
+23,120,90,6.7,98,70,low risk
+32,120,90,6.4,98,70,low risk
+42,120,80,6.4,98,70,low risk
+23,90,60,6.4,98,76,low risk
+15,76,49,6.4,98,77,low risk
+15,120,80,7.2,98,70,low risk
+15,80,60,7,98,80,low risk
+12,95,60,7.2,98,77,low risk
+29,90,70,6.7,98,80,mid risk
+31,120,60,6.1,98,76,mid risk
+29,130,70,6.7,98,78,mid risk
+17,85,60,9,102,86,mid risk
+19,120,80,7,98,70,mid risk
+20,110,60,7,100,70,mid risk
+32,120,65,6,101,76,mid risk
+26,85,60,6,101,86,mid risk
+29,130,70,7.7,98,78,mid risk
+19,120,80,7,98,70,mid risk
+54,130,70,12,98,67,mid risk
+44,120,90,16,98,80,mid risk
+23,130,70,6.9,98,70,mid risk
+22,85,60,6.9,98,76,mid risk
+55,120,90,12,98,70,mid risk
+35,120,80,6.9,98,78,mid risk
+21,90,60,6.9,98,86,mid risk
+16,90,65,6.9,98,76,mid risk
+33,115,65,7,98,70,mid risk
+12,95,60,6.9,98,65,mid risk
+28,120,90,6.9,98,70,mid risk
+21,90,65,6.9,98,76,mid risk
+18,90,60,6.9,98,70,mid risk
+21,120,80,6.9,98,76,mid risk
+16,100,70,6.9,98,80,mid risk
+19,120,75,6.9,98,66,mid risk
+23,100,85,6.9,98,66,mid risk
+22,120,90,7.8,98,82,mid risk
+60,120,85,15,98,60,mid risk
+13,90,65,7.8,101,80,mid risk
+23,120,90,7.8,98,60,mid risk
+28,115,60,7.8,101,86,mid risk
+50,120,80,7.8,98,70,mid risk
+29,130,70,7.8,98,78,mid risk
+19,120,80,7,98,70,mid risk
+19,120,85,7.8,98,60,mid risk
+60,90,65,6.8,98,77,mid risk
+55,120,90,6.8,98,66,mid risk
+25,120,80,6.8,98,66,mid risk
+48,140,90,15,98,90,high risk
+25,140,100,6.8,98,80,high risk
+23,140,90,6.8,98,70,high risk
+34,85,60,11,102,86,high risk
+50,140,90,15,98,90,high risk
+25,140,100,6.8,98,80,high risk
+42,140,100,18,98,90,high risk
+32,140,100,7.9,98,78,high risk
+50,140,95,17,98,60,high risk
+38,135,60,7.9,101,86,high risk
+39,90,70,9,98,80,high risk
+30,140,100,15,98,70,high risk
+63,140,90,15,98,90,high risk
+25,140,100,7.9,98,80,high risk
+30,120,80,7.9,101,76,high risk
+55,140,100,18,98,90,high risk
+32,140,100,7.9,98,78,high risk
+30,140,100,15,98,70,high risk
+48,120,80,11,98,88,high risk
+49,140,90,15,98,90,high risk
+25,140,100,7.5,98,80,high risk
+40,160,100,19,98,77,high risk
+32,140,90,18,98,88,high risk
+35,140,100,7.5,98,66,high risk
+54,140,100,15,98,66,high risk
+55,140,95,19,98,77,high risk
+29,120,70,9,98,80,high risk
+48,120,80,11,98,88,high risk
+40,160,100,19,98,77,high risk
+32,140,90,18,98,88,high risk
+35,140,100,7.5,98,66,high risk
+54,140,100,15,98,66,high risk
+40,120,95,11,98,80,high risk
+22,90,60,7.5,102,60,high risk
+40,120,85,15,98,60,high risk
+55,140,95,19,98,77,high risk
+50,130,100,16,98,75,high risk
+18,120,80,6.9,102,76,mid risk
+32,140,100,6.9,98,78,high risk
+17,90,60,6.9,101,76,mid risk
+17,90,63,6.9,101,70,mid risk
+25,120,90,6.7,101,80,mid risk
+17,120,80,6.7,102,76,mid risk
+14,90,65,7,101,70,high risk
+15,80,60,6.7,98,80,low risk
+15,100,65,6.7,98,76,low risk
+12,95,60,6.7,98,77,low risk
+37,120,90,11,98,88,high risk
+18,100,70,6.7,98,76,low risk
+21,100,85,6.7,98,70,low risk
+17,110,75,12,101,76,high risk
+25,120,90,7.5,98,80,low risk
+23,85,65,7.5,98,70,low risk
+12,95,60,7.5,98,65,low risk
+28,120,90,7.5,98,70,low risk
+40,120,90,12,98,80,high risk
+55,129,85,7.5,98,88,low risk
+25,100,90,7.5,98,76,low risk
+35,120,80,7.5,98,80,low risk
+21,90,65,7.5,98,76,low risk
+18,90,60,7.5,98,70,low risk
+21,120,80,7.5,98,76,low risk
+16,100,70,7.2,98,80,low risk
+19,120,75,7.2,98,66,low risk
+40,160,100,19,98,77,high risk
+32,140,90,18,98,88,high risk
+22,100,65,7.2,98,70,low risk
+49,120,90,7.2,98,77,low risk
+28,90,60,7.2,98,82,low risk
+12,90,60,7.9,102,66,high risk
+20,100,90,7.1,98,88,low risk
+23,100,85,7.1,98,66,low risk
+22,120,90,7.1,98,82,low risk
+21,120,80,7.1,98,77,low risk
+35,140,100,8,98,66,high risk
+54,140,100,15,98,66,high risk
+40,120,95,11,98,80,high risk
+21,75,50,6.1,98,70,low risk
+12,95,60,6.1,102,60,low risk
+60,120,85,15,98,60,high risk
+55,140,95,19,98,77,high risk
+50,130,100,16,98,75,high risk
+60,120,80,6.1,98,75,low risk
+55,100,65,6.1,98,66,low risk
+45,120,95,6.1,98,66,low risk
+35,100,70,6.1,98,66,low risk
+22,120,85,6.1,98,88,low risk
+13,90,65,7.9,101,80,mid risk
+23,120,90,6.1,98,60,low risk
+17,90,65,6.1,103,67,high risk
+28,83,60,8,101,86,high risk
+50,120,80,15,98,70,high risk
+25,90,70,6.1,98,80,low risk
+30,120,80,6.1,98,70,low risk
+31,120,60,6.1,98,76,mid risk
+23,120,90,6.1,98,70,low risk
+29,130,70,6.1,98,78,mid risk
+17,85,60,9,102,86,high risk
+32,120,90,7.5,98,70,low risk
+42,120,80,7.5,98,70,low risk
+23,90,60,7.5,98,76,low risk
+19,120,80,7,98,70,mid risk
+15,76,49,7.5,98,77,low risk
+33,120,75,10,98,70,high risk
+48,120,80,11,98,88,high risk
+15,120,80,7,98,70,low risk
+25,120,80,7,98,66,low risk
+22,100,65,7,98,80,low risk
+50,140,95,17,98,60,high risk
+35,100,70,7,98,60,low risk
+19,120,85,7,98,60,low risk
+60,90,65,7,98,77,low risk
+28,85,60,9,101,86,mid risk
+50,140,80,6.7,98,70,mid risk
+29,90,70,6.7,98,80,mid risk
+30,140,100,15,98,70,high risk
+31,120,60,6.1,98,76,mid risk
+23,120,90,6.7,98,70,low risk
+29,130,70,6.7,98,78,mid risk
+17,85,60,9,102,86,mid risk
+32,120,90,6.4,98,70,low risk
+42,120,80,6.4,98,70,low risk
+23,90,60,6.4,98,76,low risk
+19,120,80,7,98,70,mid risk
+15,76,49,6.4,98,77,low risk
+29,120,75,7.2,100,70,high risk
+48,120,80,11,98,88,high risk
+15,120,80,7.2,98,70,low risk
+50,140,90,15,98,77,high risk
+25,140,100,7.2,98,80,high risk
+55,140,80,7.2,101,76,high risk
+20,110,60,7,100,70,mid risk
+40,140,100,18,98,77,high risk
+28,120,80,9,102,76,high risk
+32,140,100,8,98,70,high risk
+17,90,60,11,101,78,high risk
+17,90,63,8,101,70,high risk
+25,120,90,12,101,80,high risk
+17,120,80,7,102,76,high risk
+19,90,65,11,101,70,high risk
+15,80,60,7,98,80,low risk
+32,120,65,6,101,76,mid risk
+12,95,60,7.2,98,77,low risk
+37,120,90,11,98,88,high risk
+18,100,70,6.8,98,76,low risk
+21,100,85,6.9,98,70,low risk
+17,110,75,13,101,76,high risk
+25,120,90,15,98,80,high risk
+10,85,65,6.9,98,70,low risk
+12,95,60,6.9,98,65,low risk
+28,120,90,6.9,98,70,low risk
+40,120,90,6.9,98,80,low risk
+55,110,85,6.9,98,88,low risk
+25,100,90,6.9,98,76,low risk
+35,120,80,6.9,98,80,low risk
+21,90,65,6.9,98,76,low risk
+18,90,60,6.9,98,70,low risk
+21,120,80,6.9,98,76,low risk
+16,100,70,6.9,98,80,low risk
+19,120,75,6.9,98,66,low risk
+40,160,100,19,98,77,high risk
+32,140,90,18,98,88,high risk
+22,100,65,6.9,98,70,low risk
+49,120,90,6.9,98,77,low risk
+28,90,60,6.9,98,82,low risk
+12,90,60,8,102,66,high risk
+20,100,90,7,98,88,low risk
+23,100,85,7,98,66,low risk
+22,120,90,7,98,82,low risk
+21,120,80,7,98,77,low risk
+35,140,100,9,98,66,high risk
+54,140,100,15,98,66,high risk
+40,120,95,11,98,80,high risk
+21,75,50,7.7,98,60,low risk
+12,90,60,11,102,60,high risk
+60,120,85,15,98,60,high risk
+55,140,95,19,98,77,high risk
+50,130,100,16,98,76,high risk
+60,120,80,7.7,98,75,low risk
+55,100,65,7.7,98,66,low risk
+45,120,95,7.7,98,66,low risk
+35,100,70,7.7,98,66,low risk
+22,120,85,7.7,98,88,low risk
+13,90,65,9,101,80,high risk
+23,120,90,7.7,98,60,low risk
+17,90,65,7.7,103,67,high risk
+26,85,60,6,101,86,mid risk
+50,120,80,7.7,98,70,low risk
+19,90,70,7.7,98,80,low risk
+30,120,80,7.7,98,70,low risk
+31,120,60,6.1,98,76,low risk
+23,120,80,7.7,98,70,low risk
+29,130,70,7.7,98,78,mid risk
+17,85,60,6.3,102,86,high risk
+32,120,90,7.7,98,70,low risk
+42,120,80,7.7,98,70,low risk
+23,90,60,7.7,98,76,low risk
+19,120,80,7,98,70,mid risk
+15,75,49,7.7,98,77,low risk
+40,120,75,7.7,98,70,high risk
+48,120,80,11,98,88,high risk
+15,120,80,7.7,98,70,low risk
+25,120,80,7.7,98,66,low risk
+22,100,65,6.9,98,80,low risk
+12,120,95,6.9,98,60,low risk
+35,100,70,6.9,98,60,low risk
+19,120,85,6.9,98,60,low risk
+60,90,65,6.9,98,77,low risk
+55,120,90,6.9,98,76,low risk
+35,90,65,6.9,98,75,low risk
+51,85,60,6.9,98,66,low risk
+62,120,80,6.9,98,66,low risk
+25,90,70,6.9,98,66,low risk
+21,120,80,6.9,98,88,low risk
+22,120,60,15,98,80,high risk
+55,120,90,18,98,60,high risk
+54,130,70,12,98,67,mid risk
+35,85,60,19,98,86,high risk
+43,120,90,18,98,70,high risk
+12,120,80,6.9,98,80,low risk
+65,90,60,6.9,98,70,low risk
+60,120,80,6.9,98,76,low risk
+25,120,90,6.9,98,70,low risk
+22,90,65,6.9,98,78,low risk
+66,85,60,6.9,98,86,low risk
+56,120,80,13,98,70,high risk
+35,90,70,6.9,98,70,low risk
+43,120,80,15,98,76,high risk
+35,120,60,6.9,98,70,low risk
+44,120,90,16,98,80,mid risk
+23,130,70,6.9,98,70,mid risk
+22,85,60,6.9,98,76,mid risk
+55,120,90,12,98,70,mid risk
+35,120,80,6.9,98,78,mid risk
+21,90,60,6.9,98,86,mid risk
+45,120,80,6.9,103,70,low risk
+70,85,60,6.9,102,70,low risk
+65,120,90,6.9,103,76,low risk
+55,120,80,6.9,102,80,low risk
+45,90,60,18,101,70,high risk
+22,120,80,6.9,103,76,low risk
+16,90,65,6.9,98,76,mid risk
+12,95,60,6.9,98,77,low risk
+37,120,90,11,98,88,high risk
+18,100,70,6.9,98,76,low risk
+21,100,85,6.9,98,70,low risk
+17,110,75,6.9,101,76,high risk
+25,120,90,6.9,98,80,low risk
+33,115,65,7,98,70,mid risk
+12,95,60,6.9,98,65,mid risk
+28,120,90,6.9,98,70,mid risk
+40,120,90,6.9,98,80,high risk
+55,110,85,6.9,98,88,high risk
+25,100,90,6.9,98,76,high risk
+35,120,80,6.9,98,80,high risk
+21,90,65,6.9,98,76,mid risk
+18,90,60,6.9,98,70,mid risk
+21,120,80,6.9,98,76,mid risk
+16,100,70,6.9,98,80,mid risk
+19,120,75,6.9,98,66,mid risk
+40,160,100,19,98,77,high risk
+32,140,90,18,98,88,high risk
+23,100,85,6.9,98,66,mid risk
+22,120,90,7.8,98,82,mid risk
+21,120,80,7.8,98,77,low risk
+35,140,100,7.8,98,66,high risk
+54,140,100,15,98,66,high risk
+40,120,95,11,98,80,high risk
+21,75,50,7.8,98,60,low risk
+12,90,60,7.8,102,60,high risk
+60,120,85,15,98,60,mid risk
+55,140,95,19,98,77,high risk
+50,130,100,16,98,75,high risk
+60,120,80,7.8,98,75,high risk
+55,100,65,7.8,98,66,low risk
+45,120,95,7.8,98,66,low risk
+35,100,70,7.8,98,66,low risk
+22,120,85,7.8,98,88,low risk
+13,90,65,7.8,101,80,mid risk
+23,120,90,7.8,98,60,mid risk
+17,90,65,7.8,103,67,high risk
+28,115,60,7.8,101,86,mid risk
+50,120,80,7.8,98,70,mid risk
+19,90,70,7.8,98,80,low risk
+30,120,80,7.8,98,70,low risk
+31,120,60,6.1,98,76,low risk
+23,120,70,7.8,98,70,low risk
+29,130,70,7.8,98,78,mid risk
+17,85,69,7.8,102,86,high risk
+32,120,90,7.8,98,70,low risk
+42,120,80,7.8,98,70,low risk
+23,90,60,7.8,98,76,low risk
+19,120,80,7,98,70,mid risk
+15,76,49,7.8,98,77,low risk
+20,120,75,7.8,98,70,low risk
+48,120,80,11,98,88,high risk
+15,120,80,7.8,98,70,low risk
+25,120,80,7.8,98,66,low risk
+22,100,65,7.8,98,80,low risk
+12,120,95,7.8,98,60,low risk
+35,100,70,7.8,98,60,low risk
+19,120,85,7.8,98,60,mid risk
+60,90,65,6.8,98,77,mid risk
+55,120,90,6.8,98,66,mid risk
+25,120,80,6.8,98,66,mid risk
+22,100,65,6.8,98,88,low risk
+12,120,95,6.8,98,60,mid risk
+35,100,70,6.8,98,60,mid risk
+19,120,90,6.8,98,60,mid risk
+60,90,65,6.8,98,77,mid risk
+55,120,90,6.8,98,78,low risk
+50,130,80,16,102,76,mid risk
+27,120,90,6.8,102,68,mid risk
+60,140,90,12,98,77,high risk
+55,100,70,6.8,101,80,mid risk
+60,140,80,16,98,66,high risk
+12,120,90,6.8,98,80,mid risk
+17,140,100,6.8,103,80,high risk
+60,120,80,6.8,98,77,mid risk
+22,100,65,6.8,98,88,low risk
+36,140,100,6.8,102,76,high risk
+22,90,60,6.8,98,77,low risk
+25,120,100,6.8,98,60,mid risk
+35,100,60,15,98,80,high risk
+40,140,100,13,101,66,high risk
+27,120,70,6.8,98,77,low risk
+36,140,100,6.8,102,76,high risk
+22,90,60,6.8,98,77,mid risk
+25,120,100,6.8,98,60,low risk
+35,100,60,15,98,80,high risk
+40,140,100,13,101,66,high risk
+27,120,70,6.8,98,77,low risk
+27,120,70,6.8,98,77,low risk
+65,130,80,15,98,86,high risk
+35,140,80,13,98,70,high risk
+29,90,70,10,98,80,high risk
+30,120,80,6.8,98,70,mid risk
+35,120,60,6.1,98,76,mid risk
+23,140,90,6.8,98,70,high risk
+23,130,70,6.8,98,78,mid risk
+35,85,60,11,102,86,high risk
+32,120,90,6.8,98,70,low risk
+43,130,80,18,98,70,mid risk
+23,99,60,6.8,98,76,low risk
+19,120,80,7,98,70,mid risk
+15,76,49,6.8,98,77,low risk
+30,120,75,6.8,98,70,mid risk
+48,120,80,11,98,88,high risk
+15,120,80,6.8,98,70,low risk
+48,140,90,15,98,90,high risk
+25,140,100,6.8,98,80,high risk
+29,100,70,6.8,98,80,low risk
+32,120,80,6.8,98,70,mid risk
+35,120,60,6.1,98,76,low risk
+23,140,90,6.8,98,70,high risk
+23,130,70,6.8,98,78,mid risk
+34,85,60,11,102,86,high risk
+32,120,90,6.8,98,70,low risk
+42,130,80,18,98,70,mid risk
+23,90,60,6.8,98,76,low risk
+19,120,80,7,98,70,mid risk
+15,76,49,6.8,98,77,low risk
+20,120,75,6.8,98,70,low risk
+48,120,80,11,98,88,low risk
+15,120,80,6.8,98,70,low risk
+50,140,90,15,98,90,high risk
+25,140,100,6.8,98,80,high risk
+30,120,80,6.8,101,76,low risk
+31,110,90,6.8,100,70,mid risk
+42,140,100,18,98,90,high risk
+18,120,80,6.8,102,76,low risk
+32,140,100,7.9,98,78,high risk
+17,90,60,7.9,101,76,low risk
+19,120,80,7,98,70,mid risk
+15,76,49,7.9,98,77,low risk
+19,120,75,7.9,98,70,low risk
+48,120,80,11,98,88,low risk
+15,120,80,7.9,98,70,low risk
+25,120,80,7.9,98,66,mid risk
+22,100,65,7.9,98,80,low risk
+50,140,95,17,98,60,high risk
+35,100,70,7.9,98,60,low risk
+19,120,85,7.9,98,60,low risk
+60,90,65,7.9,98,77,low risk
+38,135,60,7.9,101,86,high risk
+50,120,80,7.9,98,70,low risk
+39,90,70,9,98,80,high risk
+30,140,100,15,98,70,high risk
+31,120,60,6.1,98,76,mid risk
+23,120,90,7.9,98,70,mid risk
+29,130,70,7.9,98,78,mid risk
+17,85,60,7.9,102,86,low risk
+32,120,90,7.9,98,70,low risk
+42,120,80,7.9,98,70,low risk
+23,90,60,7.9,98,76,low risk
+19,120,80,7,98,70,low risk
+15,76,49,7.9,98,77,low risk
+16,120,75,7.9,98,7,low risk
+48,120,80,11,98,88,mid risk
+15,120,80,7.9,98,70,low risk
+63,140,90,15,98,90,high risk
+25,140,100,7.9,98,80,high risk
+30,120,80,7.9,101,76,high risk
+17,70,50,7.9,98,70,low risk
+55,140,100,18,98,90,high risk
+18,120,80,7.9,102,76,mid risk
+32,140,100,7.9,98,78,high risk
+17,90,60,7.5,101,76,low risk
+17,90,63,7.5,101,70,low risk
+25,120,90,7.5,101,80,low risk
+17,120,80,7.5,102,76,low risk
+19,90,65,7.5,101,70,low risk
+15,80,60,7.5,98,80,low risk
+60,90,65,7.5,98,77,low risk
+18,85,60,7.5,101,86,mid risk
+50,120,80,7.5,98,70,low risk
+19,90,70,7.5,98,80,low risk
+30,140,100,15,98,70,high risk
+31,120,60,6.1,98,76,low risk
+23,120,90,7.5,98,70,low risk
+29,130,70,7.5,98,78,mid risk
+17,85,60,7.5,102,86,low risk
+32,120,90,7.5,98,70,low risk
+42,120,80,7.5,98,70,low risk
+42,90,60,7.5,98,76,low risk
+19,120,80,7,98,70,low risk
+15,78,49,7.5,98,77,low risk
+23,120,75,8,98,70,mid risk
+48,120,80,11,98,88,high risk
+15,120,80,7.5,98,70,mid risk
+49,140,90,15,98,90,high risk
+25,140,100,7.5,98,80,high risk
+30,120,80,7.5,101,76,mid risk
+16,70,50,7.5,100,70,low risk
+16,100,70,7.5,98,80,low risk
+19,120,75,7.5,98,66,low risk
+40,160,100,19,98,77,high risk
+32,140,90,18,98,88,high risk
+22,100,65,7.5,98,70,low risk
+49,120,90,7.5,98,77,low risk
+28,90,60,7.5,98,82,low risk
+12,90,60,7.5,102,66,low risk
+20,100,90,7.5,98,88,low risk
+23,100,85,7.5,98,66,low risk
+22,120,90,7.5,98,82,low risk
+21,120,80,7.5,98,77,low risk
+35,140,100,7.5,98,66,high risk
+54,140,100,15,98,66,high risk
+40,120,95,11,98,80,mid risk
+21,75,50,7.5,98,60,low risk
+12,90,60,7.5,102,60,low risk
+60,120,85,15,98,60,mid risk
+55,140,95,19,98,77,high risk
+50,130,100,16,98,75,mid risk
+60,120,80,7.5,98,75,low risk
+55,100,65,7.5,98,66,low risk
+45,120,95,7.5,98,66,low risk
+35,100,70,7.5,98,66,low risk
+22,120,85,7.5,98,88,low risk
+13,90,65,7.5,101,80,low risk
+23,120,90,7.5,98,60,low risk
+17,90,65,7.5,103,67,low risk
+28,115,60,7.5,101,86,mid risk
+59,120,80,7.5,98,70,low risk
+29,120,70,9,98,80,high risk
+23,120,80,7.5,98,70,low risk
+31,120,60,6.1,98,76,mid risk
+23,120,80,7.5,98,70,mid risk
+29,130,70,7.5,98,78,mid risk
+17,85,60,7.5,102,86,low risk
+32,120,90,7.5,98,70,low risk
+42,120,80,7.5,98,70,low risk
+23,90,60,7.5,98,76,low risk
+19,120,80,7,98,70,low risk
+15,78,49,7.5,98,77,low risk
+20,120,75,7.5,98,70,low risk
+48,120,80,11,98,88,high risk
+15,120,80,7.5,98,70,low risk
+24,120,80,7.5,98,66,low risk
+16,100,70,7.5,98,80,low risk
+19,120,76,7.5,98,66,low risk
+40,160,100,19,98,77,high risk
+32,140,90,18,98,88,high risk
+22,100,65,7.5,98,70,mid risk
+49,120,90,7.5,98,77,mid risk
+28,90,60,7.5,98,82,mid risk
+12,90,60,7.5,102,66,mid risk
+20,100,90,7.5,98,88,mid risk
+23,100,85,7.5,98,66,mid risk
+22,120,90,7.5,98,82,mid risk
+21,120,80,7.5,98,77,mid risk
+35,140,100,7.5,98,66,high risk
+54,140,100,15,98,66,high risk
+40,120,95,11,98,80,high risk
+21,75,50,7.5,98,60,low risk
+22,90,60,7.5,102,60,high risk
+40,120,85,15,98,60,high risk
+55,140,95,19,98,77,high risk
+50,130,100,16,98,75,high risk
+60,120,80,7.5,98,75,mid risk
+40,120,85,15,98,60,high risk
+55,140,95,19,98,77,high risk
+50,130,100,16,98,75,mid risk
+41,120,80,7.5,98,75,low risk
+55,100,65,7.5,98,66,low risk
+45,120,95,7.5,98,66,low risk
+35,100,70,7.5,98,66,low risk
+22,120,85,7.5,98,88,low risk
+13,90,65,7.5,101,80,high risk
+23,120,90,7.5,98,60,low risk
+17,90,65,7.5,103,67,mid risk
+27,135,60,7.5,101,86,high risk
+50,120,80,15,98,70,high risk
+34,110,70,7,98,80,high risk
+32,120,80,7.5,98,70,low risk
+31,120,60,6.1,98,76,low risk
+23,120,90,7.5,98,70,low risk
+29,130,70,7.5,98,78,mid risk
+17,85,60,7.5,101,86,high risk
+32,120,90,7.5,98,70,low risk
+42,120,80,7.5,98,70,low risk
+23,90,60,7.5,98,76,low risk
+19,120,80,7,98,70,mid risk
+15,76,49,7.5,98,77,low risk
+20,120,76,7.5,98,70,low risk
+48,120,80,11,98,88,high risk
+15,120,80,7.5,98,70,low risk
+24,120,80,7.5,98,66,low risk
+22,100,65,12,98,80,high risk
+50,140,95,17,98,60,high risk
+35,100,70,11,98,60,high risk
+19,120,85,9,98,60,mid risk
+30,90,65,8,98,77,mid risk
+28,85,60,9,101,86,mid risk
+50,130,80,15,98,86,high risk
+35,140,90,13,98,70,high risk
+29,90,70,11,100,80,high risk
+19,120,60,7,98.4,70,low risk
+46,140,100,12,99,90,high risk
+28,95,60,10,101,86,high risk
+50,120,80,7,98,70,mid risk
+39,110,70,7.9,98,80,mid risk
+25,140,100,15,98.6,70,high risk
+31,120,60,6.1,98,76,low risk
+23,120,85,8,98,70,low risk
+29,130,70,8,98,78,mid risk
+17,90,60,9,102,86,mid risk
+32,120,90,7,100,70,mid risk
+42,120,90,9,98,70,mid risk
+23,90,60,6.7,98,76,low risk
+19,120,80,7,98,70,low risk
+15,76,68,7,98,77,low risk
+34,120,75,8,98,70,low risk
+48,120,80,11,98,88,high risk
+15,120,80,6.6,99,70,low risk
+27,140,90,15,98,90,high risk
+25,140,100,12,99,80,high risk
+36,120,90,7,98,82,mid risk
+30,120,80,9,101,76,mid risk
+15,70,50,6,98,70,mid risk
+40,120,95,7,98,70,high risk
+15,90,60,6,98,80,low risk
+21,90,50,6.9,98,60,low risk
+15,90,49,6,98,77,low risk
+21,90,50,6.5,98,60,low risk
+15,90,49,6,98,77,low risk
+15,90,49,6.7,99,77,low risk
+15,90,49,6,99,77,low risk
+10,100,50,6,99,70,mid risk
+15,100,49,6.8,99,77,low risk
+15,100,49,6,99,77,low risk
+12,100,50,6.4,98,70,mid risk
+15,100,60,6,98,80,low risk
+35,140,90,13,98,70,high risk
+29,90,70,8,100,80,high risk
+30,140,85,7,98,70,high risk
+23,140,80,7.01,98,70,high risk
+35,85,60,11,102,86,high risk
+42,130,80,18,98,70,high risk
+50,140,90,15,98,90,high risk
+25,140,100,7.01,98,80,high risk
+40,140,100,18,98,90,high risk
+32,140,100,6.9,98,78,high risk
+14,90,65,7,101,70,high risk
+37,120,90,11,98,88,high risk
+17,110,75,12,101,76,high risk
+40,120,90,12,98,80,high risk
+40,160,100,19,98,77,high risk
+20,120,76,7.5,98,70,low risk
+15,120,80,7.5,98,70,low risk
+24,120,80,7.5,98,66,low risk
+19,120,60,7,98.4,70,low risk
+31,120,60,6.1,98,76,low risk
+23,120,85,8,98,70,low risk
+23,90,60,6.7,98,76,low risk
+19,120,80,7,98,70,low risk
+15,76,68,7,98,77,low risk
+34,120,75,8,98,70,low risk
+15,120,80,6.6,99,70,low risk
+15,90,60,6,98,80,low risk
+21,90,50,6.9,98,60,low risk
+15,100,49,7.6,98,77,low risk
+12,100,50,6,98,70,mid risk
+21,100,50,6.8,98,60,low risk
+23,130,70,7.01,98,78,mid risk
+32,120,90,6.9,98,70,mid risk
+19,120,80,7,98,70,mid risk
+20,120,75,7.01,100,70,mid risk
+48,120,80,11,98,88,mid risk
+30,120,80,6.9,101,76,mid risk
+18,120,80,6.9,102,76,mid risk
+17,90,60,6.9,101,76,mid risk
+17,90,63,6.9,101,70,mid risk
+25,120,90,6.7,101,80,mid risk
+17,120,80,6.7,102,76,mid risk
+13,90,65,7.9,101,80,mid risk
+31,120,60,6.1,98,76,mid risk
+29,130,70,6.1,98,78,mid risk
+19,120,80,7,98,70,mid risk
+28,85,60,9,101,86,mid risk
+50,140,80,6.7,98,70,mid risk
+29,90,70,6.7,98,80,mid risk
+31,120,60,6.1,98,76,mid risk
+29,130,70,6.7,98,78,mid risk
+17,85,60,9,102,86,mid risk
+19,120,80,7,98,70,mid risk
+20,110,60,7,100,70,mid risk
+19,120,80,7,98,70,mid risk
+20,120,75,7.01,100,70,mid risk
+48,120,80,11,98,88,mid risk
+30,120,80,6.9,101,76,mid risk
+18,120,80,6.9,102,76,mid risk
+17,90,60,6.9,101,76,mid risk
+17,90,63,6.9,101,70,mid risk
+25,120,90,6.7,101,80,mid risk
+17,120,80,6.7,102,76,mid risk
+13,90,65,7.9,101,80,mid risk
+31,120,60,6.1,98,76,mid risk
+29,130,70,6.1,98,78,mid risk
+19,120,80,7,98,70,mid risk
+28,85,60,9,101,86,mid risk
+50,140,80,6.7,98,70,mid risk
+29,90,70,6.7,98,80,mid risk
+31,120,60,6.1,98,76,mid risk
+29,130,70,6.7,98,78,mid risk
+17,85,60,9,102,86,mid risk
+19,120,80,7,98,70,mid risk
+20,110,60,7,100,70,mid risk
+32,120,65,6,101,76,mid risk
+26,85,60,6,101,86,mid risk
+29,130,70,7.7,98,78,mid risk
+19,120,80,7,98,70,mid risk
+54,130,70,12,98,67,mid risk
+44,120,90,16,98,80,mid risk
+23,130,70,6.9,98,70,mid risk
+22,85,60,6.9,98,76,mid risk
+55,120,90,12,98,70,mid risk
+35,120,80,6.9,98,78,mid risk
+21,90,60,6.9,98,86,mid risk
+16,90,65,6.9,98,76,mid risk
+33,115,65,7,98,70,mid risk
+12,95,60,6.9,98,65,mid risk
+28,120,90,6.9,98,70,mid risk
+21,90,65,6.9,98,76,mid risk
+18,90,60,6.9,98,70,mid risk
+21,120,80,6.9,98,76,mid risk
+16,100,70,6.9,98,80,mid risk
+19,120,75,6.9,98,66,mid risk
+23,100,85,6.9,98,66,mid risk
+22,120,90,7.8,98,82,mid risk
+60,120,85,15,98,60,mid risk
+13,90,65,7.8,101,80,mid risk
+23,120,90,7.8,98,60,mid risk
+28,115,60,7.8,101,86,mid risk
+50,120,80,7.8,98,70,mid risk
+29,130,70,7.8,98,78,mid risk
+19,120,80,7,98,70,mid risk
+19,120,85,7.8,98,60,mid risk
+60,90,65,6.8,98,77,mid risk
+55,120,90,6.8,98,66,mid risk
+25,120,80,6.8,98,66,mid risk
+12,120,95,6.8,98,60,mid risk
+35,100,70,6.8,98,60,mid risk
+19,120,90,6.8,98,60,mid risk
+60,90,65,6.8,98,77,mid risk
+50,130,80,16,102,76,mid risk
+27,120,90,6.8,102,68,mid risk
+55,100,70,6.8,101,80,mid risk
+12,120,90,6.8,98,80,mid risk
+60,120,80,6.8,98,77,mid risk
+25,120,100,6.8,98,60,mid risk
+22,90,60,6.8,98,77,mid risk
+30,120,80,6.8,98,70,mid risk
+35,120,60,6.1,98,76,mid risk
+23,130,70,6.8,98,78,mid risk
+43,130,80,18,98,70,mid risk
+19,120,80,7,98,70,mid risk
+30,120,75,6.8,98,70,mid risk
+32,120,80,6.8,98,70,mid risk
+23,130,70,6.8,98,78,mid risk
+42,130,80,18,98,70,mid risk
+19,120,80,7,98,70,mid risk
+31,110,90,6.8,100,70,mid risk
+19,120,80,7,98,70,mid risk
+25,120,80,7.9,98,66,mid risk
+31,120,60,6.1,98,76,mid risk
+23,120,90,7.9,98,70,mid risk
+29,130,70,7.9,98,78,mid risk
+48,120,80,11,98,88,mid risk
+18,120,80,7.9,102,76,mid risk
+18,85,60,7.5,101,86,mid risk
+29,130,70,7.5,98,78,mid risk
+23,120,75,8,98,70,mid risk
+15,120,80,7.5,98,70,mid risk
+30,120,80,7.5,101,76,mid risk
+40,120,95,11,98,80,mid risk
+60,120,85,15,98,60,mid risk
+50,130,100,16,98,75,mid risk
+28,115,60,7.5,101,86,mid risk
+31,120,60,6.1,98,76,mid risk
+23,120,80,7.5,98,70,mid risk
+29,130,70,7.5,98,78,mid risk
+22,100,65,7.5,98,70,mid risk
+49,120,90,7.5,98,77,mid risk
+28,90,60,7.5,98,82,mid risk
+12,90,60,7.5,102,66,mid risk
+20,100,90,7.5,98,88,mid risk
+23,100,85,7.5,98,66,mid risk
+22,120,90,7.5,98,82,mid risk
+21,120,80,7.5,98,77,mid risk
+60,120,80,7.5,98,75,mid risk
+50,130,100,16,98,75,mid risk
+17,90,65,7.5,103,67,mid risk
+29,130,70,7.5,98,78,mid risk
+19,120,80,7,98,70,mid risk
+19,120,85,9,98,60,mid risk
+30,90,65,8,98,77,mid risk
+28,85,60,9,101,86,mid risk
+50,120,80,7,98,70,mid risk
+39,110,70,7.9,98,80,mid risk
+29,130,70,8,98,78,mid risk
+17,90,60,9,102,86,mid risk
+32,120,90,7,100,70,mid risk
+42,120,90,9,98,70,mid risk
+36,120,90,7,98,82,mid risk
+30,120,80,9,101,76,mid risk
+15,70,50,6,98,70,mid risk
+10,100,50,6,99,70,mid risk
+12,100,50,6.4,98,70,mid risk
+12,100,50,6,98,70,mid risk
+23,130,70,7.01,98,78,mid risk
+32,120,90,6.9,98,70,mid risk
+19,120,80,7,98,70,mid risk
+20,120,75,7.01,100,70,mid risk
+48,120,80,11,98,88,mid risk
+30,120,80,6.9,101,76,mid risk
+18,120,80,6.9,102,76,mid risk
+17,90,60,6.9,101,76,mid risk
+17,90,63,6.9,101,70,mid risk
+25,120,90,6.7,101,80,mid risk
+17,120,80,6.7,102,76,mid risk
+13,90,65,7.9,101,80,mid risk
+31,120,60,6.1,98,76,mid risk
+29,130,70,6.1,98,78,mid risk
+19,120,80,7,98,70,mid risk
+28,85,60,9,101,86,mid risk
+50,140,80,6.7,98,70,mid risk
+29,90,70,6.7,98,80,mid risk
+31,120,60,6.1,98,76,mid risk
+29,130,70,6.7,98,78,mid risk
+17,85,60,9,102,86,mid risk
+19,120,80,7,98,70,mid risk
+20,110,60,7,100,70,mid risk
+32,120,65,6,101,76,mid risk
+27,120,70,6.8,98,77,low risk
+27,120,70,6.8,98,77,low risk
+32,120,90,6.8,98,70,low risk
+23,99,60,6.8,98,76,low risk
+15,76,49,6.8,98,77,low risk
+15,120,80,6.8,98,70,low risk
+29,100,70,6.8,98,80,low risk
+35,120,60,6.1,98,76,low risk
+32,120,90,6.8,98,70,low risk
+23,90,60,6.8,98,76,low risk
+15,76,49,6.8,98,77,low risk
+20,120,75,6.8,98,70,low risk
+48,120,80,11,98,88,low risk
+15,120,80,6.8,98,70,low risk
+30,120,80,6.8,101,76,low risk
+18,120,80,6.8,102,76,low risk
+17,90,60,7.9,101,76,low risk
+15,76,49,7.9,98,77,low risk
+19,120,75,7.9,98,70,low risk
+48,120,80,11,98,88,low risk
+15,120,80,7.9,98,70,low risk
+22,100,65,7.9,98,80,low risk
+35,100,70,7.9,98,60,low risk
+19,120,85,7.9,98,60,low risk
+60,90,65,7.9,98,77,low risk
+50,120,80,7.9,98,70,low risk
+17,85,60,7.9,102,86,low risk
+32,120,90,7.9,98,70,low risk
+42,120,80,7.9,98,70,low risk
+23,90,60,7.9,98,76,low risk
+19,120,80,7,98,70,low risk
+15,76,49,7.9,98,77,low risk
+16,120,75,7.9,98,7,low risk
+15,120,80,7.9,98,70,low risk
+17,70,50,7.9,98,70,low risk
+17,90,60,7.5,101,76,low risk
+17,90,63,7.5,101,70,low risk
+25,120,90,7.5,101,80,low risk
+17,120,80,7.5,102,76,low risk
+19,90,65,7.5,101,70,low risk
+15,80,60,7.5,98,80,low risk
+60,90,65,7.5,98,77,low risk
+50,120,80,7.5,98,70,low risk
+19,90,70,7.5,98,80,low risk
+31,120,60,6.1,98,76,low risk
+23,120,90,7.5,98,70,low risk
+17,85,60,7.5,102,86,low risk
+32,120,90,7.5,98,70,low risk
+42,120,80,7.5,98,70,low risk
+42,90,60,7.5,98,76,low risk
+19,120,80,7,98,70,low risk
+15,78,49,7.5,98,77,low risk
+16,70,50,7.5,100,70,low risk
+16,100,70,7.5,98,80,low risk
+19,120,75,7.5,98,66,low risk
+22,100,65,7.5,98,70,low risk
+49,120,90,7.5,98,77,low risk
+28,90,60,7.5,98,82,low risk
+12,90,60,7.5,102,66,low risk
+20,100,90,7.5,98,88,low risk
+23,100,85,7.5,98,66,low risk
+22,120,90,7.5,98,82,low risk
+21,120,80,7.5,98,77,low risk
+21,75,50,7.5,98,60,low risk
+12,90,60,7.5,102,60,low risk
+60,120,80,7.5,98,75,low risk
+55,100,65,7.5,98,66,low risk
+45,120,95,7.5,98,66,low risk
+35,100,70,7.5,98,66,low risk
+22,120,85,7.5,98,88,low risk
+13,90,65,7.5,101,80,low risk
+23,120,90,7.5,98,60,low risk
+17,90,65,7.5,103,67,low risk
+59,120,80,7.5,98,70,low risk
+23,120,80,7.5,98,70,low risk
+17,85,60,7.5,102,86,low risk
+32,120,90,7.5,98,70,low risk
+42,120,80,7.5,98,70,low risk
+25,140,100,7.01,98,80,high risk
+40,140,100,18,98,90,high risk
+32,140,100,6.9,98,78,high risk
+14,90,65,7,101,70,high risk
+37,120,90,11,98,88,high risk
+17,110,75,12,101,76,high risk
+40,120,90,12,98,80,high risk
+40,160,100,19,98,77,high risk
+32,140,90,18,98,88,high risk
+12,90,60,7.9,102,66,high risk
+35,140,100,8,98,66,high risk
+54,140,100,15,98,66,high risk
+40,120,95,11,98,80,high risk
+60,120,85,15,98,60,high risk
+55,140,95,19,98,77,high risk
+50,130,100,16,98,75,high risk
+17,90,65,6.1,103,67,high risk
+28,83,60,8,101,86,high risk
+50,120,80,15,98,70,high risk
+17,85,60,9,102,86,high risk
+33,120,75,10,98,70,high risk
+48,120,80,11,98,88,high risk
+50,140,95,17,98,60,high risk
+30,140,100,15,98,70,high risk
+29,120,75,7.2,100,70,high risk
+48,120,80,11,98,88,high risk
+50,140,90,15,98,77,high risk
+25,140,100,7.2,98,80,high risk
+55,140,80,7.2,101,76,high risk
+40,140,100,18,98,77,high risk
+28,120,80,9,102,76,high risk
+32,140,100,8,98,70,high risk
+17,90,60,11,101,78,high risk
+17,90,63,8,101,70,high risk
+25,120,90,12,101,80,high risk
+17,120,80,7,102,76,high risk
+19,90,65,11,101,70,high risk
+37,120,90,11,98,88,high risk
+17,110,75,13,101,76,high risk
+25,120,90,15,98,80,high risk
+40,160,100,19,98,77,high risk
+32,140,90,18,98,88,high risk
+12,90,60,8,102,66,high risk
+35,140,100,9,98,66,high risk
+54,140,100,15,98,66,high risk
+40,120,95,11,98,80,high risk
+12,90,60,11,102,60,high risk
+60,120,85,15,98,60,high risk
+55,140,95,19,98,77,high risk
+50,130,100,16,98,76,high risk
+13,90,65,9,101,80,high risk
+17,90,65,7.7,103,67,high risk
+17,85,60,6.3,102,86,high risk
+40,120,75,7.7,98,70,high risk
+48,120,80,11,98,88,high risk
+22,120,60,15,98,80,high risk
+55,120,90,18,98,60,high risk
+35,85,60,19,98,86,high risk
+43,120,90,18,98,70,high risk
+32,120,65,6,101,76,mid risk
diff --git a/Maternal health Risk Prediction/app.py b/Maternal health Risk Prediction/app.py
new file mode 100644
index 00000000..513afb11
--- /dev/null
+++ b/Maternal health Risk Prediction/app.py
@@ -0,0 +1,117 @@
+import streamlit as st
+import joblib
+import pandas as pd
+
+# Load the trained XGBoost model
+model_xgb = joblib.load('xgb_model.pkl')
+
+# Function to make predictions
+def predict_risk_level(age, systolic_bp, diastolic_bp, bs, body_temp, heart_rate):
+ # Create a DataFrame for the input data
+ input_data = pd.DataFrame({
+ 'Age': [age],
+ 'SystolicBP': [systolic_bp],
+ 'DiastolicBP': [diastolic_bp],
+ 'BS': [bs],
+ 'BodyTemp': [body_temp],
+ 'HeartRate': [heart_rate]
+ })
+
+ # Predict using the loaded model
+ prediction_proba = model_xgb.predict_proba(input_data)[0]
+
+ # Determine risk level based on probability thresholds
+ low_risk_threshold = 0.33
+ mid_risk_threshold = 0.66
+
+ if prediction_proba[2] > mid_risk_threshold:
+ risk_level = 'High Maternal risk'
+ elif prediction_proba[1] > low_risk_threshold:
+ risk_level = 'Medium Maternal risk'
+ else:
+ risk_level = 'Low Maternal risk'
+
+ return risk_level
+
+# Streamlit app interface
+st.set_page_config(page_title="Maternal Risk Prediction", page_icon=":baby:", layout="wide")
+
+# Add a maternal-themed image as background with blur
+st.markdown("""
+
+ """, unsafe_allow_html=True)
+
+# Background image
+st.markdown("
", unsafe_allow_html=True)
+
+# Main title
+st.markdown("Maternal Risk Prediction
", unsafe_allow_html=True)
+
+
+# Input container with styling
+with st.container():
+ st.markdown("Enter the details below:
", unsafe_allow_html=True)
+
+ with st.container():
+ col1, col2 = st.columns(2)
+
+ with col1:
+ age = st.slider('Age', min_value=10, max_value=100, value=30, key='age')
+ systolic_bp = st.slider('Systolic BP', min_value=70, max_value=200, value=120, key='systolic_bp')
+ diastolic_bp = st.slider('Diastolic BP', min_value=50, max_value=120, value=80, key='diastolic_bp')
+ bs = st.slider('Blood Sugar', min_value=5.0, max_value=20.0, value=7.0, format="%.1f", key='bs')
+
+ with col2:
+ body_temp = st.slider('Body Temperature (Fahrenheit)', min_value=95.0, max_value=105.0, value=98.6,
+ format="%.1f", key='body_temp')
+ heart_rate = st.slider('Heart Rate', min_value=50, max_value=150, value=80, key='heart_rate')
+
+ st.markdown("
", unsafe_allow_html=True)
+
+ # Prediction button
+ if st.button('Predict Risk Level'):
+ risk_level = predict_risk_level(age, systolic_bp, diastolic_bp, bs, body_temp, heart_rate)
+
+ # Display the prediction with proper styling
+ with st.container():
+ if risk_level == 'Low Maternal risk':
+ st.success(f'**Predicted Risk Level:** {risk_level.upper()}')
+ elif risk_level == 'Medium Maternal risk':
+ st.warning(f'**Predicted Risk Level:** {risk_level.upper()}')
+ elif risk_level == 'High Maternal risk':
+ st.error(f'**Predicted Risk Level:** {risk_level.upper()}')
diff --git a/Maternal health Risk Prediction/images/bar plot of risk level after oversampling.png b/Maternal health Risk Prediction/images/bar plot of risk level after oversampling.png
new file mode 100644
index 00000000..1428b65e
Binary files /dev/null and b/Maternal health Risk Prediction/images/bar plot of risk level after oversampling.png differ
diff --git a/Maternal health Risk Prediction/images/bar plot of risk level.png b/Maternal health Risk Prediction/images/bar plot of risk level.png
new file mode 100644
index 00000000..8d640edc
Binary files /dev/null and b/Maternal health Risk Prediction/images/bar plot of risk level.png differ
diff --git a/Maternal health Risk Prediction/images/box plot of systolicBP by risk level.png b/Maternal health Risk Prediction/images/box plot of systolicBP by risk level.png
new file mode 100644
index 00000000..819d4aee
Binary files /dev/null and b/Maternal health Risk Prediction/images/box plot of systolicBP by risk level.png differ
diff --git a/Maternal health Risk Prediction/images/box_plot.png b/Maternal health Risk Prediction/images/box_plot.png
new file mode 100644
index 00000000..c4f0726b
Binary files /dev/null and b/Maternal health Risk Prediction/images/box_plot.png differ
diff --git a/Maternal health Risk Prediction/images/box_plot_unprocessed.png b/Maternal health Risk Prediction/images/box_plot_unprocessed.png
new file mode 100644
index 00000000..634c30ca
Binary files /dev/null and b/Maternal health Risk Prediction/images/box_plot_unprocessed.png differ
diff --git a/Maternal health Risk Prediction/images/cm_randomforest.png b/Maternal health Risk Prediction/images/cm_randomforest.png
new file mode 100644
index 00000000..1b8acb5d
Binary files /dev/null and b/Maternal health Risk Prediction/images/cm_randomforest.png differ
diff --git a/Maternal health Risk Prediction/images/confusion_matrix_gbm.png b/Maternal health Risk Prediction/images/confusion_matrix_gbm.png
new file mode 100644
index 00000000..64a35035
Binary files /dev/null and b/Maternal health Risk Prediction/images/confusion_matrix_gbm.png differ
diff --git a/Maternal health Risk Prediction/images/confusion_matrix_knn.png b/Maternal health Risk Prediction/images/confusion_matrix_knn.png
new file mode 100644
index 00000000..e8640230
Binary files /dev/null and b/Maternal health Risk Prediction/images/confusion_matrix_knn.png differ
diff --git a/Maternal health Risk Prediction/images/confusion_matrix_xgboost.png b/Maternal health Risk Prediction/images/confusion_matrix_xgboost.png
new file mode 100644
index 00000000..5e64f4a2
Binary files /dev/null and b/Maternal health Risk Prediction/images/confusion_matrix_xgboost.png differ
diff --git a/Maternal health Risk Prediction/images/correlation heatmap.png b/Maternal health Risk Prediction/images/correlation heatmap.png
new file mode 100644
index 00000000..de9eeb73
Binary files /dev/null and b/Maternal health Risk Prediction/images/correlation heatmap.png differ
diff --git a/Maternal health Risk Prediction/images/histogram of age.png b/Maternal health Risk Prediction/images/histogram of age.png
new file mode 100644
index 00000000..c6cd8389
Binary files /dev/null and b/Maternal health Risk Prediction/images/histogram of age.png differ
diff --git a/Maternal health Risk Prediction/images/line plot of avg BS by age.png b/Maternal health Risk Prediction/images/line plot of avg BS by age.png
new file mode 100644
index 00000000..195b4e3f
Binary files /dev/null and b/Maternal health Risk Prediction/images/line plot of avg BS by age.png differ
diff --git a/Maternal health Risk Prediction/images/model_comparison.png b/Maternal health Risk Prediction/images/model_comparison.png
new file mode 100644
index 00000000..505c6240
Binary files /dev/null and b/Maternal health Risk Prediction/images/model_comparison.png differ
diff --git a/Maternal health Risk Prediction/images/scatter_plot_BSvsAge.png b/Maternal health Risk Prediction/images/scatter_plot_BSvsAge.png
new file mode 100644
index 00000000..68eb4a49
Binary files /dev/null and b/Maternal health Risk Prediction/images/scatter_plot_BSvsAge.png differ
diff --git a/Maternal health Risk Prediction/images/scatter_plot_SBPVsDBP.png b/Maternal health Risk Prediction/images/scatter_plot_SBPVsDBP.png
new file mode 100644
index 00000000..f5b31074
Binary files /dev/null and b/Maternal health Risk Prediction/images/scatter_plot_SBPVsDBP.png differ
diff --git a/Maternal health Risk Prediction/images/violin_plot_of_heart_ratevs Risk level.png b/Maternal health Risk Prediction/images/violin_plot_of_heart_ratevs Risk level.png
new file mode 100644
index 00000000..88e49481
Binary files /dev/null and b/Maternal health Risk Prediction/images/violin_plot_of_heart_ratevs Risk level.png differ
diff --git a/Maternal health Risk Prediction/maternal_health_risk_prediction.ipynb b/Maternal health Risk Prediction/maternal_health_risk_prediction.ipynb
new file mode 100644
index 00000000..d47ebdf9
--- /dev/null
+++ b/Maternal health Risk Prediction/maternal_health_risk_prediction.ipynb
@@ -0,0 +1,2519 @@
+{
+ "nbformat": 4,
+ "nbformat_minor": 0,
+ "metadata": {
+ "colab": {
+ "provenance": []
+ },
+ "kernelspec": {
+ "name": "python3",
+ "display_name": "Python 3"
+ },
+ "language_info": {
+ "name": "python"
+ }
+ },
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "kqZhgJMut--e"
+ },
+ "outputs": [],
+ "source": [
+ "import pandas as pd\n",
+ "import numpy as np\n",
+ "import matplotlib.pyplot as plt\n",
+ "import seaborn as sns\n",
+ "import warnings\n",
+ "warnings.filterwarnings('ignore')\n",
+ "import plotly.express as px\n",
+ "import plotly.graph_objects as go"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "df=pd.read_csv('/content/Maternal Health Risk Data Set.csv')"
+ ],
+ "metadata": {
+ "id": "3ctp6U8xuRIp"
+ },
+ "execution_count": null,
+ "outputs": []
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "df.head()"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 206
+ },
+ "id": "EGM-fhIvuXjf",
+ "outputId": "cb0ffce8-e24b-4d7a-dd47-6e2cb6589b43"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ " Age SystolicBP DiastolicBP BS BodyTemp HeartRate RiskLevel\n",
+ "0 25 130 80 15.0 98.0 86 high risk\n",
+ "1 35 140 90 13.0 98.0 70 high risk\n",
+ "2 29 90 70 8.0 100.0 80 high risk\n",
+ "3 30 140 85 7.0 98.0 70 high risk\n",
+ "4 35 120 60 6.1 98.0 76 low risk"
+ ],
+ "text/html": [
+ "\n",
+ " \n",
+ "
\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Age | \n",
+ " SystolicBP | \n",
+ " DiastolicBP | \n",
+ " BS | \n",
+ " BodyTemp | \n",
+ " HeartRate | \n",
+ " RiskLevel | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " 25 | \n",
+ " 130 | \n",
+ " 80 | \n",
+ " 15.0 | \n",
+ " 98.0 | \n",
+ " 86 | \n",
+ " high risk | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " 35 | \n",
+ " 140 | \n",
+ " 90 | \n",
+ " 13.0 | \n",
+ " 98.0 | \n",
+ " 70 | \n",
+ " high risk | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " 29 | \n",
+ " 90 | \n",
+ " 70 | \n",
+ " 8.0 | \n",
+ " 100.0 | \n",
+ " 80 | \n",
+ " high risk | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " 30 | \n",
+ " 140 | \n",
+ " 85 | \n",
+ " 7.0 | \n",
+ " 98.0 | \n",
+ " 70 | \n",
+ " high risk | \n",
+ "
\n",
+ " \n",
+ " 4 | \n",
+ " 35 | \n",
+ " 120 | \n",
+ " 60 | \n",
+ " 6.1 | \n",
+ " 98.0 | \n",
+ " 76 | \n",
+ " low risk | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
\n",
+ "
\n",
+ "
\n"
+ ],
+ "application/vnd.google.colaboratory.intrinsic+json": {
+ "type": "dataframe",
+ "variable_name": "df",
+ "summary": "{\n \"name\": \"df\",\n \"rows\": 1014,\n \"fields\": [\n {\n \"column\": \"Age\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 13,\n \"min\": 10,\n \"max\": 70,\n \"num_unique_values\": 50,\n \"samples\": [\n 40,\n 43,\n 13\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"SystolicBP\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 18,\n \"min\": 70,\n \"max\": 160,\n \"num_unique_values\": 19,\n \"samples\": [\n 130,\n 110,\n 80\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"DiastolicBP\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 13,\n \"min\": 49,\n \"max\": 100,\n \"num_unique_values\": 16,\n \"samples\": [\n 80,\n 90,\n 89\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"BS\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 3.293531721151281,\n \"min\": 6.0,\n \"max\": 19.0,\n \"num_unique_values\": 29,\n \"samples\": [\n 6.5,\n 7.7,\n 7.1\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"BodyTemp\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1.3713843755995376,\n \"min\": 98.0,\n \"max\": 103.0,\n \"num_unique_values\": 8,\n \"samples\": [\n 100.0,\n 98.4,\n 98.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"HeartRate\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 8,\n \"min\": 7,\n \"max\": 90,\n \"num_unique_values\": 16,\n \"samples\": [\n 86,\n 70,\n 77\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"RiskLevel\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"high risk\",\n \"low risk\",\n \"mid risk\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}"
+ }
+ },
+ "metadata": {},
+ "execution_count": 23
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "df.info()"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "xrtLbXFmuaQH",
+ "outputId": "48925481-5e99-40bd-aa91-56e935c81592"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "\n",
+ "RangeIndex: 1014 entries, 0 to 1013\n",
+ "Data columns (total 7 columns):\n",
+ " # Column Non-Null Count Dtype \n",
+ "--- ------ -------------- ----- \n",
+ " 0 Age 1014 non-null int64 \n",
+ " 1 SystolicBP 1014 non-null int64 \n",
+ " 2 DiastolicBP 1014 non-null int64 \n",
+ " 3 BS 1014 non-null float64\n",
+ " 4 BodyTemp 1014 non-null float64\n",
+ " 5 HeartRate 1014 non-null int64 \n",
+ " 6 RiskLevel 1014 non-null object \n",
+ "dtypes: float64(2), int64(4), object(1)\n",
+ "memory usage: 55.6+ KB\n"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "df.describe()"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 300
+ },
+ "id": "0t-G0R62udqd",
+ "outputId": "3f18771e-79eb-43f2-f8f1-c402cf6a0c0e"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ " Age SystolicBP DiastolicBP BS BodyTemp \\\n",
+ "count 1014.000000 1014.000000 1014.000000 1014.000000 1014.000000 \n",
+ "mean 29.871795 113.198225 76.460552 8.725986 98.665089 \n",
+ "std 13.474386 18.403913 13.885796 3.293532 1.371384 \n",
+ "min 10.000000 70.000000 49.000000 6.000000 98.000000 \n",
+ "25% 19.000000 100.000000 65.000000 6.900000 98.000000 \n",
+ "50% 26.000000 120.000000 80.000000 7.500000 98.000000 \n",
+ "75% 39.000000 120.000000 90.000000 8.000000 98.000000 \n",
+ "max 70.000000 160.000000 100.000000 19.000000 103.000000 \n",
+ "\n",
+ " HeartRate \n",
+ "count 1014.000000 \n",
+ "mean 74.301775 \n",
+ "std 8.088702 \n",
+ "min 7.000000 \n",
+ "25% 70.000000 \n",
+ "50% 76.000000 \n",
+ "75% 80.000000 \n",
+ "max 90.000000 "
+ ],
+ "text/html": [
+ "\n",
+ " \n",
+ "
\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Age | \n",
+ " SystolicBP | \n",
+ " DiastolicBP | \n",
+ " BS | \n",
+ " BodyTemp | \n",
+ " HeartRate | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " count | \n",
+ " 1014.000000 | \n",
+ " 1014.000000 | \n",
+ " 1014.000000 | \n",
+ " 1014.000000 | \n",
+ " 1014.000000 | \n",
+ " 1014.000000 | \n",
+ "
\n",
+ " \n",
+ " mean | \n",
+ " 29.871795 | \n",
+ " 113.198225 | \n",
+ " 76.460552 | \n",
+ " 8.725986 | \n",
+ " 98.665089 | \n",
+ " 74.301775 | \n",
+ "
\n",
+ " \n",
+ " std | \n",
+ " 13.474386 | \n",
+ " 18.403913 | \n",
+ " 13.885796 | \n",
+ " 3.293532 | \n",
+ " 1.371384 | \n",
+ " 8.088702 | \n",
+ "
\n",
+ " \n",
+ " min | \n",
+ " 10.000000 | \n",
+ " 70.000000 | \n",
+ " 49.000000 | \n",
+ " 6.000000 | \n",
+ " 98.000000 | \n",
+ " 7.000000 | \n",
+ "
\n",
+ " \n",
+ " 25% | \n",
+ " 19.000000 | \n",
+ " 100.000000 | \n",
+ " 65.000000 | \n",
+ " 6.900000 | \n",
+ " 98.000000 | \n",
+ " 70.000000 | \n",
+ "
\n",
+ " \n",
+ " 50% | \n",
+ " 26.000000 | \n",
+ " 120.000000 | \n",
+ " 80.000000 | \n",
+ " 7.500000 | \n",
+ " 98.000000 | \n",
+ " 76.000000 | \n",
+ "
\n",
+ " \n",
+ " 75% | \n",
+ " 39.000000 | \n",
+ " 120.000000 | \n",
+ " 90.000000 | \n",
+ " 8.000000 | \n",
+ " 98.000000 | \n",
+ " 80.000000 | \n",
+ "
\n",
+ " \n",
+ " max | \n",
+ " 70.000000 | \n",
+ " 160.000000 | \n",
+ " 100.000000 | \n",
+ " 19.000000 | \n",
+ " 103.000000 | \n",
+ " 90.000000 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
\n",
+ "
\n",
+ "
\n"
+ ],
+ "application/vnd.google.colaboratory.intrinsic+json": {
+ "type": "dataframe",
+ "summary": "{\n \"name\": \"df\",\n \"rows\": 8,\n \"fields\": [\n {\n \"column\": \"Age\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 348.54126044861886,\n \"min\": 10.0,\n \"max\": 1014.0,\n \"num_unique_values\": 8,\n \"samples\": [\n 29.871794871794872,\n 26.0,\n 1014.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"SystolicBP\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 325.7381080591285,\n \"min\": 18.403912756342706,\n \"max\": 1014.0,\n \"num_unique_values\": 7,\n \"samples\": [\n 1014.0,\n 113.19822485207101,\n 120.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"DiastolicBP\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 335.61546340338174,\n \"min\": 13.885795724160687,\n \"max\": 1014.0,\n \"num_unique_values\": 8,\n \"samples\": [\n 76.46055226824457,\n 80.0,\n 1014.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"BS\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 355.5316275877343,\n \"min\": 3.293531721151281,\n \"max\": 1014.0,\n \"num_unique_values\": 8,\n \"samples\": [\n 8.725986193293886,\n 7.5,\n 1014.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"BodyTemp\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 330.2234922746751,\n \"min\": 1.3713843755995376,\n \"max\": 1014.0,\n \"num_unique_values\": 5,\n \"samples\": [\n 98.66508875739645,\n 103.0,\n 1.3713843755995376\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"HeartRate\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 339.57400097574833,\n \"min\": 7.0,\n \"max\": 1014.0,\n \"num_unique_values\": 8,\n \"samples\": [\n 74.30177514792899,\n 76.0,\n 1014.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}"
+ }
+ },
+ "metadata": {},
+ "execution_count": 25
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "df.isna().sum()"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "i3bRp6SLugPc",
+ "outputId": "fd958808-59b4-4ec0-da37-f6d1c585995c"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "Age 0\n",
+ "SystolicBP 0\n",
+ "DiastolicBP 0\n",
+ "BS 0\n",
+ "BodyTemp 0\n",
+ "HeartRate 0\n",
+ "RiskLevel 0\n",
+ "dtype: int64"
+ ]
+ },
+ "metadata": {},
+ "execution_count": 26
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "df.shape"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "pl6dOvQNujF6",
+ "outputId": "2c6b98b9-83bd-42c0-c422-e05b4c3b9c90"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "(1014, 7)"
+ ]
+ },
+ "metadata": {},
+ "execution_count": 27
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "# Printing unique values in each column\n",
+ "for column in df.columns:\n",
+ " unique_values = df[column].unique()\n",
+ " print(f\"Unique values in '{column}': {unique_values}\")"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "NzkKeD0Ju1XD",
+ "outputId": "7156f24b-6d62-431d-918c-6f6f9c411d0b"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "Unique values in 'Age': [25 35 29 30 23 32 42 19 20 48 15 50 10 40 21 18 16 22 49 28 12 60 55 45\n",
+ " 31 17 26 54 44 33 13 34 38 39 63 14 37 51 62 43 65 66 56 70 27 36 59 24\n",
+ " 41 46]\n",
+ "Unique values in 'SystolicBP': [130 140 90 120 85 110 70 100 75 95 76 80 115 135 160 129 83 99\n",
+ " 78]\n",
+ "Unique values in 'DiastolicBP': [ 80 90 70 85 60 89 75 100 50 65 95 49 63 69 76 68]\n",
+ "Unique values in 'BS': [15. 13. 8. 7. 6.1 7.01 11. 6.9 18. 6.7 7.5 7.2\n",
+ " 7.1 6.4 9. 6. 7.7 12. 16. 7.8 6.8 7.9 17. 19.\n",
+ " 10. 6.3 6.6 6.5 7.6 ]\n",
+ "Unique values in 'BodyTemp': [ 98. 100. 102. 101. 103. 98.4 99. 98.6]\n",
+ "Unique values in 'HeartRate': [86 70 80 76 78 77 88 90 66 82 60 75 67 65 68 7]\n",
+ "Unique values in 'RiskLevel': ['high risk' 'low risk' 'mid risk']\n"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "# 1. Histogram of Age\n",
+ "fig1 = px.histogram(df, x=\"Age\", title=\"Histogram of Age\")\n",
+ "fig1.show()"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 542
+ },
+ "id": "GE6G6oZOu4Sw",
+ "outputId": "49b75c20-f29f-4fd4-a093-5a0ee1c3852a"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "\n",
+ " \n",
+ "\n",
+ ""
+ ]
+ },
+ "metadata": {}
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "# 2. Box Plot of SystolicBP by RiskLevel\n",
+ "fig2 = px.box(df, x=\"RiskLevel\", y=\"SystolicBP\", title=\"Box Plot of SystolicBP by Risk Level\")\n",
+ "fig2.show()"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 542
+ },
+ "id": "Bec2efz1vZQF",
+ "outputId": "3a8c797f-bd66-4efd-93b3-67d1994cf2fe"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "\n",
+ " \n",
+ "\n",
+ ""
+ ]
+ },
+ "metadata": {}
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "# 3. Scatter Plot of SystolicBP vs DiastolicBP\n",
+ "fig3 = px.scatter(df, x=\"SystolicBP\", y=\"DiastolicBP\", color=\"RiskLevel\", title=\"Scatter Plot of SystolicBP vs DiastolicBP\")\n",
+ "fig3.show()"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 542
+ },
+ "id": "SxjjsLt6vd9Z",
+ "outputId": "07b9dda5-cd9f-4733-96d1-65231c8a7b9c"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "\n",
+ " \n",
+ "\n",
+ ""
+ ]
+ },
+ "metadata": {}
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "# 4. Scatter Plot of BS vs Age\n",
+ "fig4 = px.scatter(df, x=\"Age\", y=\"BS\", color=\"RiskLevel\", title=\"Scatter Plot of BS vs Age\")\n",
+ "fig4.show()"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 542
+ },
+ "id": "Yi2EKDZBvhg-",
+ "outputId": "081ae2a8-aa73-4d7e-8d07-247a9078931c"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "\n",
+ " \n",
+ "\n",
+ ""
+ ]
+ },
+ "metadata": {}
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "# 5. Violin Plot of HeartRate by RiskLevel\n",
+ "fig5 = px.violin(df, y=\"HeartRate\", x=\"RiskLevel\", box=True, points=\"all\", title=\"Violin Plot of Heart Rate by Risk Level\")\n",
+ "fig5.show()"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 542
+ },
+ "id": "w7osC9w-vmNa",
+ "outputId": "b62eb498-4b64-4623-fe45-2710ebb43d3c"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "\n",
+ " \n",
+ "\n",
+ ""
+ ]
+ },
+ "metadata": {}
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "# 6. Line Plot of Average BS by Age\n",
+ "avg_bs_by_age = df.groupby('Age')['BS'].mean().reset_index()\n",
+ "fig7 = px.line(avg_bs_by_age, x='Age', y='BS', title=\"Line Plot of Average BS by Age\")\n",
+ "fig7.show()"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 542
+ },
+ "id": "nFpFXOPKvqQL",
+ "outputId": "bb3ba357-30ea-4e32-a1e7-53f5c3fa6293"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "\n",
+ " \n",
+ "\n",
+ ""
+ ]
+ },
+ "metadata": {}
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "# 7. Bar Plot of RiskLevel\n",
+ "risk_counts = df['RiskLevel'].value_counts().reset_index()\n",
+ "risk_counts.columns = ['RiskLevel', 'count']\n",
+ "fig7 = px.bar(risk_counts, x='RiskLevel', y='count', title=\"Bar Plot of Risk Level\")\n",
+ "fig7.update_xaxes(title=\"Risk Level\")\n",
+ "fig7.update_yaxes(title=\"Count\")\n",
+ "fig7.show()"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 542
+ },
+ "id": "L0F-a-bhv4lj",
+ "outputId": "9a32f418-d3d3-4ba7-a7b4-f78987e7d9ca"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "\n",
+ " \n",
+ "\n",
+ ""
+ ]
+ },
+ "metadata": {}
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "# Print the counts\n",
+ "print(risk_counts)"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "Flou_5gow0_9",
+ "outputId": "adf0d8d4-da42-484e-e65c-92544ecb8138"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ " RiskLevel count\n",
+ "0 low risk 406\n",
+ "1 mid risk 336\n",
+ "2 high risk 272\n"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "from imblearn.over_sampling import SMOTE\n",
+ "from sklearn.preprocessing import LabelEncoder\n",
+ "\n",
+ "# Encode the 'RiskLevel' column\n",
+ "le = LabelEncoder()\n",
+ "df['RiskLevel'] = le.fit_transform(df['RiskLevel'])\n",
+ "\n",
+ "# Separate features and target\n",
+ "X = df.drop(columns=['RiskLevel'])\n",
+ "y = df['RiskLevel']\n",
+ "\n",
+ "# Apply SMOTE\n",
+ "smote = SMOTE()\n",
+ "X_resampled, y_resampled = smote.fit_resample(X, y)\n",
+ "\n",
+ "# Decode the resampled target\n",
+ "df = X_resampled.copy()\n",
+ "df['RiskLevel'] = le.inverse_transform(y_resampled)\n",
+ "\n",
+ "# Count the unique values in 'RiskLevel' after oversampling\n",
+ "risk_counts_resampled = df['RiskLevel'].value_counts().reset_index()\n",
+ "risk_counts_resampled.columns = ['RiskLevel', 'count']\n",
+ "\n",
+ "# Print the counts\n",
+ "print(risk_counts_resampled)\n",
+ "\n",
+ "# 6. Bar Plot of RiskLevel after oversampling\n",
+ "fig6 = px.bar(risk_counts_resampled, x='RiskLevel', y='count', title=\"Bar Plot of Risk Level After Oversampling\")\n",
+ "fig6.update_xaxes(title=\"Risk Level\")\n",
+ "fig6.update_yaxes(title=\"Count\")\n",
+ "fig6.show()"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 611
+ },
+ "id": "EReSNRtSw91f",
+ "outputId": "5a889143-417e-4323-f00a-e8e92752d7a2"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ " RiskLevel count\n",
+ "0 high risk 406\n",
+ "1 low risk 406\n",
+ "2 mid risk 406\n"
+ ]
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "\n",
+ " \n",
+ "\n",
+ ""
+ ]
+ },
+ "metadata": {}
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "# Encode the 'RiskLevel' column\n",
+ "le = LabelEncoder()\n",
+ "df['RiskLevel'] = le.fit_transform(df['RiskLevel'])"
+ ],
+ "metadata": {
+ "id": "6_wWpUVLyygZ"
+ },
+ "execution_count": null,
+ "outputs": []
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "df.head()"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 206
+ },
+ "id": "nTtRgFI8gw-_",
+ "outputId": "7ba229a4-6bc3-4042-e939-395a0c033a9f"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ " Age SystolicBP DiastolicBP BS BodyTemp HeartRate RiskLevel\n",
+ "0 25 130 80 15.0 98.0 86 0\n",
+ "1 35 140 90 13.0 98.0 70 0\n",
+ "2 29 90 70 8.0 100.0 80 0\n",
+ "3 30 140 85 7.0 98.0 70 0\n",
+ "4 35 120 60 6.1 98.0 76 1"
+ ],
+ "text/html": [
+ "\n",
+ " \n",
+ "
\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Age | \n",
+ " SystolicBP | \n",
+ " DiastolicBP | \n",
+ " BS | \n",
+ " BodyTemp | \n",
+ " HeartRate | \n",
+ " RiskLevel | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " 25 | \n",
+ " 130 | \n",
+ " 80 | \n",
+ " 15.0 | \n",
+ " 98.0 | \n",
+ " 86 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " 1 | \n",
+ " 35 | \n",
+ " 140 | \n",
+ " 90 | \n",
+ " 13.0 | \n",
+ " 98.0 | \n",
+ " 70 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " 29 | \n",
+ " 90 | \n",
+ " 70 | \n",
+ " 8.0 | \n",
+ " 100.0 | \n",
+ " 80 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " 30 | \n",
+ " 140 | \n",
+ " 85 | \n",
+ " 7.0 | \n",
+ " 98.0 | \n",
+ " 70 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " 4 | \n",
+ " 35 | \n",
+ " 120 | \n",
+ " 60 | \n",
+ " 6.1 | \n",
+ " 98.0 | \n",
+ " 76 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
\n",
+ "
\n",
+ "
\n"
+ ],
+ "application/vnd.google.colaboratory.intrinsic+json": {
+ "type": "dataframe",
+ "variable_name": "df",
+ "summary": "{\n \"name\": \"df\",\n \"rows\": 1218,\n \"fields\": [\n {\n \"column\": \"Age\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 13,\n \"min\": 10,\n \"max\": 70,\n \"num_unique_values\": 54,\n \"samples\": [\n 28,\n 46,\n 41\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"SystolicBP\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 18,\n \"min\": 70,\n \"max\": 160,\n \"num_unique_values\": 30,\n \"samples\": [\n 122,\n 129,\n 128\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"DiastolicBP\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 14,\n \"min\": 49,\n \"max\": 100,\n \"num_unique_values\": 29,\n \"samples\": [\n 91,\n 62,\n 63\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"BS\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 3.5563601902629047,\n \"min\": 6.0,\n \"max\": 19.0,\n \"num_unique_values\": 114,\n \"samples\": [\n 8.005702919151267,\n 6.1,\n 7.6525385267807815\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"BodyTemp\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1.396702331767838,\n \"min\": 98.0,\n \"max\": 103.0,\n \"num_unique_values\": 40,\n \"samples\": [\n 99.62208840265713,\n 100.23717269342228,\n 98.23667547310149\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"HeartRate\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 8,\n \"min\": 7,\n \"max\": 90,\n \"num_unique_values\": 24,\n \"samples\": [\n 66,\n 73,\n 86\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"RiskLevel\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0,\n \"min\": 0,\n \"max\": 2,\n \"num_unique_values\": 3,\n \"samples\": [\n 0,\n 1,\n 2\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}"
+ }
+ },
+ "metadata": {},
+ "execution_count": 39
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "# Plot the initial box plots\n",
+ "plt.figure(figsize=(15, 10))\n",
+ "for i, column in enumerate(df.columns[:-1], 1):\n",
+ " plt.subplot(2, 3, i)\n",
+ " sns.boxplot(y=df[column])\n",
+ " plt.title(column)\n",
+ "plt.tight_layout()\n",
+ "plt.show()"
+ ],
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 691
+ },
+ "id": "gWhuE_aKh1ee",
+ "outputId": "c39c3bfa-4a8e-422f-e176-2ef7ea7caac7"
+ },
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ "