-
Least Squares Curve Graphing help
Looking for advice or to be pointed in the right direction for help or tutorials on calculating Least Squares Curves for a graphing app in Flash. I've tooled around the forums and FlashandMath.com and am getting some ideas but if anyone knows of good resources for working with this formula any input would be awesome!
Thanks
-
Viral tick
You may want to refine your search down. Mainly because there are two basic forms of this:
Linear Least Squares
Non-Linear Least Squares
the prior being relatively simple and can be found rather quickly. It's just a balanced average across the set.
The latter though is very broad and has multiple algorithms that fit under it. Mainly due to the type of curve function you'd like to start with along. It also sometimes requires more parameters then the linear method because you'll need initial and end positions predetermined for the curve.
I do not vow to know everything, and I can not guarantee what I say is correct. We are all learning, and I actually thank you the one with the questions for asking and stimulating my mind.
www.lordofduct.com - check out my blog, or contact me through my website. I'm always available for freelance work in Flex3/Actionscript 3.
how many times must I say it... the livedocs are your friend!
http://livedocs.adobe.com/flash/9.0/...l-classes.html
-
As was mentioned above, it's a matter of knowing what kind of curve you want to graph. By "curve," if you mean a simple linear regression line, you ought to easily be able to calculate the line, and specify start and end points of the line to graph based on the linear regression equation. For logistic, negative binomial, poisson, or other types of regression, you should be able to find simple logistic curve expressions for those two, specifying the appropriate parameters in the logit and so forth. It's basically a matter of getting Flash to recognize your data points so you can put the points into arrays and calculate the covariance matrix.
As for actually getting Flash to draw the line, I'm at a loss. With a linear regression line, you might be able to manipulate a movie clip of a line, but with curvilinear regression, the clip might not match your axis at all points.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|