Description Usage Arguments Value Note Author(s) References See Also Examples
Compute similarity between time series. Raw time series can be provided together
with learnPattern
object so that the representation for the time series are
generated internally and similarity is computed based on these representations. The
other option is to provide the representations (instead of raw time series) and to
compute the similarity without a need for learnPattern
object.
1 2 3 
object 
an object of class 
refseries 
reference time series. 
testseries 
test time series. 
maxdepth 
maximum depth level to be used to generate representations for similarity computations. 
which.tree 
array of trees to be used for similarity computation. 
sim.type 
type of the similarity to compute. If set to zero, dissimilarity (absolute differences of the number of patterns) is computed. If set to one, similarity (minimum number of the matching patterns) is computed. 
terminal 

testrepresentation 
learned representation for test time series. 
refrepresentation 
learned representation for reference time series. 
A similarity matrix of size “the number of test series“ by “the number of reference series“ is returned. Similarity between test series and reference series is defined as the number of mismatching patterns based on the representation generated by the trees. See LPS paper for details.
Similarity matrix can also be computed over representations if it is generated
using predict.learnPattern
. This will probably take longer time
compared to computing the similarity directly using the ensemble. However, if you
are using LPS for retrieval purposes, bounding schemes (such as early abondon) can
be used (requires further implementation) with the learned representations.
Mustafa Gokce Baydogan
Baydogan, M. G. (2013), “Learned Pattern Similarity“, Homepage: http://www.mustafabaydogan.com/learnedpatternsimilaritylps.html.
learnPattern
, predict.learnPattern
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19  data(GunPoint)
set.seed(71)
## Learn patterns on GunPoint training series with default parameters
ensemble=learnPattern(GunPoint$trainseries)
## Find the similarity between test and training series
sim=computeSimilarity(ensemble,GunPoint$testseries,GunPoint$trainseries)
## Find similarity using representations,
## First generate representations
trainRep=predict(ensemble, GunPoint$trainseries, nodes=TRUE)
testRep=predict(ensemble, GunPoint$testseries, nodes=TRUE)
## Then compute the similarity (cityblock distance),
## takes longer but we keep the representation
sim2=computeSimilarity(testrepresentation=testRep,refrepresentation=trainRep)
## Find the similarity based on first 100 trees
sim=computeSimilarity(ensemble,GunPoint$testseries,GunPoint$trainseries,which.tree=c(1:100))

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.