Downloads · 30 days
0
prathamrajbhar11/Bijamitra-crop-recommendation
Bijamitra-crop-recommendation is a machine learning model from prathamrajbhar11. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for sklearn. The card lists the license as mit.
Part of the KissanSahyog agritech platform.
Downloads · 30 days
0
Access
Public
Updated Apr 6, 2026
Repo size
14.7 MB
Likes
0
Public
Click a slice to open those files.
.pkl14.7 MB · 100%
From the Hugging Face model README
Part of the KissanSahyog agritech platform.
Bijamitra (Hindi/Sanskrit: बीजमित्र) means "seed's friend".
| File | Description |
|---|---|
crop_model.pkl | Multi-class crop classifier |
crop_columns.pkl | Input feature column order |
label_encoder.pkl | Crop label encoder |
npk_label_encoder.pkl | NPK category encoder |
npk_columns.pkl | NPK feature columns |
N, P, K, pHTemperature, Humidity, Rainfallimport joblib
import numpy as np
model = joblib.load("crop_model.pkl")
encoder = joblib.load("label_encoder.pkl")
# Example input [N, P, K, pH, Temp, Humid, Rain]
features = np.array([[90, 42, 43, 6.5, 20.8, 82, 202]])
proba = model.predict_proba(features)[0]
# Get top 3 recommendations
top3_idx = np.argsort(proba)[-3:][::-1]
for i in top3_idx:
print(f"{encoder.classes_[i]}: {proba[i]:.2f}")