Git Product home page Git Product logo

ravikant-diwakar / crop-recommendation Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 974 KB

This Crop Recommendation App is developed as a part of a Data Analytics project. Our Crop Recommendation Web App is designed to assist farmers in making informed decisions about crop selection, ultimately leading to improved agricultural productivity and sustainability.

Home Page: https://crop-recommn.streamlit.app/

Jupyter Notebook 96.57% Python 3.43%

crop-recommendation's Introduction

Crop Recommendation System

Introduction

Project Overview

The Crop Recommendation System is a machine learning-based web application designed to help farmers select the most suitable crops based on local soil and climate conditions. The application leverages several machine learning algorithms to provide accurate crop recommendations, improving agricultural productivity and sustainability.

Key Features

  • Accurate crop recommendations using machine learning
  • User-friendly web interface for easy access
  • Scalable and deployable on cloud platforms
  • Supports multiple machine learning algorithms

Model Development

Algorithms Used

  • Decision Tree: Provides insights into the decision-making process by dividing data into smaller groups based on feature values, creating a tree-like structure.
  • Gaussian Naive Bayes: Based on Bayes' theorem, assumes features are independent given the class label, often delivering good results with high-dimensional data.
  • Support Vector Machine (SVM): Finds the hyperplane in the feature space that best partitions the classes, useful for non-linear data separation.
  • Random Forest: A cluster learning method combining multiple decision trees for robust classification, handling high-dimensional data effectively.

Methodology

System Architecture

The system architecture comprises two main components: the web server and the ML container. The web server communicates with a database to store and retrieve data, ensuring scalability and deployability for handling many requests.

System Architecture
image

Datasets

The dataset consists of 2200 rows and 8 columns representing various environmental and soil parameters, including nitrogen, phosphorus, potassium (NPK) levels, temperature, humidity, pH, precipitation, and the target crop label. By analyzing the relationships between these input features and the corresponding crop types, we develop a predictive model for recommending suitable crops for specific soil and environmental conditions.

Random data from the dataset for crop recommendation
image

Crop Recommendation

We trained our dataset using four standard machine learning algorithms: Random Forest, Gaussian Naive Bayes, Support Vector Machine (SVM), and Decision Tree. These algorithms perform well on labeled datasets for classification problems, with Random Forest emerging as the most accurate model for crop prediction.

Analysis Tools and Technologies

  • Python: Versatile programming language for machine learning.
  • NumPy: Provides support for large, multi-dimensional arrays and matrices.
  • Pandas: Powerful library for data manipulation and analysis.
  • Streamlit: Framework for building interactive web applications.
  • HTML, CSS, JavaScript: Standard web technologies for designing and styling the web application.

Results

Model Performance

Random Forest outperformed other algorithms, achieving an accuracy of 99.55%. A graphical representation of the accuracy comparison among the algorithms is provided.

Accuracy Comparison
image

Website Deployment

The web application, developed using Streamlit, incorporates a machine learning backend for crop recommendation based on user-input parameters. The application is designed for deployment on cloud service platforms, ensuring widespread accessibility and scalability.

Landing page of the website
image
Result of crop recommendation
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.