Crop Recommendation and Crop Yield Prediction System A Machine Learning Approach.

The Crop Recommendation and Crop Yield Prediction System is an integrated, multilingual machine learning web application built to support data-driven farming decisions in India. Farmers often struggle to choose a suitable crop and to estimate the harvest they can expect, because soil measurements, climate records and district-level production statistics remain scattered across separate sources. Many existing systems treat crop recommendation and yield forecasting as unrelated problems, recommend crops for which no yield history exists, or report headline scores without baselines. This project connects both tasks through an explicit crop taxonomy and reports its results with historical baselines and crop-level error analysis. The system couples a Random Forest crop classifier, which recommends one of nine crops (Rice, Maize, Banana, Black Gram, Chickpea, Lentil, Moth Bean, Green Gram and Pigeon Pea) from seven soil and climate inputs (N, P, K, temperature, humidity, pH and rainfall), with a yield module that estimates yield in tonnes per hectare and total production from the crop, state, district, season and cultivated area. The classifier is trained on 900 records of the Crop Recommendation benchmark, filtered from 2,200 records and 22 crops to the nine crops that have verified matches in the yield data. The yield module is trained on 313,301 cleaned records of the Government of India district-wise Area-Production-Yield statistics (1997–2020; 46 crops, 37 states/UTs and 706 districts) using a chronological split (training up to 2016, validation 2017–2018, test 2019–2020) and a per-crop strategy, selected on validation data only, that serves either a Random Forest or a historical crop-state-district lookup. On a stratified 80/20 split the Random Forest classifier reaches 100% test accuracy (5-fold cross-validation 99.44%), while the yield strategy reaches an R² of 0.9015 with a mean absolute error of 1.4309 t/ha on the 2019–2020 holdout, only marginally ahead of the crop-state-district historical baseline (R² 0.8987, MAE 1.4356 t/ha). Per-crop R² is negative for several crops such as Rice, Green Gram and Urad, so the pooled score must not be read as field accuracy. The Flask application provides English, Hindi and Kannada interfaces, strict input validation and out-of-range warnings. Future work includes independent farm-level validation, real-time weather integration and wider crop coverage.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-30
DOI
https://doi.org/10.5281/zenodo.24685313
Primary Topic
Smart Agriculture and AI
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Crop Recommendation and Crop Yield Prediction System A Machine Learning Approach.

Preetham C, Krutharth T Gowda, Hritik Gowda N, Kanchana
Zenodo (CERN European Organization for Nuclear Research)
Smart Agriculture and AI
article

Crop Recommendation and Crop Yield Prediction System A Machine Learning Approach.

Preetham C, Krutharth T Gowda, Hritik Gowda N, Kanchana
article en

Abstract

The Crop Recommendation and Crop Yield Prediction System is an integrated, multilingual machine learning web application built to support data-driven farming decisions in India. Farmers often struggle to choose a suitable crop and to estimate the harvest they can expect, because soil measurements, climate records and district-level production statistics remain scattered across separate sources. Many existing systems treat crop recommendation and yield forecasting as unrelated problems, recommend crops for which no yield history exists, or report headline scores without baselines. This project connects both tasks through an explicit crop taxonomy and reports its results with historical baselines and crop-level error analysis. The system couples a Random Forest crop classifier, which recommends one of nine crops (Rice, Maize, Banana, Black Gram, Chickpea, Lentil, Moth Bean, Green Gram and Pigeon Pea) from seven soil and climate inputs (N, P, K, temperature, humidity, pH and rainfall), with a yield module that estimates yield in tonnes per hectare and total production from the crop, state, district, season and cultivated area. The classifier is trained on 900 records of the Crop Recommendation benchmark, filtered from 2,200 records and 22 crops to the nine crops that have verified matches in the yield data. The yield module is trained on 313,301 cleaned records of the Government of India district-wise Area-Production-Yield statistics (1997–2020; 46 crops, 37 states/UTs and 706 districts) using a chronological split (training up to 2016, validation 2017–2018, test 2019–2020) and a per-crop strategy, selected on validation data only, that serves either a Random Forest or a historical crop-state-district lookup. On a stratified 80/20 split the Random Forest classifier reaches 100% test accuracy (5-fold cross-validation 99.44%), while the yield strategy reaches an R² of 0.9015 with a mean absolute error of 1.4309 t/ha on the 2019–2020 holdout, only marginally ahead of the crop-state-district historical baseline (R² 0.8987, MAE 1.4356 t/ha). Per-crop R² is negative for several crops such as Rice, Green Gram and Urad, so the pooled score must not be read as field accuracy. The Flask application provides English, Hindi and Kannada interfaces, strict input validation and out-of-range warnings. Future work includes independent farm-level validation, real-time weather integration and wider crop coverage.

Zenodo (CERN European Organization for Nuclear Research)
Smart Agriculture and AI
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon