One of the assumptions of Linear Regression - No multicollinearity. You will need to remove multicollinearity in case you are building a Linear Regression model. After removing the variables that causing multicollinearity, then check for variable significance. Also, if you do not want to remove theRead more

One of the assumptions of Linear Regression – No multicollinearity. You will need to remove multicollinearity in case you are building a Linear Regression model. After removing the variables that causing multicollinearity, then check for variable significance.

The statsmodels.regression.linear_model.OLSResults.pvalues should give you the pvalues of the respective variables. pvalues[0] should give you the pvalues of the 1st variable. You can filter out the names of the variables wherever pvalues[i]<0.05 and then use the list of variable names to filterRead more

The statsmodels.regression.linear_model.OLSResults.pvalues should give you the pvalues of the respective variables. pvalues[0] should give you the pvalues of the 1st variable. You can filter out the names of the variables wherever pvalues[i]<0.05 and then use the list of variable names to filter out data as per need.

When all your independent variables are zero, without an intercept, logistic regression will predict a probability of 1/2. In order to avoid the same, adding an intercept is required. The intercept will help predict a class probability instead of simply returning 1/2 as the predicted probability.

When all your independent variables are zero, without an intercept, logistic regression will predict a probability of 1/2. In order to avoid the same, adding an intercept is required. The intercept will help predict a class probability instead of simply returning 1/2 as the predicted probability.

Its always a nice idea to follow coding conventions & standards. Code commenting also helps a lot in understanding the code written by other developers. The following need to be given attention to: Naming conventions, Code layout, Indentation, Comments. For python, the standard that is followedRead more

Its always a nice idea to follow coding conventions & standards. Code commenting also helps a lot in understanding the code written by other developers. The following need to be given attention to: Naming conventions, Code layout, Indentation, Comments.

For python, the standard that is followed is PEP8. PEP8 defines the style guide for python coding. A full style guide is documented in official python.org site: https://www.python.org/dev/peps/pep-0008/

## Dropping of variables which are not significant and are having high VIF value

## Dipayan Sarkar

One of the assumptions of Linear Regression - No multicollinearity. You will need to remove multicollinearity in case you are building a Linear Regression model. After removing the variables that causing multicollinearity, then check for variable significance. Also, if you do not want to remove theRead more

One of the assumptions of Linear Regression – No multicollinearity. You will need to remove multicollinearity in case you are building a Linear Regression model. After removing the variables that causing multicollinearity, then check for variable significance.

Also, if you do not want to remove the variables that causing multicollinearity but is turning out to be significant, then based on applicable assumptions, you can also try PrincipalComponent Analysis for dimensionality reduction. Note: PCA has a few assumptions – you can read more on this at https://statistics.laerd.com/spss-tutorials/principal-components-analysis-pca-using-spss-statistics.php

See less## Multiple Linear Regression

## Dipayan Sarkar

The statsmodels.regression.linear_model.OLSResults.pvalues should give you the pvalues of the respective variables. pvalues[0] should give you the pvalues of the 1st variable. You can filter out the names of the variables wherever pvalues[i]<0.05 and then use the list of variable names to filterRead more

The statsmodels.regression.linear_model.OLSResults.pvalues should give you the pvalues of the respective variables. pvalues[0] should give you the pvalues of the 1st variable. You can filter out the names of the variables wherever pvalues[i]<0.05 and then use the list of variable names to filter out data as per need.

See less## Constant in Logistic Regression

## Dipayan Sarkar

When all your independent variables are zero, without an intercept, logistic regression will predict a probability of 1/2. In order to avoid the same, adding an intercept is required. The intercept will help predict a class probability instead of simply returning 1/2 as the predicted probability.

When all your independent variables are zero, without an intercept, logistic regression will predict a probability of 1/2. In order to avoid the same, adding an intercept is required. The intercept will help predict a class probability instead of simply returning 1/2 as the predicted probability.

See less## Are there any coding standards in Python?

## Dipayan Sarkar

Its always a nice idea to follow coding conventions & standards. Code commenting also helps a lot in understanding the code written by other developers. The following need to be given attention to: Naming conventions, Code layout, Indentation, Comments. For python, the standard that is followedRead more

Its always a nice idea to follow coding conventions & standards. Code commenting also helps a lot in understanding the code written by other developers. The following need to be given attention to: Naming conventions, Code layout, Indentation, Comments.

For python, the standard that is followed is PEP8. PEP8 defines the style guide for python coding. A full style guide is documented in official python.org site: https://www.python.org/dev/peps/pep-0008/

You may also like to read – when NOT to use PEP8 @ https://realpython.com/python-pep8/#when-to-ignore-pep-8

See less