ucred_ff: UCR ED Algorithm file-file method

View source: R/RcppExports.R

ucred_ffR 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 query, but it can be shorter.

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)

rucrdtw documentation built on Aug. 24, 2023, 5:06 p.m.