Chap06_Logistic Regression, SVM, 분류평가지표, GridSearch.pdf
Là một phương pháp đánh giá kết quả của những bài toán phân loại với việc xem xét cả những chỉ số về độ chính xác và độ bao quát của các dự đoán cho từng lớp
it is a performance measurement for machine learning classification problem where output can be two or more classes. It is a table with 4 different combinations of predicted and actual values.
Accuracy is used to measure the performance of the model. It is the ratio of Total correct instances to the total instance
Example:
Recall: measures the effectiveness of a classification model in identifying all relevant instances from a dataset. It is the ratio of the number of true positive (TP) instances to the sum of true positive and false negative (FN) instances.
recall : 재현율, 애매한거 사용
Precision: is a measure of how accurate a model’s positive predictions are. It is defined as the ratio of true positive predictions to the total number of positive predictions made by the model
precision: 정밀도, 애매한거 사용 안함
F1-score is used to evaluate the overall performance of a classification model.
It is the harmonic mean of precision and recall
정밀도와 재현율의 조화평균
Example:
knn.fit(x_train,y_train)
# knn model 사용
y_pred = knn.predict(x_test)
from sklearn.metrics import classification_report
print(classification_report(y_test, y_pred))
Explaination: