JohanBeytell commited on
Commit
29ba864
·
verified ·
1 Parent(s): 393d2f7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +91 -3
README.md CHANGED
@@ -1,3 +1,91 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ metrics:
6
+ - accuracy
7
+ pipeline_tag: tabular-classification
8
+ tags:
9
+ - recommendation
10
+ - classification
11
+ - crop-recommendation
12
+ ---
13
+
14
+ # Model Card for Infinitode/CRM-OPEN-ARC
15
+
16
+ Repository: https://github.com/Infinitode/OPEN-ARC/
17
+
18
+ ## Model Description
19
+
20
+ OPEN-ARC-CR is a straightforward XGBClassifier model developed as part of Infinitode's OPEN-ARC initiative. It was trained to recommend crops that will thrive under specific environmental constraints and variables.
21
+
22
+ **Architecture**:
23
+
24
+ - **XGBClassifier**: Default XGB hyperparams
25
+ - **Framework**: XGBoost
26
+ - **Training Setup**: Trained with `use_label_encoder=False` and used `eval_metric='mlogloss'`.
27
+
28
+ ## Uses
29
+
30
+ - Identifying appropriate crops for specific environmental conditions.
31
+ - Enhancing crop production by determining optimal environments for growth.
32
+ - Investigating factors that influence crop yields and those that limit productivity.
33
+
34
+ ## Limitations
35
+
36
+ - Potentially generates implausible or inappropriate recommendations when influenced by extreme outlier values.
37
+ - May provide inaccurate recommendations; exercise caution when relying on these outputs.
38
+
39
+ ## Training Data
40
+
41
+ - Dataset: Crop Recommendation Dataset from Kaggle.
42
+ - Source URL: https://www.kaggle.com/datasets/varshitanalluri/crop-recommendation-dataset
43
+ - Content: Soil properties, rainfall patterns, and other agricultural metrics, coupled with the recommended crop.
44
+ - Size: 2200 entries of crop recommendations.
45
+ - Preprocessing: Label-encoded target `Crop` using `sklearn's LabelEncoder`.
46
+
47
+ ## Training Procedure
48
+
49
+ - Metrics: accuracy
50
+ - Train/Testing Split: 80% train, 20% testing.
51
+
52
+ ## Evaluation Results
53
+
54
+ | Metric | Value |
55
+ | ------ | ----- |
56
+ | Train Accuracy | not used |
57
+ | Testing Accuracy | 98.6% |
58
+
59
+ ## How to Use
60
+
61
+ ```python
62
+ def test_random_samples(model, X_test, y_test, le, n_samples=6):
63
+ # Select 6 random indices
64
+ random_indices = random.sample(range(X_test.shape[0]), n_samples)
65
+
66
+ # Extract the random samples
67
+ X_sample = X_test.iloc[random_indices, :]
68
+ y_true_sample = y_test.iloc[random_indices]
69
+
70
+ # Predict crop recommendations
71
+ y_pred_sample = model.predict(X_sample)
72
+
73
+ # Decode the predictions and ground truth back to crop names
74
+ crops_pred = le.inverse_transform(y_pred_sample)
75
+ crops_true = le.inverse_transform(y_true_sample)
76
+
77
+ # Display the results
78
+ for i in range(n_samples):
79
+ print(f"Sample {i+1}:")
80
+ print(f"Features: \n{X_sample.iloc[i]}")
81
+ print(f"Predicted Crop: {crops_pred[i]}")
82
+ print(f"Ground Truth: {crops_true[i]}")
83
+ print("-" * 30)
84
+
85
+ # Test the function with random samples
86
+ test_random_samples(model, X_test, y_test, le)
87
+ ```
88
+
89
+ ## Contact
90
+
91
+ For questions or issues, open a GitHub issue or reach out at https://infinitode.netlify.app/forms/contact.