Project - Predicting Titanic Passenger Survival using Machine Learning and Python

10 / 21

Titanic Machine Learning Project - Create Processing Pipeline

Now let's build our preprocessing pipelines.


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

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

Loading comments...