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

  Enroll Now

Building Spam Classifier

23 / 27
   

Spam Classifier - Create a Pipeline to Transform the Entire Dataset

Now we will create a pipeline to transform the complete dataset.

INSTRUCTIONS
  • Import Pipeline from Scikit-learn:

    from sklearn.pipeline import << your code goes here >>
    
  • Next, we will create the pipeline with the transformers that we created earlier:

    preprocess_pipeline = Pipeline([
        ("email_to_wordcount", << your code goes here >>()),
        ("wordcount_to_vector", << your code goes here >>()),
    ])
    
  • Finally, we will use fit_transform() to transform the dataset:

    X_train_transformed = preprocess_pipeline.<< your code goes here >>(X_train)
    

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