ucred_ff {rucrdtw} | R Documentation |
UCR ED Algorithm file-file method
Description
Sliding-window similarity search using euclidean distance. This implementation is very close to the UCR Suite command line utility, in that it takes files as inputs for both query and data
Usage
ucred_ff(data, query, qlength)
Arguments
data |
character; path to data file |
query |
character; path to query file |
qlength |
integer; length of query (n data points). Usually the length of the data contained in |
Value
a ucred object. A list with the following elements
-
location: The starting location of the nearest neighbor of the given query, of size
qlength
, in the data. Note that location starts from 1. -
distance: The euclidean distance between the nearest neighbor and the query.
Examples
#locate example data file
dataf <- system.file("extdata/col_sc.txt", package="rucrdtw")
#locate example query file
queryf <- system.file("extdata/mid_sc.txt", package="rucrdtw")
#determine length of query file
qlength <- length(scan(queryf))
#run query
ucred_ff(dataf, queryf, qlength)
[Package rucrdtw version 0.1.6 Index]