In Epitech, Tek4 students have the opportunity to travel around the world. It is an incredible opportunity to learn new things and discover the world at the same time. However, the water quality is not the same everywhere, depending on the health regulation. Therefore it is important to know quickly if the water at the students' disposal is healthy to drink or not!
This little Web App will allow people to quickly check if the water is drinkable or not, as long as they have data regarding their water. Using a trained Artificial Intelligence, our application will quickly be able to analyse the potability of the water with given parameters.
Here is the link to the dataset used to train our Artificial Intelligence. It contains samples of 3,276 different water bodies.
- pH: The Acid-Base property of the water. Recommended value is between 6.5 and 8.5.
- Hardness : Concentration of calcium and magnesium salts.
- Solids : The ability for the water to dissolve solids (minerals).
- Chloramines : Water disinfectants concentration (recommended amount is 4mg/L).
- Sulfate : Sulfates is present is most minerals, soil and rocks.
- Conductivity : Electrical conductivity measures the ionic concentration (should not exceed 400 μS/cm).
- Organic Carbon : Total Organic Carbon represents the natural decaying organic matter organic matter and synthetic sources.
- Trihalomethanes : THMs can be found in water treated with chlorine.
- Turbidity : The turbidity of water depends on the quantity of solid matter present in the suspended state.
- Data Analysis
- Some values may contains NaN/Null values, but they are handled.
- Performance Evaluation
- Splitting the dataset by 75% for training set and 25% validation set.
- Training and Validation
- RandomForest and GradientBoosting get a higher accuracy score than other classification models.
- RandomForest : 77%
- GrandientBoosting : 77.7%
- RandomForest and GradientBoosting get a higher accuracy score than other classification models.
- Performance Results
- Training Score : 100.0%
- Validation Score : ~80%
- Results displayed above are considered satisfying, because we biased the training and test to make sure the analysis handles every possible case.
Live Demo : https://share.streamlit.io/tim-snugget/ml_drinkable_water/main/app.py


The drowndown list at the bottom of the selections allow the user to select the model used to make the prediction
Feel free to clone the repository and use it to deploy your own web app and test your models.
To train your models, run python model.py with a ./models folder (if it has been deleted previously).
To deploy your application, use streamlit run app.py with all required dependencies installed.
EduFlow https://www.kaggle.com/adityakadiwal/water-potability https://www.youtube.com/watch?v=aircAruvnKk

