I am trying to fit data from a simulation to a particular class of polynomials, according to least squares approach.
data = Import["Mathematica file.txt", "Table"]
The polynomials are the shifted Chebyshev polynomials, that is: $${\displaystyle T_{n}^{*}(x)=T_{n}(2x-1)~.}$$ How could one use Mathematica to find the coefficients $a_0$, $a_1$ and so on in: $$\sum_{n=0}^N a_n T_{n}(2x-1)$$ which fits the imported data? Is there a way in Mathematica to find the goodness of fit in Mathematica?
NMinimize
to minimize norm of difference betweendata
and approximation with respect to $a_n$. Better you show example ofdata
. $\endgroup$