Problem 3: Build a Pipeline with Imputation, Scaling, and Modeling
Easypython
Learn the Concept: Scikit-learnProblem 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
textAccuracy: 0.85
Concepts Covered
Pipeline with 3 steps, SimpleImputer, StandardScaler, LogisticRegression.
Related Problems
- Problem 1: Build a Basic PipelineEasy · pythonSolve Problem
- Problem 2: Generate and Explore a Synthetic DatasetEasy · pythonSolve Problem
- Problem 4: Combine a Pipeline with GridSearchCVEasy · pythonSolve Problem