#NoPayJan Offer - Access all CloudxLab Courses for free between 1st to 31st Jan

  Enroll Now >>

Titanic Machine Learning Project - Create Pipeline for the Numerical Attributes

Let's build the pipeline for the numerical attributes:


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...