This project contains various algorithms which can be used in approximation of 1-dimensional data with fitted B-splines. B-splines only depend on their rank and the knot array used to generate them, so optimalizing the approximation means findong the knot array on whch we get the best fitting splines.
The inner knots of the initial array are optimized with the classic Nelder-Mead algorithm.
Variable projection method based on trust regions.
The menthod "Nullad" (translates to zero rank) is based on the special characteristics of zero rank B-splines. Because these splines are basically constant functions with 0 value outside a certain interval, their linear combination yields a step function which's integral can be easily computed. The algorithm approximates with zero rank B-splines, which is greatly faster than the other examined methods. Although this approximation is not too precise, the resulting knot array can be used to fit higher rank B-splines resulting a better estimate.
As the name suggests, we get the resulting knot array by reducing the whole interval of the test data one data point at a time.
The contents of the repo are the following:
- Explicit_Bspline: Functions used for computing B-spline values.
- Nullad: Implementation of the Nullad method along with test files and a matlab example file showcasing the algorithm.
- VarPro: Implementation of the VarPro method along with test files and a matlab example file showcasing the algorithm.
- EcgTests: Tests and results on varoius ECG data. Initial knot set was generated by an iteration of Nullad.
- EcgTest_Rand_Eq: Tests and results o various ECG data. Initial knot set was either a random array or a uniform partitioning of the data nterval.
- SyntTest, SyntTest_Rand_Eq: Same as the tests conducted in ECGTests and EcgTests_Rand_Eq, but instead of using Ecg signals, the data was constructed by us, from B-Splines.