Home > Software engineering >  Power function y=x ^ b c fitting in c
Power function y=x ^ b c fitting in c

Time:09-23

The recent problems encountered a
Regression parameters: y=x ^ b + c
This seems not linearization
Obtained with fitting toolbox in matlab I know
But don't know what is based on the principle of
I need in my small MFC program now regression parameters a, b, c, and then to get the function of zero
May know friends told algorithm or implementation, thanks

CodePudding user response:

Search: least squares polynomial fitting

CodePudding user response:

Provides two methods:
1. A rough way, in two steps: 1) - c y=ax ^ b on both sides of the exponential estimate y=ln (a) + BLN (X) to estimate a, 2 b) y=ax ^ b + c to b as known number estimated. A, c

2. The differential linear dy/da=x dy/db=abx ^ ^ b (1 b) dy/dc=1, 2) by the Taylor series expansion y=ax ^ b + c error equation ax=b according to the least squares solution of ABC
Don't try don't know whether it is feasible to,

CodePudding user response:

"Higher mathematics"

CodePudding user response:

The above mentioned method 1 has a problem, should find the minimum data set, first direct estimate estimate in logarithmic fitting a, c b
Specific methods: 1) find a data set minimum value (c), (2) translation variation data set (3) the exponential data set for each element, 4) fitting Y=ax ^ b

CodePudding user response:

Specific methods: 1) in fitting the data set from 3 PM (x1, y1) (x2, y2) (x3=SQRT (x1 * x2), y3) calculated c=(* y1 y2 - y3 * y3)/2 * (y1 and y2 - y3)
2) make X=ln (X)=ln Y (Y - c) Y=ln (a) + bX
3) using linear fitting method for parameters of a, b

CodePudding user response:

Calculation method of
General this iteration, such as gaussian iteration, gauss seidel iteration,

CodePudding user response:

In fitting y=ax ^ b + c first from the data set in the process of selecting qualified samples for c, then problem is converted into a simple power function of linear fitting, c of this calculation process is as follows:
Take (x1, y1) (x2, y2) samples, there are: y1 - c=ax1 ^ (1) y2 - c=b ax2 ^ b (2) to search satisfaction or basic conditions y3=x1 y3 * * x2 sample,
Such are: y3 - c=a (x1x2) ^ (3) b
Simultaneous (1) ~ (3) -c (y3) (y3 - c)=(y1 - c) * (y2 - c)
: c=(* y1 y2 - y3 * y3)/2 * (y1 and y2 - y3)

Mathematics is one of the best educational game

You know why I'm interested in this function fitting? Because if a picture of the brightness of the image to fit the function distribution, the human eye perception is more comfortable, I am in the process of solving the problem of color matching to fitting the function, thought simple, actually otherwise, and studies the cognitive said will be determined to be 2.2 b is very good,
Mathematics is the best tool that we solve the problem, the best trade also used mathematics to solve:)
  • Related