bgrimstad/splinter

Support custom knot vectors

bgrimstad opened this issue · 2 comments

The BSpline::Builder class should accept user-specified knot vectors. Consider creating a new type BSpline::KnotSpacing::CUSTOM for this case.

Many users wish to approximate using a dataset with scattered data points, in which case it is recommended to supply a set of knot vectors that span the domain of interest, or use gradient boosting with P-spline learners.

Change of plans. We will remove the BSpline::Builder class and provide two alternative approaches to fitting a B-spline.

The first approach is a two-step procedure: 1) a zero-valued B-spline is constructed from user-defined knot vectors and degrees, and 2) this B-spline is then fitted to the data. This gives the user full flexibility when building a B-spline.

The second approach is a one-step procedure where one simply uses one of the new builders to build a B-spline. We will provide helper functions for the most commonly used B-splines.

Remaining items to complete the new strategy:

  1. Extend the Python API to include the BSpline constructor without control points
  2. Extend the Python API to include a knot vector builder for convenience
  3. Update Python examples
  4. Remove BSpline::Builder

All tasks completed as of 5f51364.

  1. Python BSpline constructor can be used without control points.
  2. Knot vector builders are available via the new builder bspline_unfitted for customized configurations.
  3. Examples updated.
  4. BSpline::Builder has been removed and replaced with new builders bspline_interpolator, bspline_smoother, and bspline_unfitted.