Crop-recommendation / README.md
Novadotgg's picture
Added two models for crop recommendation
1fbd1fa verified
|
raw
history blame
3.03 kB
---
model_name: Crop Recommendation Model using Random Forest
tags:
- tabular-classification
- sklearn
- random-forest
- crop-recommendation
- agriculture
library_name: sklearn
inference: true
model_description: >
This crop recommendation model uses a Random Forest classifier to recommend
the best crop
based on environmental factors such as soil nutrients (N, P, K), pH,
temperature, rainfall,
and humidity. The model is trained to assist farmers in making optimal crop
choices based on
available agricultural data.
**Features Used:**
- Nitrogen (N)
- Phosphorus (P)
- Potassium (K)
- pH
- Temperature
- Rainfall
- Humidity
**Example Usage:**
```python
import joblib
model = joblib.load("crop.pkl")
prediction = model.predict([[N, P, K, pH, temperature, rainfall, humidity]])
print("Recommended Crop:", prediction)
metrics:
- accuracy : 99.86(Random Forest), 99.88(adaboost)
language:
- en
pipeline_tag: question-answering
---
---
models:
- model_name: "Crop Recommendation Model using Random Foresst classification"
tags:
- tabular-classification
- sklearn
- random-forest
- crop-recommendation
- agriculture
library_name: "sklearn"
inference: true
model_description: |
This crop recommendation model uses a Random Forest classifier to recommend the best crop
based on environmental factors such as soil nutrients (N, P, K), pH, temperature, rainfall,
and humidity. The model is trained to assist farmers in making optimal crop choices based on
available agricultural data.
**Features Used:**
- Nitrogen (N)
- Phosphorus (P)
- Potassium (K)
- pH
- Temperature
- Rainfall
- Humidity
**Example Usage:**
```python
import joblib
model = joblib.load("crop.pkl")
# Predict the crop for a given set of environmental features
prediction = model.predict([[N, P, K, pH, temperature, rainfall, humidity]])
print("Recommended Crop:", prediction)
```
- model_name: "Crop recommendation model using Adaboost ensemble method"
tags:
- tabular-classification
- sklearn
- adaboost
- decision-tree
- soil-analysis
library_name: "sklearn"
inference: true
model_description: |
This soil classification model is built using AdaBoost with a DecisionTreeClassifier as the base estimator.
It classifies soil types based on various properties like pH, nutrient levels, and other soil characteristics.
**Algorithm Details:**
- Base Learner: DecisionTreeClassifier with max_depth=3
- Boosting Method: AdaBoostClassifier with SAMME.R
- Number of Estimators: 500
- Learning Rate: 0.3
**Example Usage:**
```python
import joblib
model = joblib.load("adaboost_model_soil.pkl")
prediction = model.predict([[feature1, feature2, ..., featureN]])
print("Predicted Soil Type:", prediction)
```