You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vanderMonde() should be renamed - if only because I misspelled the name (thinking it was Dutch van der Monde when it is French Vandermonde).
I propose to rename it into poly(), make that generic and extend the functionality to provide orthogonal polynomials:
vanderMonde() calculates so-called raw polynomials, either directly on the wl() of a hyperSpec object or on some rescaled version of it.
stats::poly() calculates by default orthogonal polynomials, but can be used to calculate raw polynomials as well (via raw = TRUE)
The most important use of vanderMonde() I have is setting up polynomial terms for EMSC, and for that orthogonal polynomials are better than raw polynomials or polynomials with the wavelength scaled to [0, 1] or [-1, 1].
The one thing I'd rather have different from the default behaviour of poly() is that I'd like to include an offset (degree 0) term.
Activity
cbeleites commentedon Jul 15, 2021
vanderMonde()should be renamed - if only because I misspelled the name (thinking it was Dutch van der Monde when it is French Vandermonde).I propose to rename it into
poly(), make that generic and extend the functionality to provide orthogonal polynomials:vanderMonde()calculates so-called raw polynomials, either directly on thewl()of a hyperSpec object or on some rescaled version of it.stats::poly()calculates by default orthogonal polynomials, but can be used to calculate raw polynomials as well (viaraw = TRUE)vanderMonde()I have is setting up polynomial terms for EMSC, and for that orthogonal polynomials are better than raw polynomials or polynomials with the wavelength scaled to [0, 1] or [-1, 1].poly()is that I'd like to include an offset (degree 0) term.