YIELDICT AI is a machine learning agricultural intelligence and decision-support platform designed to forecast crop yields, evaluate farm economics, and provide risk-mitigated crop recommendations for Indian agriculture.
Powered by an ensemble Random Forest Regression Pipeline (
- Multi-Parameter Inference: Evaluates 55 crop types across 30 Indian states and 6 agricultural seasons.
- Synchronized Controls: Interactive numeric boxes and sliders for Cultivated Area, Annual Rainfall, Fertilizer Usage, and Pesticide Application.
-
Monetary Valuation: Calculates total farm output (
$Yield \times Area$ ) and expected gross revenue in INR (βΉ Lakhs / βΉ Crores) mapped to Government Minimum Support Price (MSP) benchmarks.
- Evaluates alternative crops viable in the selected state and season.
- Ranks top alternative opportunities and displays an interactive Altair Revenue Bar Chart to maximize farm returns.
- Simulates marginal fertilizer cost (βΉ30/kg) vs. crop yield returns across
$25% - 200%$ dosage variations. - Pinpoints the Economic Sweet-Spot Dosage (kg/ha) and calculates potential net profit uplift.
- Embeds an interactive Fertilizer Dosage vs. Net Profit Curve.
- Stress-tests farm yields against 5 monsoon rainfall scenarios (
$-50%$ drought deficit to$+50%$ excess monsoon). - Computes a Drought Resilience Score (%) and categorizes the farm under automated climate risk tiers (π‘οΈ Low Risk /
β οΈ Moderate Risk / π¨ High Risk).
- Curated emerald-forest palette (
#2d6a4f,#52b788,#1b382b), frosted glass surfaces, and responsive typography (Playfair Display+Plus Jakarta Sans).
| Layer | Technology |
|---|---|
| Frontend UI | Streamlit, HTML5, Vanilla CSS3 (Custom Botanical Paper Theme) |
| Data Visualization | Altair Interactive Visualizations |
| Machine Learning | Scikit-Learn (Pipeline, ColumnTransformer, OneHotEncoder, RandomForestRegressor) |
| Data Manipulation | Pandas, NumPy |
| Serialization | Joblib, Git LFS |
git clone https://github.com/TeamKinetix/Yieldict_AI.git
cd Yieldict_AIThe trained model (crop_yield_model.pkl, 175.5 MB) is tracked with Git Large File Storage (LFS):
git lfs install
git lfs pull# Windows
python -m venv venv
.\venv\Scripts\activate
# macOS / Linux
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtstreamlit run "ML base_line trainning/ML base_line trainning/app.py"Or use the launcher wrapper:
streamlit run "ML base_line trainning/app.py"Once started, open http://localhost:8501 in your browser.
For microservice setups or programmatic querying:
python optimizer/server.pyAccess the advisory endpoint at http://localhost:8000.
For fast command-line farm simulations:
python optimizer/crop_optimizer.pyThe model is trained on 19,689 validated historical agricultural records using a single scikit-learn Pipeline:
Input Features (7)
β
βββ Categorical Features ['crop', 'season', 'state']
β βββ OneHotEncoder(handle_unknown='ignore', sparse_output=False) -> [88 dimensions]
β
βββ Numerical Features ['area', 'annual_rainfall', 'fertilizer', 'pesticide']
β βββ Passthrough -> [7 dimensions]
β
βββ Regressor
βββ RandomForestRegressor(n_estimators=100, max_depth=None, random_state=42, n_jobs=-1)
-
Coefficient of Determination (
$R^2$ ):0.9805(98.05% variance explained) -
Mean Absolute Error (MAE):
8.79 t/ha -
Root Mean Squared Error (RMSE):
118.42 t/ha
To reproduce or retrain the pipeline from scratch, open and run all cells in:
important code/Baseline_Model.ipynbThe notebook automatically outputs the updated crop_yield_model.pkl pipeline.
CropYield/
β
βββ .gitattributes # Git LFS configuration (*.pkl tracking)
βββ .gitignore # Tailored repository ignore rules
βββ .streamlit/ # Streamlit theme and viewport configuration
β βββ config.toml
β
βββ 6 files/ # PRD, Architecture, and Design specifications
β βββ PRD.md
β βββ architecture.md
β βββ design.md
β βββ phases.md
β
βββ important code/ # Training notebooks & model checkpoints
β βββ Baseline_Model.ipynb # Model training & evaluation notebook
β βββ crop_yield_cleaned.csv # Agricultural dataset (19,689 records)
β
βββ ML base_line trainning/ # Web Application core
β βββ ML base_line trainning/
β β βββ app.py # Main Streamlit web application
β β βββ crop_yield_model.pkl # Serialized scikit-learn Pipeline (175.5 MB)
β β βββ crop_yield_cleaned.csv # Cleaned dataset
β β βββ background.png # UI graphics & branding
β βββ app.py # Root launcher script
β
βββ optimizer/ # Advisory & Simulation Engine
β βββ __init__.py # Package initializer
β βββ crop_optimizer.py # Multi-crop, fertilizer ROI & climate stress logic
β βββ msp_data.py # Crop pricing, MSP data & categories
β βββ server.py # Standalone advisory service (Port 8000)
β
βββ processed data for training/ # Cleaned datasets & EDA documentation
β βββ STEP_3_EDA_REPORT.md
β βββ crop_yield_cleaned.csv
β
βββ requirements.txt # Python package dependencies
βββ README.md # Master project documentation
Developed by Kinetix. For feedback, inquiries, or contributions, please open a GitHub Issue or Pull Request.