Skip to content

Machine learning model for predicting optimal crops based on soil conditions.

Notifications You must be signed in to change notification settings

Zeeshier/Crop-Prediction-Model

Repository files navigation

Crop Prediction APP using Machine Learning

Description

This project focuses on predicting crop types based on soil measures using various machine learning models. The aim is to explore the dataset, implement and evaluate different classification models, and determine which model performs the best for crop prediction.

Features

  • Data Exploration: Explore and preprocess the soil measures dataset to prepare it for model training.
  • Classification Models: Implement and train four different classification models:
    • Logistic Regression
    • Support Vector Machine (SVM)
    • Random Forest
    • Decision Tree
  • Model Evaluation: Evaluate and compare the performance of the four models to determine the best one for predicting crop types.
  • Prediction: Use the trained models to predict crop types based on new soil measures.

Crop Prediction App Features

  • Interactive User Interface: A Streamlit-based web application for predicting crop types based on user-provided soil measures (Nitrogen, Phosphorus, Potassium, and pH levels).
  • Real-Time Prediction: Get instant predictions by inputting soil measures directly into the app.
  • Visual Representation: Clean and engaging UI design with real-time prediction results displayed in a user-friendly manner.
  • Accessibility: Easily accessible through a web browser without requiring any local setup beyond running the Streamlit app.

Dataset

  • soil_measures.csv: This dataset contains various soil measures and their corresponding crop types, which will be used to train and evaluate the models.

Models

  • Logistic Regression
  • Support Vector Machine (SVM)
  • Random Forest
  • Decision Tree

Results

  • Accuracy Comparison: Compare the accuracy of the four models to identify the most accurate one.
  • Feature Importance: Analyze the importance of each feature in contributing to the predictive performance of the models.

Usage

  1. Clone the repository.
  2. Run the Jupyter notebook provided to train and evaluate the models.
  3. Launch the Streamlit app to interactively predict crop types based on new soil measures.
  4. Use the trained models to predict crop types based on new soil measures via the app.
  5. To run the App : streamlit run app.py

About

Machine learning model for predicting optimal crops based on soil conditions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published