Skip to content
CampusEduX

Problem 2: Calculate AUC for Two Different Models

Easypython
Learn the Concept: ROC-AUC Curve

Problem Description

Write a Python program that trains both a Logistic Regression model and a Decision Tree model on the same dataset, and compares their AUC scores.

Input

A labeled dataset.

Output

The AUC score for both models.

Constraints

  • At least 10 labeled examples.

Example Input

text
(A labeled binary classification dataset)

Example Output

text
Logistic Regression AUC: 0.92 Decision Tree AUC: 0.85

Concepts Covered

roc_auc_score(), model comparison.

Related Problems

  • Problem 1: Calculate and Plot a Basic ROC Curve
    Easy · python
    Solve Problem
  • Problem 3: Calculate TPR and FPR at a Specific Threshold
    Easy · python
    Solve Problem
  • Problem 4: Compare AUC Across Different Feature Sets
    Easy · python
    Solve Problem

Input (stdin)

Output

Run your code to see output here...