kma.similarity {briKmeans} | R Documentation |
Similarity/dissimilarity index between two functions
Description
kma.similarity computes a similarity/dissimilarity measure between two functions and
. Users can choose among different types of measures.
Usage
kma.similarity(x.f = NULL, y0.f = NULL, y1.f = NULL,
x.g = NULL, y0.g = NULL, y1.g = NULL, similarity.method, unif.grid = TRUE)
Arguments
x.f |
vector length.f: abscissa grid where function |
y0.f |
vector length.f or matrix length.f X d: evaluations of function |
y1.f |
vector length.f or matrix length.f X d: evaluations of |
x.g |
vector length.g: abscissa grid where function |
y0.g |
vector length.g or matrix length.g X d: evaluations of function |
y1.g |
vector length.g or matrix length.g X d: evaluations of |
similarity.method |
character: similarity/dissimilarity between |
unif.grid |
boolean: if equal to |
Details
We report the list of the currently available similarities/dissimilarities. Note that all norms and inner products are computed over , that is the intersection of the domains of
and
.
and
denote the mean value, respectively, of functions
and
.
1. 'd0.pearson'
: this similarity measure is the cosine of the angle between the two functions and
.
2. 'd1.pearson'
: this similarity measure is the cosine of the angle between the two function derivatives and
.
3. 'd0.L2'
: this dissimilarity measure is the L2 distance of the two functions and
normalized by the length of the common domain
.
4. 'd1.L2'
: this dissimilarity measure is the L2 distance of the two function first derivatives and
normalized by the length of the common domain
.
5. 'd0.L2.centered'
: this dissimilarity measure is the L2 distance of and
normalized by the length of the common domain
.
6. 'd1.L2.centered'
: this dissimilarity measure is the L2 distance of and
normalized by the length of the common domain
.
For multidimensional functions, if similarity.method='d0.pearson'
or 'd1.pearson'
the similarity/dissimilarity measure is computed via the average of the indexes in all directions.
The coherence properties specified in Sangalli et al. (2010) implies that if similarity.method
is set to 'd0.L2'
, 'd1.L2'
, 'd0.L2.centered'
or 'd1.L2.centered'
, value of warping.method
must be 'shift'
or 'NOalignment'
. If similarity.method
is set to 'd0.pearson'
or 'd1.pearson'
all values for warping.method
are allowed.
Value
scalar: similarity/dissimilarity measure between the two functions and
computed via the similarity/dissimilarity measure specified.
Author(s)
Alice Parodi, Mirco Patriarca, Laura Sangalli, Piercesare Secchi, Simone Vantini, Valeria Vitelli.
References
Sangalli, L.M., Secchi, P., Vantini, S., Vitelli, V., 2010. "K-mean alignment for curve clustering". Computational Statistics and Data Analysis, 54, 1219-1233.
Sangalli, L.M., Secchi, P., Vantini, S., 2014. "Analysis of AneuRisk65 data: K-mean Alignment". Electronic Journal of Statistics, Special Section on "Statistics of Time Warpings and Phase Variations", Vol. 8, No. 2, 1891-1904.