混同行列の指標
混同行列 Metrics are a set of 評価指標 used to assess the performance of classification models in 機械学習 and 人工知能. They provide a comprehensive view of how well a model is performing by breaking down the results into different categories based on the predicted and actual classifications.
混同行列そのものは、分類問題の結果を要約した表であり、正解と不正解の予測数をクラスごとに示しています。混同行列の主な構成要素は次のとおりです:
- 真陽性(TP)>: The number of instances correctly predicted as positive.
- 真陰性(TN)>: The number of instances correctly predicted as negative.
- 偽陽性(FP)>: The number of instances incorrectly predicted as positive (also known as Type I error).
- 偽陰性(FN)>: The number of instances incorrectly predicted as negative (also known as Type II error).
これらの値から、いくつかの重要な指標を導き出すことができます:
- 正確さ>: The proportion of true results (both true positives and true negatives) among the total number of cases examined.
- 精度>: The ratio of true positives to the sum of true positives and false positives, indicating the accuracy of positive predictions.
- 想起 (感度)>: The ratio of true positives to the sum of true positives and false negatives, reflecting the model’s ability to identify positive instances.
- F1スコア>: The 調和平均 精度とリコールの両方をバランスさせる単一の指標を提供します。
これらの指標を分析することで、実務者は分類モデルの強みと弱みを理解し、さらなる改善や調整の指針とすることができます。