• Advertisement

Archived

This topic is now archived and is closed to further replies.

Exponential regression

This topic is 5090 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Dear all, So sorry for pestering you like this. i am trying to solve an equation: I = (0.5)+A(1-e^(BV)) (0.5) is a constant - it won''t vary, but i''m still not sure what it is yet, about 0.5 i should say I know three points on the curve, and i need to regress in real time... I know I and V values. How would i go about regressing it? What steps should i take? (ps. this is not homework... again, it''s for my solar car group. Sorry it''s not game related, but this is the best forum for "coding maths" that i know of. ) Cheers, JB

Share this post


Link to post
Share on other sites
Advertisement
You could probably do a least squares regression. You can look up the closed form solution of the exponential least squares regression on mathworld.

Share this post


Link to post
Share on other sites
is there any other way to do it beside least squares least squares is slow :I

Because i know the form , shouldn''t you be able to work it out??

Cheers,
JB

Share this post


Link to post
Share on other sites
Of course I could work out the closed form, but why bother fight the lack of mathematics symbols posting it in text when mathworld has it all pretty like?

And probably least squares is as fast it gets as long as you''re trying to model an exponential function.

Share this post


Link to post
Share on other sites
The way I would do it would be to transform the data points such that they are linear, do a linear least squares regression, and then undo your transformation on the least squares equation and you''ll have an exponential function that reasonably models your data. I don''t know if this is faster then using a closed form exponential least squares regression, but the math may be simpler..

Share this post


Link to post
Share on other sites
maybe im an idiot, but i think you havnt fully explained what your problem is.

Share this post


Link to post
Share on other sites
Hi,

Thanks, i know you can do it with least squares, but that takes time to solve. Is there some other way to solve it?

I''ll re-state my problem if u don''t get it:

I = (0.5)+A(1-e^(BV))

I know I and V, (3 sets of data points) and i want to find A and B.


CHeerZ, JB

Share this post


Link to post
Share on other sites
What range and precision needed? I remember you saying something in that other thread about this being on some dinky 8-bit micro - does it have enough memory (or eprom-access-capability) to use a lookup table?

Share this post


Link to post
Share on other sites
wouldnt two sets of I and V be enough?

that would give you two equations and two unknown, otherwise youre just overdefining the problem, or am i still missing something?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Yes, i can have as many sets of i and v as i like. But how would i solve|

Cheers,
JB

Share this post


Link to post
Share on other sites

  • Advertisement