Project - Predicting Titanic Passenger Survival using Machine Learning and Python

You are currently auditing this course.
10 / 21

Titanic Machine Learning Project - Create Processing Pipeline

Now let's build our preprocessing pipelines.

INSTRUCTIONS

Import BaseEstimator and TransformerMixin from sklearn.base

from << your code goes here >> import << your code goes here >>

Now let's create the Pipeline.

class DataFrameSelector(BaseEstimator, TransformerMixin):
    def __init__(self, attribute_names):
        self.attribute_names = attribute_names
    def fit(self, X, y=None):
        return self
    def transform(self, X):
        return X[self.attribute_names]
Get Hint See Answer

Loading comments...