What is a logical approach to developing an algorithm which can find the optimal parameters for a function which make it best fit a given data set?

cs.stackexchange https://cs.stackexchange.com/questions/87895

Consider the highlighted columns in the following table:

life table

Starting with 100,000 newborns, $l_{x+2}$ denotes the number of individuals in the sample still alive at age $x+2$. If we consider Makeham's law of mortality, defined by the function $$ S_0(x) = \exp \left( -Ax - \frac{Bc^x - 1}{\log (c)} \right) $$ we find that for the correct parameters $A, B$ and $c$ this formula very closely models the actual number of deaths.

So my question is this, given a data set and a model with unknown parameters, what computational method may be used to approximate the optimal parameters for the model (which most closely fit the given data set)?

As a more simple example, suppose we are given the data set $$ X = \left\{ 1, 3, 5.1, 7, 9 \right\} $$ and are required to find the optimal parameters $A$ and $B$ such that the model $$ f(x) = Ax + B $$ most closely fits this data set. As humans, it is clear to see that the optimal parameters are $A = 2$ and $B = 1$. How might a computer deduce these values?

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 cs.stackexchange
scroll top