Flash Sale: Flat 70% + Addl. 25% Off on all Courses | Use Coupon DS25 in Checkout | Offer Expires In

  Enroll Now

Titanic Machine Learning Project - Create Pipeline for the Numerical Attributes

Let's build the pipeline for the numerical attributes:

INSTRUCTIONS

Create the pipeline and save it in a variable named num_pipeline:

from sklearn.pipeline import Pipeline
from sklearn.impute import SimpleImputer

<< your code goes here >> = Pipeline([
        ("select_numeric", DataFrameSelector(["Age", "SibSp", "Parch", "Fare"])),
        ("imputer", SimpleImputer(strategy="median")),
    ])

Now fit the training data in this pipeline:

num_pipeline.fit_transform(<< your code goes here >>)

No hints are availble for this assesment

Answer is not availble for this assesment


Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...