0Pricing
Deep Learning Academy · Lección

Precisión, recall, F1 y ROC-AUC

Más allá de la precisión para una evaluación real

Precisión, recall, F1 y ROC-AUC es una lección gratuita de Deep Learning Academy en CoddyKit. Esta es la lección 1 de 4. Puedes leer la lección completa abajo gratuitamente — luego la practicas en el navegador con un editor de código integrado y un tutor de IA 24/7. Forma parte de la ruta de aprendizaje de Deep Learning Academy, y tu progreso se sincroniza en la web y la app de CoddyKit. El curso de Deep Learning Academy incluye 4 lecciones en total.

Partes de esta lección aún no han sido traducidas y se muestran en inglés.

Accuracy Can Lie

When one class dominates, accuracy looks great even for a useless model. You need sharper metrics to judge real performance.

The Four Outcomes

Every prediction is a true positive, true negative, false positive, or false negative. These four counts power every richer metric.

Precision: Trust the Positives

Precision asks: of everything you flagged positive, how many truly were? High precision means few false alarms.

precision = tp / (tp + fp)

Recall: Catch Them All

Recall asks: of all the real positives, how many did you catch? High recall means few missed cases.

recall = tp / (tp + fn)

The Tradeoff

Push precision up and recall often drops, and the reverse. The right balance depends on the cost of each kind of mistake.

F1: One Balanced Score

The F1 score is the harmonic mean of precision and recall. It rewards models that keep both reasonably high.

f1 = 2 * p * r / (p + r)

Thresholds Move the Line

A classifier outputs a probability; the threshold decides positive versus negative. Sliding it reshapes precision and recall.

The ROC Curve

The ROC curve plots true positive rate against false positive rate across every threshold, showing the full tradeoff at a glance.

ROC-AUC in One Number

ROC-AUC is the area under that curve. It captures ranking quality with one threshold-free number from zero to one.

from sklearn.metrics import roc_auc_score

Reading AUC Values

An AUC of 0.5 is random guessing, while 1.0 is perfect separation. Higher means the model ranks positives above negatives well.

Pick the Metric That Fits

Choose your metric by the task: recall for disease screening, precision for spam filters, AUC for ranking quality.

Quick Check

Think about which metric counts how many real positives you successfully caught.

Recap

Go beyond accuracy with precision, recall, F1, and ROC-AUC. Each answers a different question, so match the metric to your goal. 🎯

Preguntas frecuentes

¿La lección «Precisión, recall, F1 y ROC-AUC» es gratis?

Sí — el texto completo de «Precisión, recall, F1 y ROC-AUC» es gratis para leer aquí en la web. Para practicarla de forma interactiva (editor de código integrado y tutor de IA 24/7) y desbloquear el resto del curso de Deep Learning Academy, actualiza a CoddyKit PRO. El curso de Deep Learning Academy incluye 4 lecciones en total.

¿Qué aprenderé en «Precisión, recall, F1 y ROC-AUC»?

Más allá de la precisión para una evaluación real Practicas Deep Learning Academy con código real que ejecutas directamente en el navegador, y un tutor de IA 24/7 responde tus preguntas mientras trabajas en la lección.

¿Necesito experiencia previa para empezar Deep Learning Academy?

No se requiere experiencia previa. Deep Learning Academy en CoddyKit está estructurado para principiantes hasta estudiantes avanzados, así que puedes empezar aquí o desde el inicio y avanzar a tu ritmo. Esta es la lección 1 de 4.

¿Cuánto tiempo toma la lección «Precisión, recall, F1 y ROC-AUC»?

La mayoría de las lecciones de CoddyKit toman alrededor de 5–10 minutos. Cada una es compacta e interactiva, así que avanzas constantemente y retomas exactamente por donde dejaste en la web y la app.

¿Puedo escribir y ejecutar código en esta lección de Deep Learning Academy?

Sí. Cada lección de Deep Learning Academy incluye un editor de código integrado, así que escribes y ejecutas código real directamente en tu navegador y obtienes retroalimentación instantánea de IA — sin configuración local necesaria.

Todas las lecciones de este curso

  1. Precisión, recall, F1 y ROC-AUC
  2. Matrices de confusión y análisis de errores
  3. Grad-CAM: vea qué observa el modelo
  4. Calibre la confianza
← Volver a Deep Learning Academy