Logistic regression: fit only offset

Skip to first unread message

Sathish Thiyagarajan

Mar 29, 2022, 7:38:21 AMMar 29
to TensorFlow Probability
Hi all,

I am looking to perform logistic regression with fixed slope on data (x,y) where y = 0 or 1 and x is one dimensional. I want to fit the model where probability of y=1 is c_0 + c_1/(1+exp((x-x0)/w)) where c_0, c_1 and the slope w are already known, and x0 is the only unknown. As far as I can see, I can write a class that inherits from tfp.glm.ExponentialFamily to do this. The only problem is that tensorflow seems to infer number of parameters from the shape of the x matrix, and I cannot find a way to tell it to fit only the offset x_0 and not the slope w. Does anyone know a fix? Thanks!

Reply all
Reply to author
0 new messages