how to search the optimal parameter

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

how to search the optimal parameter

Qian Yu
This post has NOT been accepted by the mailing list yet.
Hi,everyone
    I'm searching for an optimal value of "a" belong to the scale [1.05, 131.5] at interval that is 0.05, “b" belong to the scale of [0, (a-1)/a] at interval that is (a-1)/30a
    To minimize the sum of "u^2" by each value of code(1,2,3,4,...), where u=y-ax1-bx2, we need to search the optimal value of "a" and "b" within their respective scale and interval for each value of code(1,2,3,4,...).
    How should I write the program for this task?

the format of data goes as following:
code   y           x1          x2
1 4.65605 .7904362 -1.918414
1 8.55465 .388749 -1.823626
1 .5072982 6.095053 -1.758411
2 .0668553 .0946494 -.0795475
2 4.346485 .0366412 .3990744
2 .453282 .6764894 .5537513
2 2.514498 4.424465 -3.335462
3 5.027869 6.576887 5.750454
3 1.121937 5.153405 2.404536
3 .3745422 .2155463 -.2841324
3 1.061227 .0074581 -.0889647
4 3.328544 12.11974 -6.351465
4 .1192554 .3238932 -.196535
4 71.84912 .3888368 5.285602
. .             .   .
. .             .   .

Many thanks in advance,
Qian