SpMatrixCalc {knnwtsim} | R Documentation |
Calculate Seasonal Similarity Matrix
Description
Generates and returns an n x n matrix by calculating the seasonal dissimilarity for each possible pair of points in a vector of seasonal periods, then converts dissimilarity matrix to a similarity matrix using 1 / (D_p + 1).
Usage
SpMatrixCalc(v, nPeriods)
Arguments
v |
positive numeric vector with the seasonal periods corresponding to each point in the response series. |
nPeriods |
positive numeric value representing the maximum value |
Value
numeric matrix of seasonal similarities for the vector v
.
See Also
Trupiano (2021) arXiv:2112.06266 for information on the formulation of this seasonal similarity measure.
-
SeasonalAbsDissimilarity()
for the function used to calculate seasonal dissimilarity.
Examples
SpMatrixCalc(c(1, 2, 4), 4)
[Package knnwtsim version 1.0.0 Index]