Briankabiru commited on
Commit
3570633
1 Parent(s): a296097

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +57 -7
README.md CHANGED
@@ -1,14 +1,64 @@
1
- # Random Forest Regressor for Nutrient Needs Prediction
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
- This repository contains a Random Forest Regressor model trained to predict the nutrient needs for various crops based on features such as target yield, field size, pH, organic carbon, total nitrogen, phosphorus, potassium, and soil moisture.
4
 
5
- ## Model Description
6
 
7
- The model is a Random Forest Regressor, which is an ensemble learning method for regression that operates by constructing multiple decision trees during training and outputting the average of the predictions of the individual trees. This approach helps in improving the model's accuracy and robustness.
8
 
9
  ## Training Data
10
- ## Usage
11
 
12
- ### Loading the Model
 
 
 
 
 
 
 
 
 
13
 
14
- To use the model, first load it using `joblib`:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ datasets:
4
+ - custom
5
+ metrics:
6
+ - mean_squared_error
7
+ - mean_absolute_error
8
+ - r2_score
9
+ model_name: Random Forest Regressor for Crop Nutrient Prediction
10
+ tags:
11
+ - random-forest
12
+ - regression
13
+ - agriculture
14
+ - soil-nutrients
15
+ ---
16
 
17
+ # Random Forest Regressor for Crop Nutrient Prediction
18
 
19
+ ## Overview
20
 
21
+ This model predicts the nutrient needs (Nitrogen, Phosphorus, Potassium) for various crops based on features like crop type, target yield, field size, and soil properties. It is trained using a Random Forest Regressor.
22
 
23
  ## Training Data
 
24
 
25
+ The model was trained on a custom dataset containing the following features:
26
+ - Crop Name
27
+ - Target Yield
28
+ - Field Size
29
+ - pH (water)
30
+ - Organic Carbon
31
+ - Total Nitrogen
32
+ - Phosphorus (M3)
33
+ - Potassium (exch.)
34
+ - Soil moisture
35
 
36
+ The target variables are:
37
+ - Nitrogen (N) Need
38
+ - Phosphorus (P2O5) Need
39
+ - Potassium (K2O) Need
40
+
41
+ ## Model Training
42
+
43
+ The model was trained using a Random Forest Regressor. Below are the steps taken for training:
44
+
45
+ 1. Data preprocessing: handling missing values, scaling numerical features, and one-hot encoding categorical features.
46
+ 2. Splitting the dataset into training and testing sets.
47
+ 3. Training the Random Forest model on the training set.
48
+ 4. Evaluating the model on the test set.
49
+
50
+ ## Evaluation Metrics
51
+
52
+ The model was evaluated using the following metrics:
53
+ - Mean Squared Error (MSE)
54
+ - Mean Absolute Error (MAE)
55
+ - R-squared (R2) Score
56
+
57
+ ## How to Use
58
+
59
+ ### Installation
60
+
61
+ To install the necessary packages, run:
62
+
63
+ ```bash
64
+ pip install -r requirements.txt