Skip to content

Commit

Permalink
clarify faq
Browse files Browse the repository at this point in the history
  • Loading branch information
tonigi committed Feb 1, 2023
1 parent 341a863 commit f3e3543
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,22 +115,25 @@ win.f <- function(iw,jw,query.size, reference.size, window.size, ...) compare.wi
### Is it possible to force alignments to respect specific known control points?

Control points or matching pairs force alignment curves to pass through specific points.
An alternative way to see them is that the matching control point define "epochs" which must match with each other. Control points can be enforced through a block-structured windowing function.
This can be coded rather simply with a window function like the following:
An alternative way to see them is that the matching control point define "epoch boundaries",
and timeseries inside matching epochs must be aligned with each other.
This task can be enforced through a block-structured windowing function, which
can be implemented rather simply e.g. as follows:

```r
win.f <- function (iw, jw, window_iw, window_jw,query.size,reference.size,...)
outer(window_iw, window_jw, FUN = "==")
# Then use: dtw(x, y, window.type = win.f)
```

Where `window_iw` and `window_jw` would be respectively vectors specifying
the epochs (as integers or factors) for the input timeseries.
The result of the `outer` call can also be modified e.g. to
Where `window_iw` and `window_jw` would be vectors specifying
the "epochs" (integers or factors) for the input timeseries.
The result of the `outer` call can also be modified further e.g. to
enable some slack around the control points.
(Thanks to E. Jarochowska)

(Alternatively, perform several alignments for each interval separately).
(Alternatively, perform several alignments for each interval separately,
which is more efficient memory- and time-wise).


## Clustering
Expand Down

0 comments on commit f3e3543

Please sign in to comment.