# Regression to predict probability (responses are only ratios) - what transformation to use?

I am working on a project where the training labels are given to me as a probability value in the range [0,1]. My first approach was to fit a simple linear ridge regression to predict the probability. This isn't ideal as:

1) Predictions from this model end up with values outside the range of 0 and 1 2) I don't think linear regression works that well if you want to make it predict something in a fixed interval.

I try the logit transformation, but since I have probabilities that are exactly 0 and 1, I perturb them slightly so I get 0.00001 and .999999 instead to avoid +/- infinity. I train my model on the transformed labels, and then make a prediction on the test set and undo the transformation with the inverse of the logit function (logistic function). Frustratingly though, this gives me even worse results than the naive linear regression!

Any suggestions on other transformations I can try or what I am doing wrong?

• Logistic regression if the values are ratios of counts; if they're a mix of 0/1 and continuous you may need to do something else – Glen_b -Reinstate Monica Nov 28 '13 at 10:35
• @Glen_b It's a mix of exactly 0 and 1's and continuous values between 0 and 1. If they were ratio of counts, couldn't there be exactly 0 and 1's as well? – mchangun Nov 28 '13 at 10:47
• Yes, if they were ratios of counts they could certainly be 0 and 1 as well -- that presents no problem for logistic regression. However, it's not suitable for the continuous values between 0 and 1. The 0s and 1s may need to be dealt with somewhat differently from the values in between. – Glen_b -Reinstate Monica Nov 28 '13 at 16:19
• What about a censored regression model? See e.g. cran.r-project.org/web/packages/censReg/vignettes/censReg.pdf – Fabian Nov 28 '13 at 21:41
• Do you know how the ratios were computed ? That is, do you know numerator and denominator counts? Or can estimate them somehow? If so you can transform data in form for logistic regression. – kjetil b halvorsen Sep 6 '18 at 19:54