Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende Evaluation Before and After Calibration | Calibration Methods in Practice
Quizzes & Challenges
Quizzes
Challenges
/
Model Calibration with Python

bookEvaluation Before and After Calibration

Tarea

Swipe to start coding

In this challenge, you will evaluate a classifier before and after probability calibration. You will train a logistic regression classifier on a binary dataset, compute predicted probabilities, and measure:

  • Brier score
  • Expected Calibration Error (ECE)
  • Calibration curve points

You will then apply isotonic regression calibration using CalibratedClassifierCV, recompute the same metrics, and compare the results.

Your goal:

  1. Train a logistic regression classifier on the dataset.

  2. Generate uncalibrated predicted probabilities.

  3. Apply isotonic calibration using CalibratedClassifierCV.

  4. Compute Brier score and a simple ECE metric before and after calibration.

  5. Print the results as two values:

    • brier_before, brier_after
    • ece_before, ece_after

Solución

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 2. Capítulo 6
single

single

Pregunte a AI

expand

Pregunte a AI

ChatGPT

Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla

Suggested prompts:

Can you explain this in simpler terms?

What are the main points I should remember?

Can you give me an example?

close

bookEvaluation Before and After Calibration

Desliza para mostrar el menú

Tarea

Swipe to start coding

In this challenge, you will evaluate a classifier before and after probability calibration. You will train a logistic regression classifier on a binary dataset, compute predicted probabilities, and measure:

  • Brier score
  • Expected Calibration Error (ECE)
  • Calibration curve points

You will then apply isotonic regression calibration using CalibratedClassifierCV, recompute the same metrics, and compare the results.

Your goal:

  1. Train a logistic regression classifier on the dataset.

  2. Generate uncalibrated predicted probabilities.

  3. Apply isotonic calibration using CalibratedClassifierCV.

  4. Compute Brier score and a simple ECE metric before and after calibration.

  5. Print the results as two values:

    • brier_before, brier_after
    • ece_before, ece_after

Solución

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 2. Capítulo 6
single

single

some-alt