Let's say that I want to fit some given data to the following model- $x^a$, where the value of a is not known(but it is always an integer) and I want to obtain the value of best fit for a. How should I go about doing this, given that $x^a$ is not differentiable for negative x but my dataset has negative values.
2026-03-28 08:17:13.1774685833
On
Curve fitting for non-differentiable function
97 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
2
On
If you're looking for $y_i \approx x_i^m$, compute $E_m :=\ \sum_i (y_i - x_i^m)^2$ for $m = \dots, -2, -1, 0, 1, 2, \dots$ and pick the $m$ minimizing $E_m$.
If you have a simple linear model $y\approx a x^m$, for $m = \dots, -2, -1, 0, 1, 2, \dots$ compute $\hat{a}_m := \sum_i x_i^m y_i/ \sum_i x_i^{2m}$ and $E_m := \sum_i(y_i - \hat{a}_mx_i^m)^2$ and pick the best $m$.
Your question is not strict so my answer can't be strict either. Suppose the following data is given: $(x_i,y_i)$,$x_i,\ y_i>0$ for $i=1,2,\ldots ,n$. One can use the following observation: $x_i^a\approx y_i \iff a\ln x_i\approx \ln y_i$. This transforms the initial problem to the model $y=ax$ for a dataset $(\ln x_i,\ln y_i)$.