Skip to content
CampusEduX

Problem 4: Compare AUC Across Different Feature Sets

Easypython
Learn the Concept: ROC-AUC Curve

Problem Description

Write a Python program that trains two Logistic Regression models — one using only 1 feature, one using 2 features — on the same dataset, and compares their AUC scores to see if the additional feature improves performance.

Input

A labeled dataset with 2 features.

Output

AUC scores for both models.

Constraints

  • At least 10 labeled examples.

Example Input

text
(A labeled dataset with features "hours_studied" and "attendance")

Example Output

text
AUC with 1 feature: 0.85 AUC with 2 features: 0.93

Concepts Covered

roc_auc_score(), feature comparison.

Related Problems

  • Problem 1: Calculate and Plot a Basic ROC Curve
    Easy · python
    Solve Problem
  • Problem 2: Calculate AUC for Two Different Models
    Easy · python
    Solve Problem
  • Problem 3: Calculate TPR and FPR at a Specific Threshold
    Easy · python
    Solve Problem

Input (stdin)

Output

Run your code to see output here...