text_html_output_1.png
clf = Pipeline(steps=[('preprocessor', preprocessor), ('model', model)])
final_model = clf.fit(X_train, y_train)
preds_valid = final_model.predict(X_valid)
print('MAE:', mean_absolute_error(y_valid, preds_valid))
print('RMSE:', mean_squared_error(y_valid, preds_valid, squared=False))