Confidence Interval for Predictions Made by Sklearn LassoCV Regression Model

Viewed 240

I have a data set "X" with "n" samples, which was used for training a lasso regression model. There were "p" predictors in the dataset from which the LassoCV selected "k" of them in the final trained model. I will use this model to make predictions. I want to know the Confidence Interval for my predictions done by this model.

Assuming "y" are the true lables for my data, and "y^" are the predicted values by my model, and 90% of confidence to be of interest, the following formula was used:

conf_int = 1.645 * (np.sqrt(sum((y - y^)**2)/(n - k - 2)))

I was wondering if this formula is correct. If not, I appreciate it if you could provide me with some link or tutorial for that.

Thanks in advance for your opinions and comments

0 Answers
Related