Sklearn.linear_model.Lasso returns coefficients that are both +0 and -0?

Viewed 212
1 Answers

Linear regression models can compute negative coefficients and -0 is the result of rounding originally negative numbers. A comparison like -0 == 0 will yield True and they behave the same for most operations. However, in operations where the sign is important it will make a difference. Thus, it would account as information loss to drop the - sign.

For more information on -0 and its behavior in Python, I refer to the answer(s) of this question.

Related