ucred_vv {rucrdtw} | R Documentation |
UCR ED Algorithm vector-vector method
Description
Sliding-window similarity search using Euclidean Distance. This implementation of the UCR Suite Euclidean Distance command line utility takes an R numeric vector as data input and an R numeric vector for the query.
Usage
ucred_vv(data, query, skip = FALSE)
Arguments
data |
numeric vector containing data |
query |
numeric vector containing query |
skip |
bool defaults to TRUE. If TRUE bound calculations and if necessary, distance calculations, are only performed on non-overlapping segments of the data (i.e. multiples of |
Value
a ucred object. A list with the following elements
-
location: The starting location of the nearest neighbor of the given query, of size
length(query)
, in the data. Note that location starts from 1. -
distance: The Euclidean Distance between the nearest neighbor and the query.
Examples
#read example file into vector
dataf <- scan(system.file("extdata/col_sc.txt", package="rucrdtw"))
#read example query file into vector
query <- scan(system.file("extdata/mid_sc.txt", package="rucrdtw"))
#run query
ucred_vv(dataf, query)