csaps is a crate for univariate, multivariate and n-dimensional grid data approximation using cubic smoothing splines. The package can be useful in practical engineering tasks for data approximation and smoothing.
Usage
Univariate data auto-smoothing
use ;
use CubicSmoothingSpline;
Multivariate data smoothing with weights and specified smoothing parameter
use ;
use CubicSmoothingSpline;
2-d grid (surface) data smoothing
use array;
use GridCubicSmoothingSpline;
Performance Issues
Currently, the performance of computation of smoothing splines might be very low for a large data.
The algorithm of sparse matrices mutliplication in sprs crate is not optimized for large diagonal matrices which causes a poor performance of computation of smoothing splines. See issue for details.
Algorithms and implementations
The crate implementation is based on ndarray and sprs crates and has been inspired by Fortran routine SMOOTH from PGS (originally written by Carl de Boor).
The implementation of the algorithm in other languages:
References
- C. de Boor, A Practical Guide to Splines, Springer-Verlag, 1978.