Skip to content

Instantly share code, notes, and snippets.

@AI-MOO
Last active May 6, 2022 09:34
Show Gist options
  • Save AI-MOO/766dbf184fe00017febe541a203b88e5 to your computer and use it in GitHub Desktop.
Save AI-MOO/766dbf184fe00017febe541a203b88e5 to your computer and use it in GitHub Desktop.
# تدريب النموذج على بيانات التدريب
LR_clf = LogisticRegression().fit(X_train, y_train)
# اختبار النموذج عن طريق توقع بيانات الاختبار
LR_prediction = LR_clf.predict(X_test)
# التحقق من ضبط النموذج عن طريق مقارنة القيم الحقيقية و القيم المتوقعة
LR_accuracy = accuracy_score(y_test, prediction)*100
# Accuracy | الضبط
print(f'Logistic Regression Classifier accuracy: {LR_accuracy:.2f} %')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment