On Sun, Sep 1, 2024 at 6:48 AM Rakshit Singh <rakshitsingh...@gmail.com> wrote:
> Best Wishes > > I am really hesitant of changing the api, some packages might be dependent > on it. > > Regards > Rakshit Kr. Singh > > On Sun, Sep 1, 2024, 5:54 PM oc-spam66--- via NumPy-Discussion < > numpy-discussion@python.org> wrote: > >> I can summarize the different possibilities/proposals: >> (A) Create new properties: add a `P.coef_natural` property, with a >> suitable documentation ; maybe also add a `P.coef_internal` property. There >> would be no change to the existing code (only addition of properties). >> (B) Change `P.coef` attribute into a property, with a suitable >> documentation. Hide `P.coef` attribute into `P._coef` (change existing >> code). Do not create more properties (unlike A). >> >> - About (A), I don't think that adding `P.coef_natural` would add a risk. >> - About (B), it may be appreciated that the API does not change (does not >> occupy more namespace) >> - Both (A) and (B) would help basic users to get out of the `P.coef` >> attribute confusion. >> >> Side remark (not important): >> > "natural" coefficients make very little if any sense for some of the >> other polynomial subclasses, such as Chebyshev -- for those, there's >> nothing natural about them! >> Are you sure? Can they not be the weights at different order of >> approximation of a solution? >> _______________________________________________ >> NumPy-Discussion mailing list -- numpy-discussion@python.org >> To unsubscribe send an email to numpy-discussion-le...@python.org >> https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ >> Member address: rakshitsingh...@gmail.com >> > _______________________________________________ > NumPy-Discussion mailing list -- numpy-discussion@python.org > To unsubscribe send an email to numpy-discussion-le...@python.org > https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ > Member address: charlesr.har...@gmail.com Chebyshev polynomials have two important properties over the interval [-1, 1]: 1. They are equiripple, consequently the coefficients of high power fits are a good approximation of the maximum error if the series is truncated at that point, i.e., they provide something close to an min-max fit. 2. High power fits are practical because the polynomials are more independent (in the L2 norm). The design matrix is generally well-conditioned. Chebyshev polynomials are quite wonderful, but only if the domain of the data is in the range [-1, 1]. Similar arguments apply to Legendre polynomials, but in that case the coefficients approximate the L2 error when the series is truncated and properly normalized. In both cases, the coefficients are a good guide to the power needed to fit the underlying data with minimum influence from noise. Chuck
_______________________________________________ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-le...@python.org https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ Member address: arch...@mail-archive.com