Hi All, Sorry for this unresearched and inexperienced question. Does anyone have any experience with the "Schumaker quadratic spline" for 1-D interpolation? Is it similar enough to the BSpline already in SciPy? I have some source code that I can contribute if there's interest. As far as references, a google search turned up an R function: * https://cran.r-project.org/web/packages/schumaker/vignettes/schumaker.html -- Mark Mikofski, PhD (2005) *Fiat Lux*
Hi Mark, The docs you linked reference https://epubs.siam.org/doi/10.1137/0720057 which is gated, so only an impression: this seems to construct a shape-preserving piecewise quadratic interpolant. We have two shape-preserving cubic interpolants, PCHIP and Akima. Do you have an overview of how this one compares to them? Off the cuff, I guess we can add a shape-preserving quadratic, too. This should be based on either BSpline or PPoly, depending on the basis the construction is in. (My impression is that it's the latter in the R package). The API should mirror that of Akima1DInterpolator. пт, 10 мая 2019 г., 9:45 Mark Mikofski <mikofski@berkeley.edu>:
Hi All,
Sorry for this unresearched and inexperienced question.
Does anyone have any experience with the "Schumaker quadratic spline" for 1-D interpolation? Is it similar enough to the BSpline already in SciPy?
I have some source code that I can contribute if there's interest.
As far as references, a google search turned up an R function: * https://cran.r-project.org/web/packages/schumaker/vignettes/schumaker.html
-- Mark Mikofski, PhD (2005) *Fiat Lux* _______________________________________________ SciPy-Dev mailing list SciPy-Dev@python.org https://mail.python.org/mailman/listinfo/scipy-dev
Hi Evgeni, Thank you for your response! Sorry to bother you again, but do you know if the BSpline can constrain the spline to be convex down, using a negative quadratic coefficient? (see: https://github.com/pvlib/pvlib-python/pull/708#issuecomment-491312490) Regarding contributing, when you say "based on ppoly or bspline" do you mean that the Schumaker could be created using BSpline, as a specific instance? Is there a way to enforce the Bspline to be convex down? Sorry for all the questions. I will try to do some research on this topic separately. If you have good references for beginners, I would greatly appreciate it. Best Regards, Mark On Fri, May 10, 2019 at 12:27 AM Evgeni Burovski <evgeny.burovskiy@gmail.com> wrote:
Hi Mark,
The docs you linked reference https://epubs.siam.org/doi/10.1137/0720057 which is gated, so only an impression: this seems to construct a shape-preserving piecewise quadratic interpolant. We have two shape-preserving cubic interpolants, PCHIP and Akima. Do you have an overview of how this one compares to them?
Off the cuff, I guess we can add a shape-preserving quadratic, too. This should be based on either BSpline or PPoly, depending on the basis the construction is in. (My impression is that it's the latter in the R package). The API should mirror that of Akima1DInterpolator.
пт, 10 мая 2019 г., 9:45 Mark Mikofski <mikofski@berkeley.edu>:
Hi All,
Sorry for this unresearched and inexperienced question.
Does anyone have any experience with the "Schumaker quadratic spline" for 1-D interpolation? Is it similar enough to the BSpline already in SciPy?
I have some source code that I can contribute if there's interest.
As far as references, a google search turned up an R function: * https://cran.r-project.org/web/packages/schumaker/vignettes/schumaker.html
-- Mark Mikofski, PhD (2005) *Fiat Lux* _______________________________________________ SciPy-Dev mailing list SciPy-Dev@python.org https://mail.python.org/mailman/listinfo/scipy-dev
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@python.org https://mail.python.org/mailman/listinfo/scipy-dev
-- Mark Mikofski, PhD (2005) *Fiat Lux*
Hi Mark, A BSpline object is simply a linear combination of certain basis functions, much like a usual polynomial is a linear combination of 1, x, x^2, x^3, .... You can certainly construct a convex piecewise quadratic function, as either a BSpline or PPoly instance, whichever is more convenient. Re references, I liked Lyche/Morken lecture notes (referenced in the BSpline docstring). Was suggested to me by Pauli IIRC. пт, 17 мая 2019 г., 9:56 Mark Mikofski <mikofski@berkeley.edu>:
Hi Evgeni,
Thank you for your response! Sorry to bother you again, but do you know if the BSpline can constrain the spline to be convex down, using a negative quadratic coefficient? (see: https://github.com/pvlib/pvlib-python/pull/708#issuecomment-491312490)
Regarding contributing, when you say "based on ppoly or bspline" do you mean that the Schumaker could be created using BSpline, as a specific instance? Is there a way to enforce the Bspline to be convex down?
Sorry for all the questions. I will try to do some research on this topic separately. If you have good references for beginners, I would greatly appreciate it.
Best Regards, Mark
On Fri, May 10, 2019 at 12:27 AM Evgeni Burovski < evgeny.burovskiy@gmail.com> wrote:
Hi Mark,
The docs you linked reference https://epubs.siam.org/doi/10.1137/0720057 which is gated, so only an impression: this seems to construct a shape-preserving piecewise quadratic interpolant. We have two shape-preserving cubic interpolants, PCHIP and Akima. Do you have an overview of how this one compares to them?
Off the cuff, I guess we can add a shape-preserving quadratic, too. This should be based on either BSpline or PPoly, depending on the basis the construction is in. (My impression is that it's the latter in the R package). The API should mirror that of Akima1DInterpolator.
пт, 10 мая 2019 г., 9:45 Mark Mikofski <mikofski@berkeley.edu>:
Hi All,
Sorry for this unresearched and inexperienced question.
Does anyone have any experience with the "Schumaker quadratic spline" for 1-D interpolation? Is it similar enough to the BSpline already in SciPy?
I have some source code that I can contribute if there's interest.
As far as references, a google search turned up an R function: * https://cran.r-project.org/web/packages/schumaker/vignettes/schumaker.html
-- Mark Mikofski, PhD (2005) *Fiat Lux* _______________________________________________ SciPy-Dev mailing list SciPy-Dev@python.org https://mail.python.org/mailman/listinfo/scipy-dev
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@python.org https://mail.python.org/mailman/listinfo/scipy-dev
-- Mark Mikofski, PhD (2005) *Fiat Lux* _______________________________________________ SciPy-Dev mailing list SciPy-Dev@python.org https://mail.python.org/mailman/listinfo/scipy-dev
participants (2)
-
Evgeni Burovski
-
Mark Mikofski