Linear Regression with Scikit Learn lesson 1 LR vs FS

I’ve seen in some datasets where feature selection is done before linear regression… I’m confused about whether this is right or wrong.

can we do feature selection before linear regression or after linear regression before feature selection?

You can do both, but ML is mostly about trying different ideas every time and tune the previous model with respect to the current model. So you can begin with some selected features after checking correlations with the data. For example, there is hardly any need to select a feature which has 0(close to) correlation with the target column because it means that the column doesn’t effect the values of the target column. So you can easily skip this column for training. After you train your model for the first time you might find the results are poor. Now, you can do feature selection again and check which features impacts your model the most.

So what I understood from this is that we can do Feature selection multiple times considering the correlation. Can I say linear regression is used for feature selection? What is lasso ridge in LR and entropy.

I would not say LR is used for feature selection, it’s just that you can select some features and generate prediction using those features and check the accuracy if you are not satisfied with the accuracy you can now add/remove some features that you might think will help you improve the model and continue till you are finally satisfied with a model.
You can check the thread by @tanyachawla below to know more about lasso, ridge.