Fitting function with crossing behaviour

82 Views Asked by At

I am looking for a function depending from one parameter, let's call it $\alpha$, to best fit the following data. However other parameters if needed can be added. enter image description here

The data show two asymptotes, for $x\rightarrow0$, $y \rightarrow1$ and for $x\rightarrow \infty$, $y \rightarrow x^{-0.5}$. But if the blue curve was obtained for $\alpha_1$ and the orange curve for $\alpha_2$, with $\alpha_2>\alpha_1$, then the $\alpha_2$-curve leaves the symptote $1$ earlier than the $\alpha_1$curve, but it reaches the $x^{-0.5}$-asymptote quicker, then the two curves need to cross at a given point. Increasing the value of $\alpha$ to $\alpha_3>\alpha_2$, the relative curve in green leaves the asymptote $1$ even earlier that the $\alpha_2$-curve, but it goes quicker the asymptote $x^{-0.5}$, so that it will cross firstly the $\alpha_1$-curve and then the $\alpha_2$-curve. And so on incresing $\alpha$. I hope that this behaviour is visible in the image, even if the curves are not well developed in all their branches. On the other side decreasing $\alpha$ the curves show a saturation effect, because they tend to stack on a limiting curve. Many thanks in advance.

2

There are 2 best solutions below

2
On

Write $F(x)=min(1, {1\over \sqrt x})$. This is the "asymptotic" target function. We are looking for a parametric smoothing $f(x,\alpha)$ so that when $\alpha \rightarrow 0$ we recover $F(x)$. In order to smooth $F$ we can consider a convolution of $F$ with a smoothing kernel. For example, the Gaussian gives:

https://www.desmos.com/calculator/lgqrlohz9s

enter image description here

8
On

Alternative solution: Apply a softmin to $min(1, {1\over \sqrt x})$

Note that $softmin(a,b)$ can be constructed from a softmax via ${1 \over softmax({1\over a}, {1\over b})}$ So for example,using the $p$ norm as the soft max: $M_p(a,b)=(a^p + b^p)^{1\over p}$ we can write $S_p(1,{1\over \sqrt x})=(1+x^-{p\over 2})^{-{1\over p}}$

With $p$ the smoothing parmeter. It is also easier to implement than the convolution:

https://www.desmos.com/calculator/axyjipxkv1