What are the ways to correct for heteroskedasticity in a linear regression?
How to perform this in Python?
To check for heteroscedasticity you can use statsmodels.stats.diagnostic library in python. There are 3 kinds of tests: het breuschpagan, het white and het_goldfeldquandt.
To correct heteroskedasticity , you can use a Box-cox transformation give your data the aspect of a normal distribution. To apply the Box-cox transformation, you can see the documentation.