naive_euclidean_profile#
- naive_euclidean_profile(X, q, mask)[source]#
Compute a euclidean distance profile in a brute force way.
It computes the distance profiles between the input time series and the query using the Euclidean distance. The search is made in a brute force way without any optimizations and can thus be slow.
A distance profile between a (univariate) time series \(X_i = {x_1, ..., x_m}\) and a query \(Q = {q_1, ..., q_m}\) is defined as a vector of size \(m-( l-1)\), such as \(P(X_i, Q) = {d(C_1, Q), ..., d(C_m-(l-1), Q)}\) with d the Euclidean distance, and \(C_j = {x_j, ..., x_{j+(l-1)}}\) the j-th candidate subsequence of size \(l\) in \(X_i\).
- Parameters:
- X: array shape (n_cases, n_channels, series_length)
The input samples.
- qnp.ndarray shape (n_channels, query_length)
The query used for similarity search.
- maskarray, shape (n_instances, n_channels, n_timestamps - (q_length - 1))
Boolean mask of the shape of the distance profile indicating for which part of it the distance should be computed.
- Returns:
- distance_profilenp.ndarray
shape (n_cases, n_channels, series_length - query_length + 1) The distance profile between q and the input time series X independently for each channel.