Trefethen and Bau lecture 37 talks about the connection of orthogonal polynomials to Lanczos. The only difference between e.g. Legendre polynomials and your case (discrete collection of points) is the inner product.
Great, I“ll have it in mind! Thanks for the help!!
Great, Iāll check out the reference!! Thanks for the help!!
Update: I chatted with Nick Trefethen about this last night, and it turns out that he published a review in 2021 about how Arnoldi-based orthogonal polynomials can be used for accurate high-degree polynomial fitting:
- Pablo D. Brubeck, Yuji Nakatsukasa, and Lloyd N. Trefethen, āVandermonde with Arnoldiā, SIAM Review 63, doi.org/10.1137/19M130100X (2021).
It would be nice to have a Julia package implementing polyval and polyfit using this technique (although Chebyshev regression is a good alternative too), as well as simply constructing and evaluating the orthogonal polynomials over a discrete measure as in the R function.
Some of that is in the ArnoldiFit method of Polynomials.jl. A preprint was consulted at the time. Iāll review the published version to see if there were improvements or if I dropped something.