Skip to content
CampusEduX

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

Easypython
Learn the Concept: Scikit-learn

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.

Related Problems

  • Problem 1: Build a Basic Pipeline
    Easy · python
    Solve Problem
  • Problem 2: Generate and Explore a Synthetic Dataset
    Easy · python
    Solve Problem
  • Problem 4: Combine a Pipeline with GridSearchCV
    Easy · python
    Solve Problem

Input (stdin)

Output

Run your code to see output here...