I have a set of data (in ArrayCollection) and I need to fit a power function { f(x)= B + x^alpha } to it, before display in LineChart.
As result I need the alpha and B paremeter.
How to do this with Flex?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’re trying to solve a nonlinear regression. As explained on the latter page, you can use a method of steepest descent, or the Gauss-Newton algorithm.
Here is an online example. You can try out a fitting by entering data, and in box 4 enter the formula
a+Power(x,b). The method used there is called the method of differential correction, but I believe that is the same as Gauss-Newton. The solver is implemented in Javascript, which is closely related to ActionScript, so you might be able to follow the code there.There is a worked example of the method on this page.