- Project Overview
- Features
- Requirements
- Installation
- Usage
- Results
- Project Structure
- Contributing
- License
- Contact
This project focuses on predicting water potability using machine learning techniques. It classifies water samples as safe or unsafe for drinking based on various chemical properties. Key features used in this model include:
- pH Level: Indicates the acidity or alkalinity of water.
- Hardness: Measures the concentration of calcium and magnesium ions.
- Solids: Represents the total dissolved solids in water.
- Chloramines: Amount of disinfectant used to treat drinking water.
- Sulfate: A chemical compound found naturally in some drinking water supplies.
- Conductivity: Indicates the water's capability to pass electrical flow.
- Organic Carbon: Amount of carbon found in organic compounds in water.
- Trihalomethanes: A by-product of chlorine disinfection of water.
- Turbidity: Measure of the cloudiness or haziness in water.
The model integrates various classifiers to enhance prediction accuracy, ensuring reliable water safety analysis.
- Machine Learning Models: Combines multiple classifiers for accurate prediction.
- Real-time Prediction: Allows users to input data for instant prediction.
- Web Interface: Developed using Flask for an easy-to-use web application.
- Data Visualization: Graphical representations of predictions and feature importances.
- Scalable: The application can be easily extended for larger datasets and additional features.
To get started with the project, follow these steps:
- Clone the repository:
git clone https://github.com/SunilRavi7/Water_Quality_Prediction_and_Analysis_using_ML.git
- Navigate to the project directory:
cd Water_Quality_Prediction_and_Analysis_using_ML - Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
- Install the dependencies:
pip install -r requirements.txt
To run the application, follow these steps:
-
Ensure you are in the project directory:
cd Water_Quality_Prediction_and_Analysis_using_ML -
Start the Flask application:
flask run
-
Open your web browser and go to
http://127.0.0.1:5000/to access the web interface. -
Input the chemical properties of water into the provided fields and hit "Predict" to see if the water is safe for drinking.
The model will output whether the water is safe or unsafe for drinking based on the input parameters. The results are displayed on the web interface along with an explanation of the predicted outcome.
Water_Quality_Prediction_and_Analysis_using_ML/ │ ├── static/ │ ├── css/ │ │ └── styles.css # CSS for styling │ └── js/ │ └── script.js # Optional JavaScript │ ├── templates/ │ └── index.html # HTML template for Flask │ ├── water_potability.csv # Dataset ├── model.pkl # Trained model ├── app.py # Flask app ├── requirements.txt # Required Python libraries └── README.md # Project documentation
We welcome contributions to this project. If you have any improvements, please submit a pull request. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License. See the LICENSE file for more information.
For any questions or inquiries, feel free to contact me:
- Email: sunilr31r@gmail.com
- LinkedIn: Sunil R