Skip to content

Instantly share code, notes, and snippets.

@AI-MOO
Created May 6, 2022 10:32
Show Gist options
  • Save AI-MOO/305345174bb96e51cfbe240535abdf17 to your computer and use it in GitHub Desktop.
Save AI-MOO/305345174bb96e51cfbe240535abdf17 to your computer and use it in GitHub Desktop.
# تدريب النموذج على بيانات التدريب
RF_clf = RandomForestClassifier().fit(X_train, y_train)
# اختبار النموذج عن طريق توقع بيانات الاختبار
RF_prediction = RF_clf.predict(X_test)
# التحقق من ضبط النموذج عن طريق مقارنة القيم الحقيقية و القيم المتوقعة
RF_accuracy = accuracy_score(y_test, RF_prediction)*100
# Accuracy | الضبط
print('K Nearest Neighbors Classifier accuracy: {}%'.format(RF_accuracy))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment