DarkNeuron-AI commited on
Commit
802671b
Β·
verified Β·
1 Parent(s): 28a931f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +71 -1
README.md CHANGED
@@ -14,4 +14,74 @@ tags:
14
  - Water Potability
15
  - Random Forest
16
  - Standard Scaler
17
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  - Water Potability
15
  - Random Forest
16
  - Standard Scaler
17
+ ---
18
+
19
+ # πŸ’§ HydraSense - Water Potability Classifier Model (v1.0)
20
+
21
+ A lightweight **Random Forest + StandardScaler** based water potability prediction model developed by **HydraSense**.
22
+ It classifies water as **Potable (1)** or **Not Potable (0)** based on chemical and physical features β€” ideal for simple tabular classification tasks.
23
+
24
+ ---
25
+
26
+ ## πŸš€ Features
27
+ - Fast and efficient β€” runs easily on standard laptops
28
+ - Trained with real-world water quality datasets
29
+ - Predicts potability from features like **pH, Hardness, Solids, Chloramines, Sulfate, Conductivity, Organic Carbon, Trihalomethanes, Turbidity**
30
+ - Uses a **pipeline** to automatically scale and preprocess input data
31
+ - Easy to use and integrate
32
+
33
+ ---
34
+
35
+ ## πŸš€ Model Overview
36
+ - **Algorithm:** Random Forest Classifier
37
+ - **Preprocessing:** StandardScaler (automatic feature scaling)
38
+ - **Goal:** Predict whether water is safe to drink (Potable) or unsafe (Not Potable)
39
+ - **Performance:** Accurate classification on real-world datasets
40
+
41
+ ---
42
+
43
+ ## 🧩 Files Included
44
+ - `water_potability_model.pkl` β†’ Trained Random Forest pipeline (scaler + model)
45
+ - `example_usage.py` β†’ Example code to use the model
46
+ - `requirements.txt` β†’ Dependencies list
47
+
48
+ ---
49
+
50
+ ## 🏷️ Prediction Labels (Binary)
51
+ - **0:** Not Potable (Unsafe to drink)
52
+ - **1:** Potable (Safe to drink)
53
+
54
+ ---
55
+
56
+ ## πŸ’‘ How to Use (Example Code)
57
+ ```python
58
+ from huggingface_hub import hf_hub_download
59
+ import joblib
60
+ import pandas as pd
61
+
62
+ # Download and load the trained pipeline
63
+ pipeline_path = hf_hub_download("HydraSense/waterpotabler-v1", "water_potability_pipeline.pkl")
64
+ pipeline = joblib.load(pipeline_path)
65
+
66
+ # Example water sample
67
+ sample_data = {
68
+ 'ph': [7.2],
69
+ 'Hardness': [180],
70
+ 'Solids': [15000],
71
+ 'Chloramines': [8.3],
72
+ 'Sulfate': [350],
73
+ 'Conductivity': [450],
74
+ 'Organic_carbon': [10],
75
+ 'Trihalomethanes': [70],
76
+ 'Turbidity': [3]
77
+ }
78
+
79
+ sample_df = pd.DataFrame(sample_data)
80
+
81
+ # Predict potability
82
+ prediction = pipeline.predict(sample_df)
83
+
84
+ print("Prediction:", "πŸ’§ Potable" if prediction[0] == 1 else "⚠️ Not Potable")
85
+ ```
86
+
87
+ # Developed With ❀️ By DarkNeuronAI