प्रोडक्शन के लिए मशीन लर्निंग मॉडल विकसित करना
Sinan Ozdemir
Data Scientist, Entrepreneur, and Author
स्कीमा टेस्ट अपेक्षित डेटा फॉर्मेट और डेटा टाइप जाँचते हैं
Great Expectations जैसे टूल इस प्रक्रिया को ऑटोमेट करने में मदद करते हैं


सेटअप:
import numpy as np
from sklearn.ensemble import RandomForestClassifier
from sklearn.inspection import permutation_importance
# Train a random forest classifier (assuming we have some data)
model = RandomForestClassifier().fit(X_train, y_train)
हमारा permutation importance टेस्ट चलाना:
# Calculate feature importances using permutation importance
results = permutation_importance(model, X_test, y_test, n_repeats=10, random_state=42)
# Print the feature importances
feature_names = ['feature_1', 'feature_2', 'feature_3', ...]
importances = results.importances_mean
for i in range(len(feature_names)):
print(f'{feature_names[i]}: {importances[i]}')
प्रोडक्शन के लिए मशीन लर्निंग मॉडल विकसित करना