3
$\begingroup$

I am new to Data Science and Machine Learning. I am trying to approximate constant parameters of any generalized not necessarily polynomial function given the input, desired output and the form of the function using neural network. Is there any other way to do it using neural network or should I use some other technique? For example this is one of the functions whose parameters par6 and par7 I am trying to approximate:

enter image description here

I have the values for x and f2(x). Any help will be appreciated. Thank You.

$\endgroup$
3
$\begingroup$

There are general techniques around. E.g., https://en.wikipedia.org/wiki/Non-linear_least_squares, https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.curve_fit.html

For your specific example, there's a linearization (depending on the values that $y$ can take on):

$$ \begin{align*} y &= \left[1+\left(\frac{x_1-x_2}{p_6}\right)^{p_7}\right]^{-1} \\ \frac1y-1 &= \left(\frac{x_1-x_2}{p_6}\right)^{p_7} \\ \frac1y-1 &= \left( \frac1{p_6}\right)^{p_7} (x_1-x_2)^{p_7} \\ \underbrace{\log\left(\frac1y-1\right)}_{y'} &= \underbrace{-p_7\log p_6}_{a} + \underbrace{p_7}_b\underbrace{\log(x_1-x_2)}_{x'} \end{align*}$$ At this point, your original problem is expressed as a linear model. Of course, the error terms are now skewed from what they originally might have been, and taking the logarithm won't have worked if $y\notin(0,1)$.

$\endgroup$
2
$\begingroup$

I would try some kind of grid search or a genetic algorithm.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.