OPEN-ARC Open Models
Collection
A collection of available base models for our OPEN-ARC project: https://github.com/Infinitode/OPEN-ARC.
•
5 items
•
Updated
Repository: https://github.com/Infinitode/OPEN-ARC/
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.
Architecture:
use_label_encoder=False
and used eval_metric='mlogloss'
.Crop
using sklearn's LabelEncoder
.Metric | Value |
---|---|
Train Accuracy | not used |
Testing Accuracy | 98.6% |
def test_random_samples(model, X_test, y_test, le, n_samples=6):
# Select 6 random indices
random_indices = random.sample(range(X_test.shape[0]), n_samples)
# Extract the random samples
X_sample = X_test.iloc[random_indices, :]
y_true_sample = y_test.iloc[random_indices]
# Predict crop recommendations
y_pred_sample = model.predict(X_sample)
# Decode the predictions and ground truth back to crop names
crops_pred = le.inverse_transform(y_pred_sample)
crops_true = le.inverse_transform(y_true_sample)
# Display the results
for i in range(n_samples):
print(f"Sample {i+1}:")
print(f"Features: \n{X_sample.iloc[i]}")
print(f"Predicted Crop: {crops_pred[i]}")
print(f"Ground Truth: {crops_true[i]}")
print("-" * 30)
# Test the function with random samples
test_random_samples(model, X_test, y_test, le)
For questions or issues, open a GitHub issue or reach out at https://infinitode.netlify.app/forms/contact.