混同行列計算機
二項分類器のTP/TN/FP/FNカウントから精度、適合率、再現率、F1、特異度、NPV、FPR、FNRおよびマシューズ相関係数を計算します。各メトリクスの公式と品質格付けが表示されます。
入力
正しく予測された正例。
モデルが見落とした実際の正例(陰性と予測)。
モデルが正と判定した実際の陰性例。
正しく予測された陰性例。
出力
Your results will appear here.
| Predicted Positive | Predicted Negative | |
|---|---|---|
| No data yet | ||
| Metric | Formula | Value | Rating |
|---|---|---|---|
| No data yet | |||
このツールを使う他の方法
REST API
curl -X POST https://api.iotools.cloud/v1/tool/confusion-matrix-calculator \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"truePositive": "50",
"falseNegative": "10",
"falsePositive": "5",
"trueNegative": "100"
}'ご自身のアカウントのキーに差し替えてください。ツールのフィールドがそのままリクエストボディになります——ラッパーはありません。
AIエージェントに依頼する
Use the IOTools `confusion-matrix-calculator` tool (Confusion Matrix Calculator) on this input:
YOUR_INPUT_HEREIOTools MCPサーバーに接続された任意のエージェントにこれを貼り付け、入力内容を追加してください。
埋め込みウィジェット
<iframe
src="https://iotools.cloud/embed/confusion-matrix-calculator/"
width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
title="混同行列計算機 — iotools.cloud"
sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
allow="clipboard-write"
style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>ご自身のページに貼り付けるだけ——無料、キー不要、リンクを掲載するだけです。
| API/MCP 1回あたりの費用 | 5クレジットから |
|---|---|
| クレジットが足りませんか? | 料金を見る |
次の方法でも利用可能
ガイド
What does this calculator do?
Enter the four counts from a binary classifier's confusion matrix — True Positive, False Negative, False Positive, and True Negative — and get every standard evaluation metric computed instantly: Accuracy, Precision, Recall, Specificity, F1 Score, Matthews Correlation Coefficient (MCC), Negative Predictive Value, False Positive Rate, False Negative Rate, and a Balanced Accuracy estimate. Each metric shows its formula and a quality rating (Excellent / Good / Fair / Poor), so you don't have to remember which formula is which or re-derive them by hand.
How to use it
- Enter True Positive (TP) — cases correctly predicted positive.
- Enter False Negative (FN) — actual positives the model missed.
- Enter False Positive (FP) — actual negatives the model flagged as positive.
- Enter True Negative (TN) — cases correctly predicted negative.
- Read the results: an overall quality gauge, the matrix laid out as a table, and every metric with its formula and rating.
Why use MCC instead of just Accuracy?
Accuracy can be misleading on imbalanced datasets — a classifier that always predicts "negative" on a dataset that's 99% negative scores 99% accuracy while catching zero positives. Matthews Correlation Coefficient uses all four confusion-matrix counts in one balanced measure, ranging from -1 (total disagreement) to +1 (perfect prediction), with 0 meaning no better than random guessing — which is why it's considered the more reliable single number for imbalanced classes.
What's the difference between Precision and Recall?
Precision answers "of everything I predicted positive, how much was actually positive?" (TP / (TP+FP)) — it penalizes false alarms. Recall (Sensitivity) answers "of everything that was actually positive, how much did I catch?" (TP / (TP+FN)) — it penalizes misses. The two trade off against each other, which is why F1 Score (their harmonic mean) is often reported as a single balance point between them.
Is the "AUC estimate" a real AUC?
Not exactly — a true ROC AUC needs classifier scores across many decision thresholds, which a single confusion matrix (one threshold) can't provide. The "AUC estimate" shown here is Balanced Accuracy — the average of Recall and Specificity — a common single-threshold approximation, not a substitute for computing a real ROC curve if you have per-sample scores.
Privacy
All calculations run locally in your browser — your counts are never sent to a server.
For evaluating whether a difference between two rates is statistically significant (e.g. comparing two models' conversion or error rates), see the A/B Test Significance Calculator. To plan how much data you'd need to detect a given effect size before collecting it, see the A/B Test Sample Size Calculator.