Jump to content

Recommended Posts

Posted

Im planning to solve the following problem with trial and error in c++

 

 

find the minimum value of the following function .

 

d80db253633fc9f1c4de40b9991dfba1-1.png

 

 

"yi" and "xi" are the result of a complicated analysis on my lab data and I need to find a,b,c in a way that COST(a,b,c) function to be minimum.

 

 

after solving this equation by calculating the partial derivatives and force them to be equal to ZERO we obtain the attached equations for a b c.

 

 

 

post-68256-0-87188700-1329942405_thumb.jpg

 

post-68256-0-43150100-1329942415_thumb.jpg

 

post-68256-0-51899300-1329942420_thumb.jpg

 

 

as you can see we have to use the trial and error method to solve this problem for a b c

 

the problem is the first guess of a b c. based on the first guess the answer changes and usually goes to infinity !!!

 

Im asking you to help me to find the proper first guess.

 

Ive attached a set of sample xi yi data to the post too. data_file.txt

 

just in case I attach the c++ class I have programmed to this post too. PowerRegression.zip

 

.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.