Home
All Projects
ML + DESIGN OF EXPERIMENTS

Agricultural Profit Optimiser

A Random Forest model and DoE simulation framework that identified the profit-maximising farming strategy across 20 years of Punjab climate data.

R² 0.78Model accuracy
20 YearsClimate data used
22 DistPunjab coverage
₹1,36,825Peak profit / Ha
PythonScikit-learnRandom ForestPandasNumPyMatplotlibStreamlitDesign of ExperimentsNASA POWER

Overview

Farmers in Punjab invest heavily in fertilizers and irrigation — but more input does not always mean more profit. Using 20 years of daily NASA climate data across 22 Punjab districts, this project trained a Random Forest model to predict wheat and rice yields, then used Design of Experiments to simulate every combination of nitrogen and irrigation levels — revealing that the most profitable strategy was NOT the highest-yield strategy.

Problem Statement

  • Farmers cannot predict how weather will affect their seasonal yield
  • Over-investment in fertilizers reduces net profit due to diminishing returns
  • Agricultural planning is based on tradition rather than data analysis
  • No decision-support tool exists for input optimization at district level

Data & Analysis

Profit heatmap: Nitrogen × Irrigation (₹/ha)

Simulated treatment outcomes

Nitrogen Input (kg/ha)
300mm
500mm
700mm
200kg
₹1,08,000
₹1,24,000
₹1,15,000
150kg
₹1,12,000
₹1,36,825
₹1,21,000
100kg
₹89,000
₹1,05,000
₹98,000
Irrigation Level (mm)
★ Optimal combination (Nitrogen = 150kg/ha, Irrigation = 500mm)

Yield continues rising while profit peaks at 150kg N/ha

Comparative dual-axis trend analysis

Random Forest feature importance — crop yield drivers

Key climate yield predictors

Key Findings

R² 0.78

Predictive accuracy

The Random Forest model explained 78% of historical wheat and rice yield variation using engineered climate features.

₹1,36,825

Peak profit per hectare

Optimal strategy: 150kg/ha Nitrogen + 500mm Irrigation — not the maximum, but the most efficient combination.

↓ Profit

Diminishing returns proven

Pushing Nitrogen to 200kg/ha increased yield slightly but cut profit by ₹12,825/ha due to input costs.

Min temp

Top yield driver

Daily minimum temperature emerged as the single strongest predictor of crop yield — above rainfall and heat stress.

Skills Demonstrated

Machine LearningRandom ForestFeature EngineeringDesign of ExperimentsAgricultural AnalyticsMultivariate AnalysisSimulation ModellingOptimizationPredictive AnalyticsDashboard DevelopmentStreamlit