Skip to content
C

Problem 3: Build a Pipeline with Imputation, Scaling, and Modeling

Easypython

Problem Description

Write a Python program that builds a 3-step Pipeline: SimpleImputer (mean strategy), StandardScaler, and LogisticRegression, then trains and evaluates it on a dataset with missing values.

Input

A dataset with some missing numeric values.

Output

The trained pipeline's accuracy on a test set.

Constraints

  • At least 20 examples with some missing values.

Example Input

text
(A dataset with a few NaN values in numeric columns)

Example Output

text
Accuracy: 0.85

Concepts Covered

Pipeline with 3 steps, SimpleImputer, StandardScaler, LogisticRegression.

Input (stdin)

Output

Run your code to see output here...