{"id":23769477,"url":"https://github.com/themihirmathur/soiligator","last_synced_at":"2026-04-12T10:37:43.207Z","repository":{"id":270379789,"uuid":"910172517","full_name":"themihirmathur/Soiligator","owner":"themihirmathur","description":"Soiligator is an advanced machine learning project designed to optimize irrigation management by predicting whether irrigation is necessary based on environmental and soil-related data.","archived":false,"fork":false,"pushed_at":"2024-12-30T17:29:36.000Z","size":233,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-30T22:02:15.797Z","etag":null,"topics":["auc-score","logistic-regression","machine-learning","matplotlib","numpy","pandas","python","random-forest-classifier","roc-curve","scikit-learn","seaborn","standardscaler","support-vector-machine"],"latest_commit_sha":null,"homepage":"https://github.com/themihirmathur/Soiligator","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/themihirmathur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-30T17:08:57.000Z","updated_at":"2024-12-30T17:32:22.000Z","dependencies_parsed_at":"2024-12-30T18:31:29.377Z","dependency_job_id":"1de6b150-f709-4920-aadf-a622f5fe27bf","html_url":"https://github.com/themihirmathur/Soiligator","commit_stats":null,"previous_names":["themihirmathur/soiligator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/themihirmathur/Soiligator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themihirmathur%2FSoiligator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themihirmathur%2FSoiligator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themihirmathur%2FSoiligator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themihirmathur%2FSoiligator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/themihirmathur","download_url":"https://codeload.github.com/themihirmathur/Soiligator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themihirmathur%2FSoiligator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262857266,"owners_count":23375491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auc-score","logistic-regression","machine-learning","matplotlib","numpy","pandas","python","random-forest-classifier","roc-curve","scikit-learn","seaborn","standardscaler","support-vector-machine"],"created_at":"2025-01-01T02:21:04.383Z","updated_at":"2025-12-30T22:19:57.054Z","avatar_url":"https://github.com/themihirmathur.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Soiligator 💦⏳ Soil Analysis and Irrigation Prediction\n\n\u003cp align=\"left\"\u003e\n  \u003cimg src=\"https://www.animatedimages.org/data/media/562/animated-line-image-0184.gif\" width=\"1920\" \n\u003c/p\u003e\n\n![Screenshot 2024-12-30 at 10 54 24 PM](https://github.com/user-attachments/assets/0232ec7f-a77f-4cee-8984-6928530c6a4a)\n\n## Overview\n**Soiligator** is an advanced machine learning project designed to optimize irrigation management by predicting whether irrigation is necessary based on environmental and soil-related data. Leveraging feature engineering and robust predictive models, Soiligator provides actionable insights that improve agricultural efficiency and sustainability.\n\n\u003cp align=\"left\"\u003e\n  \u003cimg src=\"https://www.animatedimages.org/data/media/562/animated-line-image-0184.gif\" width=\"1920\" \n\u003c/p\u003e\n\n## Key Features\n- **Predictive Models**: Utilizes Logistic Regression, Random Forest, and Support Vector Machine (SVM) algorithms for accurate irrigation predictions.\n- **Feature Engineering**: Incorporates non-linear interaction terms and outlier handling for enhanced model performance.\n- **Scalable Design**: Easily extendable to include additional features like soil type and crop variety.\n- **Data Resilience**: Designed to handle label noise and outliers, ensuring robustness in real-world applications.\n\n## Table of Contents\n1. [Overview](#overview)\n2. [Key Features](#key-features)\n3. [Installation](#installation)\n4. [Usage](#usage)\n5. [Data Description](#data-description)\n6. [Model Training and Evaluation](#model-training-and-evaluation)\n7. [Results](#results)\n8. [Future Work](#future-work)\n\n## Installation\nTo use this project, install the required Python packages with the following command:\n\n```bash\npip install -r requirements.txt\n```\n\n### Key Dependencies:\n- **pandas**: Data manipulation and analysis\n- **numpy**: Numerical operations\n- **matplotlib \u0026 seaborn**: Data visualization\n- **scikit-learn**: Machine learning model training and evaluation\n\nAlternatively, install the libraries manually:\n\n```bash\npip install pandas numpy matplotlib seaborn scikit-learn\n```\n\n\u003cp align=\"left\"\u003e\n  \u003cimg src=\"https://www.animatedimages.org/data/media/562/animated-line-image-0184.gif\" width=\"1920\" \n\u003c/p\u003e\n\n## Usage\n\n### Data Loading\nStart by loading the dataset `modified_irrigation_dataset.csv`, which includes:\n- **Moisture**: Soil moisture content.\n- **Temperature**: Ambient temperature.\n- **Humidity**: Air humidity level.\n- **Irrigation_Needed**: Target label indicating whether irrigation is required.\n\n### Running the Code\nThe implementation is available in a Jupyter Notebook: `soil_analysis.ipynb`. Execute the cells sequentially to:\n1. Load and preprocess the dataset.\n2. Engineer additional features.\n3. Train machine learning models.\n4. Evaluate and compare model performance.\n\n\u003cp align=\"left\"\u003e\n  \u003cimg src=\"https://www.animatedimages.org/data/media/562/animated-line-image-0184.gif\" width=\"1920\" \n\u003c/p\u003e\n\n## Data Description\nThe dataset comprises features representing soil and environmental conditions:\n- **Moisture**: Measures the water content in the soil (0–100%).\n- **Temperature**: Ambient temperature in degrees Celsius.\n- **Humidity**: Air humidity as a percentage (0–100%).\n\n### Engineered Features:\n- **Moisture_Temp_Interaction**: Interaction term between soil moisture and temperature to capture non-linear effects.\n- **Humidity_Squared**: Non-linear transformation of humidity to account for atmospheric retention properties.\n\n### Data Challenges:\n- **Outliers**: Synthetic outliers introduced in 5% of the data to test model resilience.\n- **Label Noise**: Added noise to 5% of target labels to simulate real-world conditions.\n\n\u003cp align=\"left\"\u003e\n  \u003cimg src=\"https://www.animatedimages.org/data/media/562/animated-line-image-0184.gif\" width=\"1920\" \n\u003c/p\u003e\n\n## Model Training and Evaluation\n\n### Preprocessing\n- **Outlier Handling**: Removes or neutralizes extreme values.\n- **Feature Scaling**: Standardizes features using `StandardScaler` for optimal model performance.\n- **Train-Test Split**: Splits the data into 80% training and 20% testing subsets.\n\n### Models Used:\n1. **Logistic Regression**: A baseline model for binary classification.\n2. **Random Forest Classifier**: An ensemble learning model for handling complex patterns.\n3. **Support Vector Machine (SVM)**: A robust classifier for high-dimensional data.\n\n### Evaluation Metrics:\n- **Accuracy**: Overall correctness of predictions.\n- **Confusion Matrix**: Breakdown of true positives, false positives, true negatives, and false negatives.\n- **ROC Curve and AUC Score**: Measures the model's ability to distinguish between classes.\n- **Precision-Recall Curve**: Highlights performance in handling imbalanced data.\n- **Classification Report**: Includes precision, recall, F1-score, and support.\n\n\u003cp align=\"left\"\u003e\n  \u003cimg src=\"https://www.animatedimages.org/data/media/562/animated-line-image-0184.gif\" width=\"1920\" \n\u003c/p\u003e\n\n## Results\n### Model Comparison:\n- **Logistic Regression**: Achieved baseline performance with moderate accuracy.\n- **Random Forest**: Outperformed other models, achieving high accuracy and robustness to noise and outliers.\n- **SVM**: Demonstrated strong performance on standardized features but required longer training times.\n\n### Visualization:\n- **Confusion Matrix**: Provided for each model to analyze prediction errors.\n- **ROC Curves**: Highlighted the trade-offs between sensitivity and specificity.\n- **Precision-Recall Curves**: Demonstrated model effectiveness on imbalanced datasets.\n\n\u003cp align=\"left\"\u003e\n  \u003cimg src=\"https://www.animatedimages.org/data/media/562/animated-line-image-0184.gif\" width=\"1920\" \n\u003c/p\u003e\n\n## Future Work\n1. **Hyperparameter Tuning**: Optimize models using Grid Search or Random Search to improve accuracy.\n2. **Feature Expansion**: Include additional predictors such as:\n   - Soil type\n   - Crop type\n   - Real-time weather forecasts\n3. **Time-Series Analysis**: Incorporate temporal data to predict irrigation needs over time.\n4. **Deployment**: Package the model into a web or mobile application for practical use by farmers and agricultural experts.\n\n---\n\n## Contribution\nContributions are welcome! Please fork the repository, make your changes, and submit a pull request. For any queries, feel free to contact the project owner.\n\n\u003cp align=\"left\"\u003e\n  \u003cimg src=\"https://www.animatedimages.org/data/media/562/animated-line-image-0184.gif\" width=\"1920\" \n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthemihirmathur%2Fsoiligator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthemihirmathur%2Fsoiligator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthemihirmathur%2Fsoiligator/lists"}