Novadotgg commited on
Commit
1fbd1fa
verified
1 Parent(s): b84e3dc

Added two models for crop recommendation

Browse files
Files changed (1) hide show
  1. README.md +112 -3
README.md CHANGED
@@ -1,7 +1,116 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  language:
3
  - en
4
- metrics:
5
- - accuracy
6
  pipeline_tag: question-answering
7
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ model_name: Crop Recommendation Model using Random Forest
3
+ tags:
4
+ - tabular-classification
5
+ - sklearn
6
+ - random-forest
7
+ - crop-recommendation
8
+ - agriculture
9
+ library_name: sklearn
10
+ inference: true
11
+ model_description: >
12
+ This crop recommendation model uses a Random Forest classifier to recommend
13
+ the best crop
14
+
15
+ based on environmental factors such as soil nutrients (N, P, K), pH,
16
+ temperature, rainfall,
17
+
18
+ and humidity. The model is trained to assist farmers in making optimal crop
19
+ choices based on
20
+
21
+ available agricultural data.
22
+
23
+
24
+ **Features Used:**
25
+
26
+ - Nitrogen (N)
27
+
28
+ - Phosphorus (P)
29
+
30
+ - Potassium (K)
31
+
32
+ - pH
33
+
34
+ - Temperature
35
+
36
+ - Rainfall
37
+
38
+ - Humidity
39
+
40
+
41
+ **Example Usage:**
42
+
43
+ ```python
44
+
45
+ import joblib
46
+
47
+ model = joblib.load("crop.pkl")
48
+ prediction = model.predict([[N, P, K, pH, temperature, rainfall, humidity]])
49
+ print("Recommended Crop:", prediction)
50
+ metrics:
51
+ - accuracy : 99.86(Random Forest), 99.88(adaboost)
52
  language:
53
  - en
 
 
54
  pipeline_tag: question-answering
55
+ ---
56
+ ---
57
+ models:
58
+ - model_name: "Crop Recommendation Model using Random Foresst classification"
59
+ tags:
60
+ - tabular-classification
61
+ - sklearn
62
+ - random-forest
63
+ - crop-recommendation
64
+ - agriculture
65
+ library_name: "sklearn"
66
+ inference: true
67
+ model_description: |
68
+ This crop recommendation model uses a Random Forest classifier to recommend the best crop
69
+ based on environmental factors such as soil nutrients (N, P, K), pH, temperature, rainfall,
70
+ and humidity. The model is trained to assist farmers in making optimal crop choices based on
71
+ available agricultural data.
72
+
73
+ **Features Used:**
74
+ - Nitrogen (N)
75
+ - Phosphorus (P)
76
+ - Potassium (K)
77
+ - pH
78
+ - Temperature
79
+ - Rainfall
80
+ - Humidity
81
+
82
+ **Example Usage:**
83
+ ```python
84
+ import joblib
85
+ model = joblib.load("crop.pkl")
86
+ # Predict the crop for a given set of environmental features
87
+ prediction = model.predict([[N, P, K, pH, temperature, rainfall, humidity]])
88
+ print("Recommended Crop:", prediction)
89
+ ```
90
+
91
+ - model_name: "Crop recommendation model using Adaboost ensemble method"
92
+ tags:
93
+ - tabular-classification
94
+ - sklearn
95
+ - adaboost
96
+ - decision-tree
97
+ - soil-analysis
98
+ library_name: "sklearn"
99
+ inference: true
100
+ model_description: |
101
+ This soil classification model is built using AdaBoost with a DecisionTreeClassifier as the base estimator.
102
+ It classifies soil types based on various properties like pH, nutrient levels, and other soil characteristics.
103
+
104
+ **Algorithm Details:**
105
+ - Base Learner: DecisionTreeClassifier with max_depth=3
106
+ - Boosting Method: AdaBoostClassifier with SAMME.R
107
+ - Number of Estimators: 500
108
+ - Learning Rate: 0.3
109
+
110
+ **Example Usage:**
111
+ ```python
112
+ import joblib
113
+ model = joblib.load("adaboost_model_soil.pkl")
114
+ prediction = model.predict([[feature1, feature2, ..., featureN]])
115
+ print("Predicted Soil Type:", prediction)
116
+ ```