I am getting this error while working on question 4 (Chapter 2) from the "Hands on Machine learning" book. This is the question "Try creating a single pipeline that does the full data preparation plus the final prediction". The solution is available in Github link, but the solution is giving me the error mentioned in the title. I used the housing data for my example. Please help me.
I wrote this command and it fired the following error:
prepare_select_and_predict_pipeline = Pipeline([
('preparation', full_pipeline),
('feature_selection', TopFeatureSelector(feature_importances, k)),
('svm_reg', SVR(**rnd_search.best_params_))
])
prepare_select_and_predict_pipeline.fit(housing,housing_labels)
Error:
TypeError: fit() takes 2 positional arguments but 3 were given
I would like to attach the solution from Github Solution of Question 2 from Github
But this isn't working for me. :(