When to use `pm.math.sigmoid` and `pm.math.invlogit` for Logistic Regression?


The subject of my question is pretty straight forward. When to use which?

Also, why is the pm.math.sigmoid defined in the docs as “Logistic sigmoid function (1 / (1 + exp(x))” while the sigmoid function is defined as (1 / (1 + exp(-x)) according to Wikipedia? And then, in the docs, the pm.math.invlogit is defined with the -x in the exponent, as the sigmoid function in Wikipedia.

Thank you!

They are equivalent. I suspect the exp(x) is a typo, but maybe @ricardoV94 can confirm?

1 Like

Hi, just a ‘reminder’ that the typo is still there in the documentation of the sigmoid function.

1 Like

Would you want to open an issue so that it get attention? You can do so here. The relevant line is here.

1 Like