Pular para o conteúdo principal

Calculadora de Matriz de Confusão

Calcule Acurácia, Precisão, Recall, F1, Especificidade, NPV, FPR, FNR e Coeficiente de Correlação de Matthews a partir das contagens TP/TN/FP/FN de um classificador binário, com a fórmula e uma classificação de qualidade mostrada para cada métrica.

Entrada

Casos previstos corretamente como positivos.

Positivos reais que o modelo perdeu (previstos como negativos).

Negativos reais que o modelo marcou como positivos.

Casos previstos corretamente como negativos.

Saída

Overall quality

Your results will appear here.

Confusion matrix
Predicted PositivePredicted Negative
No data yet
Metrics
MetricFormulaValueRating
No data yet
Isso foi útil?

Mais formas de usar esta ferramenta

API REST

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"
  }'

Troque pela sua própria chave, da sua conta. Os campos da ferramenta viram o corpo da requisição — sem envelope.

Peça a um agente de IA

Use the IOTools `confusion-matrix-calculator` tool (Confusion Matrix Calculator) on this input:

YOUR_INPUT_HERE

Cole isto em qualquer agente conectado ao servidor MCP do IOTools e depois adicione sua entrada.

Widget para incorporar

<iframe
  src="https://iotools.cloud/embed/confusion-matrix-calculator/"
  width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
  title="Calculadora de Matriz de Confusão — 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>

Coloque isso na sua própria página — grátis, sem chave, só um link de volta.

Custo por chamada de API/MCPA partir de 5 créditos
Precisa de mais créditos?Ver preços

Também disponível via

Guias

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

  1. Enter True Positive (TP) — cases correctly predicted positive.
  2. Enter False Negative (FN) — actual positives the model missed.
  3. Enter False Positive (FP) — actual negatives the model flagged as positive.
  4. Enter True Negative (TN) — cases correctly predicted negative.
  5. 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.

precisionrecallsensitivityspecificityf1 scorematthews correlation coefficientmcctrue positive ratefalse positive rateclassification metricsmodel evaluationmachine learning

Ama as ferramentas? Livre-se dos anúncios.

Um único pagamento remove todos os anúncios da sua conta, para sempre. Sem assinatura, sem rastreamento.