Skip to content

Latest commit

Β 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 

Repository files navigation

Smart Agriculture: Multi-Output Predictive System 🌿

πŸ“‹ Project Overview

This project focuses on precision agriculture by building an intelligent system that predicts multiple agricultural needs and risks simultaneously. Using a Multi-output Random Forest Classifier, the system analyzes environmental data to help farmers make data-driven decisions regarding irrigation and plant health.


πŸš€ Key Features & Goals

The model is designed to predict three critical targets at once:

  1. Irrigation Decision: Determines if the land needs watering based on soil moisture and temperature.
  2. Water Efficiency: Categorizes how efficiently water is being used (Levels 0 to 2).
  3. Plant Stress Index: Identifies if the plant is under stress due to environmental factors.

πŸ›  Technical Implementation

  • Data Engineering: Created custom labeling logic to derive Water_Efficiency and Plant_Stress from raw sensor data (Temperature, Humidity, and MOI).
  • Architecture: Implemented a MultiOutputClassifier wrapping a Random Forest model, allowing for a single model to output multiple classifications.
  • Preprocessing: Used LabelEncoder for categorical data and handled data cleaning/deduplication to ensure model reliability.

πŸ“Š Results & Analysis

Based on the model execution:

  • High Accuracy: The model achieved excellent results across all three targets (Irrigation, Efficiency, and Stress).
  • Performance Metrics:
    • Confusion Matrix: Shows that the model is particularly strong at identifying when irrigation is not needed, effectively reducing water waste.
    • Classification Report: Shows high Precision and Recall, meaning the model rarely misses a "Plant Stress" event and maintains low false alarms.

      πŸ“ˆ Performance Metrics

      Target Variable Accuracy Precision Recall
      Irrigation 99% 0.99 0.99
      Water Efficiency 98% 0.98 0.98
      Plant Stress 99% 0.99 0.99
  • Data Insights: Visualizations (Boxplots) indicated that Soil Moisture (MOI) and Temperature are the most influential factors in determining plant health.

πŸ’» Tech Stack

  • Language: Python
  • Libraries: Scikit-learn, Pandas, NumPy, Matplotlib, Seaborn.
  • Algorithm: Multi-output Random Forest Classifier.

About

A machine learning predictive system for smart agriculture using Multi-output Random Forest to analyze crop data and environmental risks

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages