-
-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #983 from Stuti333/feature/Stuti
Groundwater Arsenic Content Detection
- Loading branch information
Showing
7 changed files
with
1,735 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
Groundwater Arsenic Content Detection | ||
|
||
🎯 Goal | ||
To develop an accurate prediction model for arsenic contamination in groundwater using a hybrid approach that combines Artificial Neural Networks (ANN) with the Whale Optimization Algorithm (WOA) and also using third method random forest classifier. This project aims to help water management authorities and public health officials identify potential arsenic contamination risks before they pose a threat to human health. | ||
|
||
🧵 Dataset | ||
The dataset contains groundwater quality parameters collected from various locations, including: | ||
|
||
Arsenic concentration levels | ||
Environmental parameters | ||
Geological factors | ||
Chemical composition indicators | ||
|
||
🧾 Description | ||
This project addresses the critical issue of arsenic contamination in groundwater through advanced machine learning techniques. By combining the predictive power of Backpropagation Neural Networks (BPNN) with the optimization capabilities of the Whale Optimization Algorithm (WOA), we create a robust system for predicting arsenic levels in groundwater. This hybrid approach allows for better understanding of the complex relationships between environmental factors and arsenic contamination. | ||
|
||
🧮 What I had done! | ||
|
||
Data Collection and Preprocessing | ||
|
||
Gathered groundwater quality parameters from various locations | ||
Performed data cleaning and handled missing values | ||
Normalized the data for better model performance | ||
Split the dataset into training and testing sets | ||
|
||
|
||
Model Development | ||
|
||
Implemented BPNN architecture | ||
Integrated WOA for neural network optimization | ||
Fine-tuned hyperparameters for both algorithms | ||
Implemented random forest classifier | ||
|
||
|
||
Model Evaluation | ||
|
||
Conducted performance analysis using multiple metrics | ||
Compared BPNN and WOA-optimized results | ||
Analyzed feature importance | ||
|
||
|
||
Visualization and Reporting | ||
|
||
Created visualizations for data analysis | ||
Generated performance comparison charts | ||
Documented findings and recommendations | ||
|
||
|
||
|
||
🚀 Models Implemented | ||
|
||
Backpropagation Neural Network (BPNN) | ||
|
||
Chosen for its ability to learn complex patterns in data | ||
Effective for regression problems | ||
Capable of handling multiple input parameters | ||
|
||
|
||
Whale Optimization Algorithm (WOA) | ||
|
||
Selected for its proven optimization capabilities | ||
Helps avoid local optima problems | ||
Efficient in optimizing neural network weights and biases | ||
|
||
|
||
Hybrid BPNN-WOA Model | ||
|
||
Combines the strengths of both algorithms | ||
Improves prediction accuracy | ||
Reduces overfitting risks | ||
|
||
Random Forest Classifier | ||
Another algorith with good accuracy to check the groundwater quality. | ||
|
||
📚 Libraries Needed | ||
|
||
TensorFlow/Keras (Neural Network Implementation) | ||
NumPy (Numerical Computations) | ||
Pandas (Data Manipulation) | ||
Scikit-learn (Model Evaluation) | ||
Matplotlib (Visualization) | ||
SciPy (Scientific Computing) | ||
|
||
📊 Exploratory Data Analysis Results | ||
![RMSE Graph](https://github.com/user-attachments/assets/00e3cecb-af37-428b-b00d-6d6b4c3e5b19) | ||
![Loss and accuracy](https://github.com/user-attachments/assets/ffc4b37e-f58d-4d20-b1a9-b0a213514d61) | ||
|
||
|
||
Correlation matrix of features | ||
Distribution of arsenic levels | ||
Geographical distribution of sampling points | ||
Feature importance plots | ||
Model performance comparisons | ||
|
||
📈 Performance of the Models based on the Accuracy Scores | ||
|
||
ANN Model: | ||
|
||
Mean Squared Error (MSE): 0.14 | ||
Accuracy:72.97 | ||
Root Mean Squared Error (RMSE): 0.38 | ||
|
||
|
||
WOA-Optimized ANN: | ||
|
||
Mean Squared Error (MSE): 0.12 | ||
Accuracy: 83.78 | ||
Root Mean Squared Error (RMSE): 0.32 | ||
|
||
Rainforest Classifier: | ||
|
||
Mean Squared Error (MSE): 0.20 | ||
Root Mean Squared Error (RMSE): 0.50 | ||
|
||
|
||
📢 Conclusion | ||
The hybrid BPNN-WOA approach demonstrates superior performance in predicting groundwater arsenic levels compared to traditional methods. Key findings include: | ||
|
||
Improved prediction accuracy by 13% using the hybrid approach | ||
Identification of key environmental factors influencing arsenic levels | ||
Potential for real-world application in water quality monitoring | ||
Recommendation for implementation in groundwater management systems | ||
|
||
✒️ Your Signature | ||
Stuti Sharma | ||
|
||
GitHub: https://github.com/Stuti333 | ||
|
||
LinkedIn: https://www.linkedin.com/in/stuti-sharma-94057122b/ | ||
|
||
Email: [email protected] |
134 changes: 134 additions & 0 deletions
134
Groundwater Arsenic Content Detection/data/Ground Water .csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
Station Code,Station Name,STATE,Temperature Min,Temperature Max,pH Min,pH Max,Conductivity (µmhos/cm) Min,Conductivity (µmhos/cm) Max,BOD min(mg/L),BOD max(mg/L),Nitrate N min(mg/L),NitrateN max(mg/L) ,Faecal Coliform min (MPN/100ml),Faecal Coliform max(MPN/100ml),Total Coliformmin (MPN/100ml),Total Coliform max (MPN/100ml),Total Dissolved Solidsmin (mg/L),Total Dissolved Solids max(mg/L),Fluoride min(mg/L),Fluoride max (mg/L),Arsenic min (mg/L),Arsenic max (mg/L),Average arsenic(mg/L) | ||
3093,"BORE WELL AT ALLADAPALEM | ||
VILLAGE, PYDIBHIMAVARAM",ANDHRA PRADESH,29,30,7.3,7.4,840,1481,2,2.1,0.9,16.75,2,4,64,75,584,980,0.4,0.8,0.001,0.001,0.001 | ||
3092,"BORE WELL AT ARINAMA | ||
AKKIVALASA, SRIKAKULAM",ANDHRA PRADESH,28,31,7.4,8.1,712,1139,2,2.4,0.9,7.95,3,4,64,75,492,754,1,1.1,0.001,0.001,0.001 | ||
4360,"BORE WELL AT IDA, | ||
RAMANAYYAPETA, KKAINADA",ANDHRA PRADESH,27,29,7.7,7.8,990,1280,1.8,2,1,3.48,2,7,75,93,660,868,0.4,0.4,0.007,0.009,0.005 | ||
3091,"BORE WELL AT KAPULUPPADA | ||
DUMPSITE, VISHAKHAPATNAM",ANDHRA PRADESH,26,26,7,7.1,3340,4260,2.2,3.6,4.9,41.6,4,7,93,93,2320,2832,0.8,1.1,0.001,0.001,0.004 | ||
4353,"BORE WELL AT MANGARAJU | ||
HOUSE, GAJAPATHINAGARAM | ||
VILLAGE, PAYAKARAOPETA (M)",ANDHRA PRADESH,25,27,7.9,8.1,2660,3940,1.4,2.7,3,46.25,3,4,63,93,1844,2640,0.4,0.5,0.001,0.001,0.001 | ||
3087,"BORE WELL NEAR VILLAGE | ||
SECRETARIAT, PATHAPADU (V)",ANDHRA PRADESH,24,27,7.5,7.8,2031,2050,1.4,1.8,0.97,7.1,3,3,21,28,1210,1218,0.4,1,0.001,0.001,0.001 | ||
4355,"BORE WELL, CHIPPADA VILLAGE, | ||
BHEEMUNIPATNAM (M)",ANDHRA PRADESH,25,27,7.9,8,660,1482,2.2,2.2,2.05,3.6,4,7,43,120,442,980,0.4,1.4,0.001,0.001,0.001 | ||
4354,"BORE WELL, SRI NOOKATATA | ||
TEMPLE RAJAYYAPETA VILLAGE, | ||
NAKKAPALLI (M)",ANDHRA PRADESH,25,27,7.4,7.6,11120,11420,2.2,2.5,2.2,15.4,7,9,120,150,7340,7968,0.3,0.7,0.001,0.001,0.001 | ||
4394,"BOREWELL AT APLLC OFFICE | ||
INDUSTRIAL ESTATE GROWTH | ||
CENTRE, THUMAKUNTA, | ||
HINDUPUR (M)",ANDHRA PRADESH,26,28,6.9,7.1,1584,3239,1,1,5.8,7.9,2,4,2,21,901,1764,0.6,1.3,0.001,0.001,0.001 | ||
4395,"BOREWELL AT APLLC OFFICE | ||
INDUSTRIAL ESTATE, | ||
ANANTAPURAM (M)",ANDHRA PRADESH,26,28,7,7.1,3558,3780,1,1,10.4,11.4,2,6,2,33,1868,2144,0.5,1.5,0.001,0.001,0.001 | ||
4377,"BOREWELL AT IMITATION | ||
JEWELLARY PARK, | ||
MACHILIPTNAM",ANDHRA PRADESH,27,27,8.1,8.1,1896,1920,1.4,1.8,0.3,2.8,3,3,14,21,1158,1170,0.8,0.9,0.001,0.001,0.001 | ||
1519,BOREWELL AT NAGIRI,ANDHRA PRADESH,28,29,7.1,7.3,1872,2741,1,1,5.2,6.8,2,4,2,16,1061,1361,0.5,0.5,0.001,0.001,0.001 | ||
1518,"BOREWELL AT NANDYAL | ||
(KUNDU)",ANDHRA PRADESH,23,27,7.2,7.3,6619,7770,1,1,5.8,6.2,2,2,2,14,4068,4413,1,1.1,0.001,0.001,0.001 | ||
4364,"BOREWELL AT RAJIV GRUHA | ||
KA;PA, NEAR AP PAPER MAILLS | ||
WORKERS COLONY,",ANDHRA PRADESH,28,28,7.6,7.6,1048,1048,1.5,1.5,3.22,3.22,3,3,93,93,680,680,0.7,0.7,0.001,0.001,0.001 | ||
,"MALLAYAPETA, KATHERU, | ||
RAJAMAHENDRAVARAM",,,,,,,,2.4,2.4,8,8,4,4,93,93,746,746,0.8,0.8,0.002,0.003,0.002 | ||
4350,"BOREWELL AT ZP HIGH SCHOOL, | ||
UDDANAM REGION, | ||
AMALAPADU (V) | ||
VAJRAPUKOTTURU",ANDHRA PRADESH,24,24,7.1,7.1,1140,1140,2,2.2,5.2,7.41,3,3,23,28,5634,6600,1.4,1.7,0.001,0.001,0.0015 | ||
4384,"BOREWELL IN FRONT OF M/S | ||
BHAGEERADHA CHEMICALS & | ||
INDUSTRIES LTD, | ||
CHERUVUKOMMUPALEM (V) | ||
ONGOLE (M)",ANDHRA PRADESH,22,23,7.2,7.3,9090,10500,1.4,1.8,0.3,0.7,3,3,21,39,1120,1160,0.3,0.3,0.001,0.001,0.001 | ||
1513,"BOREWELL KRISHNA MURTHY, | ||
D.NO. 48-16-43 AUTONAGAR | ||
VIJJAYAWADA",ANDHRA PRADESH,25,25,7.1,7.8,1877,1970,2,2,0.79,1.1,4,7,75,93,212,988,0.2,1.1,0.001,0.001,0.001 | ||
1523,"BOREWELL NEAR M/S ANDHRA | ||
SUGARS LTD. , KOVVUR",ANDHRA PRADESH,24,26,7,7.6,310,1447,1,1,1.4,2.6,2,3,2,12,714,784,0.6,1.1,0.001,0.001,0.001 | ||
4392,"BOREWELL NEAR SRI | ||
GOVINDARAJA SWAMY TEMPLE, | ||
TIRUPATI TOWN",ANDHRA PRADESH,27,27,6.9,7.5,1380,1414,1,1,2.2,2.4,2,2,2,11,582,642,0.4,0.5,0.002,0.002,0.0015 | ||
1520,"BOREWELL NEAR | ||
SWARNAMUKHI RIVER AT | ||
SRIKALAHASTI",ANDHRA PRADESH,28,29,7.3,7.3,1027,1266,1,1,6.7,10.1,2,3,2,29,2568,3370,1.3,1.8,0.001,0.001,0.0015 | ||
1517,"BOREWELL NEAR TUNGBHADRA | ||
RIVER KURNOOL",ANDHRA PRADESH,23,26,7.8,7.9,4520,5663,1.2,1.4,1.1,1.18,3,3,15,21,630,658,0.4,0.5,0.001,0.001,0.001 | ||
1516,"BOREWELL OF NAVLOK | ||
GARDENS, NELLORE",ANDHRA PRADESH,20,21,8.1,8.1,1080,1100,1.4,1.8,0.3,0.6,3,3,20,23,1050,1220,0.2,0.5,0.001,0.001,0.001 | ||
1514,"BOREWELL VIJAY KUMAR | ||
AUTONAGAR VIJAYAWADA",ANDHRA PRADESH,25,25,7.2,7.9,1780,2080,2,2.2,2.47,3.8,3,3,20,21,2310,2348,0.8,1,0.001,0.001,0.001 | ||
4376,"BOREWELL WATER , APIIC | ||
OFFICE, IDA KONDAPALLI, | ||
IBRAHIMPATNAM (M)",ANDHRA PRADESH,26,26,7.1,7.6,3850,3860,1,1.8,0.3,1.5,3,3,14,15,508,550,0.5,0.6,0.001,0.001,0.001 | ||
4380,"BOREWELL WATER , SRI | ||
VENKATESWARA SWAMY | ||
TEMPLE, VENKATAPALEM (V), | ||
TULLUR (M)",ANDHRA PRADESH,22,22,7.1,7.5,860,899,1,1.8,0.3,1.5,3,3,14,15,508,550,0.5,0.6,0.001,0.001,0.001 | ||
4382,"BOREWELL WATER POLICE | ||
STATION, AUTONAGAR, | ||
PEDAKAKANI, GUNTUR",ANDHRA PRADESH,21,22,7.1,8.1,4450,4580,2,2.2,3.5,3.86,3,3,28,28,2790,2840,0.2,0.8,0.001,0.001,0.001 | ||
4393,"CLOSED MSW DUMPSITE, | ||
UKKAYAPALLI (V), KADAPA (M)",ANDHRA PRADESH,24,25,7.3,7.4,2810,3352,1,1,10.4,13.1,2,9,2,71,1589,1785,0.6,1.2,0.004,0.004,0.0025 | ||
3090,"HAND PUMP AT | ||
PITTAVANIPALEM, | ||
VISHAKHAPATNAM",ANDHRA PRADESH,27,27,6.7,7.6,1610,1983,2.2,2.2,2.5,18.8,3,4,75,75,1120,1312,0.3,0.5,0.001,0.001,0.0025 | ||
3089,"HAND PUMP AT TANAM VILL., | ||
VISHAKHAPATNAM",ANDHRA PRADESH,27,28,7.2,7.9,2180,2180,2.1,2.2,1.6,13.1,4,4,75,93,1480,1524,1.1,1.3,0.001,0.001,0.001 | ||
1524,"OPEN WELL NEAR PARTAP | ||
NAGAR BRIDGE -KAKINADA",ANDHRA PRADESH,27,30,7.3,7.7,1147,1295,2.1,2.1,0.9,4.78,4,4,75,75,784,848,0.3,1,0.001,0.001,0.001 | ||
1521,"OPEN WELL NEAR RAMA | ||
TEMPLE , WARD NO.2 , MINDI , | ||
VISAKHAPATNAM",ANDHRA PRADESH,26,27,6.8,7.5,1977,2580,1.8,4,1.5,12.4,7,7,93,120,1296,1812,0.8,0.8,0.001,0.001,0.001 | ||
1522,OPEN WELL PEDDANUVVI -VIZIANAGARAM,ANDHRA PRADESH,27,28,7.4,7.9,1120,1190,1.6,2.1,1.5,2.87,3,9,75,75,780,792,0.5,0.8,0.001,0.001,0.001 | ||
26,"WELL AT GRAM PANCHAYAT | ||
OFFICE, KAANURU, VIJAYWADA",ANDHRA PRADESH,25,25,7,8.1,1597,2160,1,2.2,0.7,1.89,3,3,20,23,942,1314,0.4,0.7,0.001,0.001,0.001 | ||
1537,"GROUND WATER AT (JORHAT, | ||
ASSAM)",ASSAM,25,26,7,7.2,276,278,2.3,2.3,0.7,0.8,2,2,2,2,156,224,0.3,0.3,0.01,0.01,0.0055 | ||
1539,"GROUND WATER AT BARPETA, | ||
ASSAM",ASSAM,30,31,7.4,7.5,304,329,2,2.1,0.8,0.8,2,2,2,2,172,180,0.3,0.3,0.01,0.01,0.01 | ||
1540,"GROUND WATER AT | ||
BONAIGAON, ASSAM",ASSAM,27,29,7.2,7.6,366,390,2,2.6,0.7,1,2,2,2,2,202,218,0.3,0.3,0.01,0.01,0.01 | ||
1533,"GROUND WATER AT DIGBOI, | ||
TINSUKIA DISTT., ASSAM",ASSAM,24,26,6.8,7.1,328,332,2.3,2.5,1.1,1.4,2,2,2,2,184,218,0.2,0.3,0.01,0.01,0.01 | ||
1534,"GROUND WATER AT KARBI | ||
ANGLONG DISTT., ASSAM",ASSAM,25,25,7.2,7.2,308,308,2.3,2.3,0.8,0.8,-,-,-,-,176,176,0.3,0.3,-,-,0.01 | ||
1541,"GROUND WATER AT NOONMATI | ||
GUWAHATI, ASSAM",ASSAM,27,29,7.3,7.6,401,408,2.3,2.5,0.8,1,2,2,2,2,218,224,0.3,0.3,0.01,0.01,0.01 | ||
1535,"GROUND WATER AT SIBSAGAR | ||
GOVT ME SCHOOL WARD 6, RED | ||
CROSS ROAD , ASSAM",ASSAM,25,26,6.8,7.3,284,288,2.2,2.6,0.7,0.8,2,2,2,2,160,166,0.3,0.3,0.01,0.01,0.01 | ||
1542,"GROUND WATER AT SIJUBARI | ||
MAZAR, NATBOMA HATIGAON",ASSAM,27,28,7.8,7.8,352,354,2,2.6,0.8,1,2,2,2,2,194,200,0.3,0.4,0.01,0.01,0.01 | ||
2599,"GROUND WATER BUS STAND | ||
SASARAM, ROHTAS",BIHAR,20,20,7.9,7.9,735,735,,,0.88,0.88,7,7,9,9,482,482,0.2,0.2,0.001,0.001,0.01 | ||
2044,"GROUND WATER FROM DADU | ||
MAJRA, CHANDIGARH",CHANDIGARH,24.9,26.4,7.1,7.2,714,804,1,1.2,4.9,8.4,2,2,33,41,390,518,0.3,0.7,0.001,0.001,0.01 | ||
2043,"GROUND WATER FROM | ||
PALSORA VILLAGE, | ||
CHANDIGARH",CHANDIGARH,25,26.4,7.2,7.4,836,909,1,1.5,2.2,3.8,2,5,49,49,430,570,0.3,0.3,0.001,0.001,0.01 | ||
2039,"GROUND WATER FROM SECTOR | ||
15, CHANDIGARH",CHANDIGARH,25,26.3,7.2,7.3,505,550,1,1,4.1,7.2,2,2,26,49,306,380,0.2,0.2,0.001,0.001,0.01 | ||
2448,"GROUND WATER FROM VILLAGE | ||
BHIMPORE, DAMAN","DAMAN AND DIU, | ||
DADRA AND | ||
NAGAR HAVELI",27.2,29.2,7.1,7.2,437,443,1,1,3.54,3.8,22,23,48,52,279,294,0.2,0.2,0.01,0.01,0.01 | ||
1440,"WELL AT SOMNATH INDUSTRIAL | ||
ESTATE, DAMAN","DAMAN AND DIU, | ||
DADRA AND | ||
NAGAR HAVELI",28.1,28.3,6.7,7.1,814,835,1,1,3.67,3.9,2,2,2,10,570,590,0.3,0.4,0.01,0.01,0.01 | ||
2451,"WELL AT VILLAGE DABHEL, | ||
DAMAN","DAMAN AND DIU, | ||
DADRA AND | ||
NAGAR HAVELI",28.4,29.1,7,7.1,1120,1324,1,1,1.67,1.78,2,2,6,8,790,823,0.3,0.4,0.01,0.01,0.01 | ||
3194,"BORE WELL AT BETHORA | ||
INDUSTRIAL ESTATE",GOA,29,29,7.1,7.1,118,118,1.8,1.8,0.5,0.5,2,2,2,2,77,77,0.2,0.2,0.001,0.001,0.01 | ||
3195,"BORE WELL AT MADKAIM | ||
INDUSTRIAL ESTATE",GOA,28,28,7.9,7.9,101,101,1.9,1.9,0.5,0.5,2,2,2,2,64,64,0.2,0.2,0.001,0.001,0.01 | ||
2281,WELL AT CORLIM INDL. ESTATE,GOA,29,29,5,5,91,91,1.2,1.2,0.3,0.3,2,2,2,2,54,54,0.2,0.2,0.001,0.001,0.01 | ||
2280,"WELL AT KUDAI INDL. | ||
ESTATE(M/S CADILA | ||
HEALTHCARE LIMITED)",GOA,28,28,5.6,5.6,122,122,4.2,4.2,0.3,0.3,2,2,2,2,77,77,0.2,0.2,0.001,0.001,0.01 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.