I am trying to do a simple regression task using a pipeline to assign the degree of the polynomial used for the regression (degree = 3). So I define:
pipe = make_pipeline(PolynomialFeatures(3), BayesianRidge())
And then the fitting:
pipe.fit(X_train, y_train)
And finally the prediction bit:
y_pred = pipe.predict(X_test)
BayesianRidge() of the sklearn has a return_std
parameter for its predict method that when set to True, it returns standard deviation of predictive distribution of query points.
Is there anyway that I can get this standard deviation array using a pipeline?