.find_occurrences | R Documentation |
Finds occurrences of a specified motif in a set of curves, where the dissimilarity is lower than a specified threshold \( R \). The function compares the motif against curves represented in multiple dimensions and returns the details of matching occurrences.
.find_occurrences(v, Y, R, alpha, w, c_k, use0, use1, transformed = FALSE)
v |
A list containing two matrices:
- |
Y |
A list of \( N \) lists, each containing two matrices:
- |
R |
A numeric value representing the maximum allowed dissimilarity. |
alpha |
A numeric value that serves as a weight coefficient between the L2 norms
of the two sets of motifs when using the dissimilarity function |
w |
A numeric vector of weights for the dissimilarity index across different dimensions. All weights must be positive (\( w > 0 \)). |
c_k |
An integer specifying the minimum length of the intersection of the supports of the shifted motif and the curves. |
use0 |
A logical value indicating whether to use the first component of the curves (i.e., \( Y0 \) and \( v0 \)). |
use1 |
A logical value indicating whether to use the second component of the curves (i.e., \( Y1 \) and \( v1 \)). |
transformed |
A logical value indicating whether to normalize the curve segments to the interval [0,1] before applying the dissimilarity measure. Setting 'transformed = TRUE' scales each curve segment between 0 and 1, which allows for the identification of motifs with consistent shapes but different amplitudes. This normalization is useful for cases where motif occurrences may vary in amplitude but have similar shapes, enabling better pattern recognition across diverse data scales. |
The function systematically checks each curve in the provided list against the specified motif to identify positions where the dissimilarity does not exceed the defined threshold \( R \). It handles multidimensional curves and can selectively consider different components of the motifs and curves.
A matrix with three columns:
- curve
: The ID of the curve where the motif was found.
- shift
: The optimal shift at which the motif occurs.
- diss
: The dissimilarity value associated with the match.
If no occurrences are found, an empty matrix is returned.
Marzia Angela Cremona & Francesca Chiaromonte
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.