I have data that has approximately sigmoid shape, so I think that fitting some form of logistic function would be a good idea. But as much as I know, this is used only when dealing with discrete class labels, and I have continuous data. Basically, x(features) is a continuous 1-D vector, and y(labels) is a continuous 1-D vector as well. What would be the best approach?

asked Aug 01 '11 at 15:22

Viktor%20Simjanoski's gravatar image

Viktor Simjanoski
193212529

edited Aug 02 '11 at 06:54

Alexandre%20Passos's gravatar image

Alexandre Passos ♦
2554154278421


2 Answers:

You can fit a generalized linear model using any loss function you want. For example, you can minimize ||sigmoid(w dot x) - y||², or maybe ||w dot x - inverse_sigmoid(y)||², where inverse_sigmoid is the inverse of the sigmoid function (that is, inverse_sigmoid(sigmoid(x)) = x for all x). The second objective function is certainly convex (I'm not sure about the first, I haven't checked either way), so putting it through any optimizer should give you reasonable results. You might also want to add regularization terms.

answered Aug 01 '11 at 15:30

Alexandre%20Passos's gravatar image

Alexandre Passos ♦
2554154278421

How would I do this in matlab?

(Aug 01 '11 at 15:49) Viktor Simjanoski

I don't know matlab, but for the second option above you can compute the inverse of the sigmoid inverse_sigmoid(x) = log(x/(1-x)) of y and then use any linear regression function from x to inverse_sigmoid(y). Of course, y should lie between 0 and 1, but if it doesn't you can always scale and add a constant so that it does.

(Aug 01 '11 at 15:55) Alexandre Passos ♦

In such a situation I would probably start with something simple like polynomial regression.

answered Aug 01 '11 at 16:35

alto's gravatar image

alto
60351124

Your answer
toggle preview

powered by OSQA

User submitted content is under Creative Commons: Attribution - Share Alike; Other things copyright (C) 2010, MetaOptimize LLC.