| digest: | Series Regression with K-Nearest Neighbours using Dynamic Time Warping | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| species: | data | ||||||||
| sc-categories: | Regression, DTW | ||||||||
| sc-related: | |||||||||
| see-also: | DTW, DataSeries, DataSet | ||||||||
| description: | A nearest neighbour interpolator/regressor using a :fluid-obj:`DTW` | ||||||||
| discussion: | To keep with the interface of the :fluid-obj:`KNNRegressor`, the DTWRegressor must first be To calculate a point, Keep in mind that this is a brute-force measure, so evaluation will become very slow for large numbers of series or long series. See https://rtavenar.github.io/blog/dtw.html for an explanation of the DTW algorithm, though it can roughly be summed up as a metric measuring the similarity between two sime series, while accounting for the fact that features arent necessarily the same length. |
||||||||
| control numNeighbours: | The number of neighbours to consider | ||||||||
| control constraint: | The constraint to use in the DTW algorithm when calculating the distance between two time series. 'Warping' in this context means how distorted the genral shape of the series is. For example, a pulse with a fast attack and slow decay will register as identical to the case with fast decay and slow attack, since stretching the time series can make it match in shape. If constraints are applied however, the amount of warping is restricted, so that the general shape of the series is kept. See https://rtavenar.github.io/blog/dtw.html#setting-additional-constraints for a beautiful visual explanation of the constraints
|
||||||||
| control constraintParam: | The maximum radius a frame can warp away from its initial location when using a sakoe-chiba constraint, and parameter for the ikatura constraint when using that. A higher value results in being able to warp more. See https://rtavenar.github.io/blog/dtw.html#setting-additional-constraints for an explanation of the significance. |
||||||||
| message fit: |
Fit the model to a source :fluid-obj:`DataSeries` and a target :fluid-obj:`DataSet`. The outputs in the :fluid-obj:`DataSet` correspond to the data series in the :fluid-obj:`DataSeries` by means of a shared identifier. |
||||||||
| message predict: |
Given the fitted model, predict the output for a :fluid-obj:`DataSeries` and write these to a :fluid-obj:`DataSet` |
||||||||
| message predictSeries: |
Given a fitted model, predict the output for a single series in and write it to another buffer |
||||||||
| message clear: | Clears the :fluid-obj:`DataSeries` and :fluid-obj:`DataSet` |