Skip to content

Simple Neural Network to analyze whether water is of good quality or not.

Notifications You must be signed in to change notification settings

philiptitus/Water---quality

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Water Quality Prediction Model

This project aims to predict water quality based on various indicators such as pH levels, turbidity, temperature, and dissolved oxygen. The model is built using TensorFlow and Keras.

Project Structure

  • model.ipynb: Jupyter notebook containing the model definition, training, and prediction code.
  • data/: Directory containing sample data files (if any).
  • env/: Virtual environment directory.
  • README.md: Project documentation.

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/water-quality-prediction.git
    cd water-quality-prediction
  2. Create and activate a virtual environment:

    python -m venv env
    .\env\Scripts\activate  # On Windows
    source env/bin/activate  # On macOS/Linux
  3. Install the required packages:

    pip install -r requirements.txt

Usage

  1. Open the Jupyter notebook:

    jupyter notebook model.ipynb
  2. Run the cells to train the model and make predictions.

Sample Data

The sample data for water quality indicators is generated using the following code:

import numpy as np

# Sample data for water quality indicators
pH_levels = np.random.uniform(6.5, 8.5, 70)  # pH levels between 6.5 and 8.5
turbidity = np.random.uniform(0, 5, 70)  # Turbidity in NTU (0 to 5)
temperature = np.random.uniform(10, 30, 70)  # Temperature in Celsius (10 to 30)
dissolved_oxygen = np.random.uniform(5, 14, 70)  # Dissolved oxygen in mg/L (5 to 14)

# Combine the features into a single dataset
X_data = np.column_stack((pH_levels, turbidity, temperature, dissolved_oxygen))

# Example labels (1 for positive, 0 for negative)
Y_data = np.random.randint(0, 2, 70)


License
This project is licensed under the MIT License. See the LICENSE file for details.

About

Simple Neural Network to analyze whether water is of good quality or not.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published