hello As you have imported polynomial features and transformed the independent variable(X_train) for it be fitted in a polynomial regression then why did you put linearregression() as the estimator in the last tuple of the list?? shouldn't you have use polyfit function or something else? NOTE: I am a beginner here , so the doubts can be silly.
Good question! We have already created all the polynomial terms that we need, i.e., x, x^2, x^3, etc. Thus, we can now view this as a linear regression problem with respect to the "new/artificial" features.
@@DrDataScience one more thing I need to ask if you can spare some time, I have seen people do parameter scaling using StandardScaler() before polynomial features and estimator in a Pipeline argument, so is the scaling a necessary step or we can skip it??
I have a big one question: What is the difference of build a Machine Learning application with Pipeline and to build a machine learning application with a OOP technique? I see that it is the same.
Everything in Python is defined as a class so we use OOP all the time. Pipeline provides a nice flexible way to combine multiple transformers and an estimator.
Because each column corresponds to a feature or attribute of your data set. Thus, the number of elements in that column vector is equal to the number of samples.