test set.
pipeline.fit(X_train, y_train) y_test_predicted = pipeline.predict(X_test)
Finally, we are calculating the R-squared score and the Root Mean Square Error (RMSE) of the model.
The output of the above program will be:
mpg cylinders displacement ... model_year origin name 0 18.0 8 307.0 ... 70 usa chevrolet chevelle malibu 1 15.0 8 350.0 ... 70 usa buick skylark 320 2 18.0 8 318.0 ... 70 usa plymouth satellite 3 16.0 8 304.0 ... 70 usa amc rebel sst 4 17.0 8 302.0 ... 70 usa ford torino [5 rows x 9 columns] R2: 0.6913464595250509 RMSE: 4.6256421930191784








































0 Comments