Invlogit() vs. sigmoid() - which one to use?

Hello! I am an engineering student currently learning bayesian stats. I want to model a time series of proportions (values between 0 and 1), using the Gaussian process.

I find that there seems to be 2 (inverse) link functions that I can use:

pm.math.sigmoid()
pm.math.invlogit()

I tried both and there are tiny differences in the posterior. Speed-wise, almost the same. (I only have 60 data points.)

My question is, which of these is preferable? Thanks!

Since you do not have a large dataset, these two functions should be the same. Going forward, sigmoid() is implemented in theano.nn and invlogit() is implemented in PyMC (via theano tensor ops).

They are the same function (up to machine epsilon).

1 Like

Hey there, Iā€™m wondering which of the two ought to be faster if you do have a large dataset?

You can use %%time in Jupyter notebook to run the two cases and find out.

I guess invlogit will be a bit longer as it actually call aesara sigmoid inside its function. But will look forward to the result of your comparison.

1 Like