match.rec | R Documentation |
RECUR1 algorithm of Bandelt et al (2004) to find starting point in the multidimensional assignment problem with decomposable costs (MDADC)
match.rec(x, unit = NULL, w = NULL, control = list())
x |
data: matrix of dimensions (mn,p) or 3D array of dimensions (p,m,n) with m = number of labels/classes, n = number of sample units, and p = number of variables) |
unit |
integer (=number of units) or vector mapping rows of |
w |
weights for loss function: single positive number, p-vector of length, or (p,p) positive definite matrix |
control |
tuning parameters |
A list of class matchFeat
with components
sigma
best set of permutations for feature vectors ((m,n) matrix)
cluster
associated clusters (= inverse permutations)
cost
minimum objective value
mu
sample mean for each class/label ((p,m) matrix)
V
sample covariance for each class/label ((p,m) matrix
call
function call
Degras (2022) "Scalable feature matching across large data collections."
doi: 10.1080/10618600.2022.2074429
Bandelt, Maas, and Spieksma (2004), "Local search heuristics for multi-index assignment problems with decomposable costs." doi: 10.1057/palgrave.jors.2601723
match.2x
, match.bca
,
match.gaussmix
, match.template
,
match.kmeans
data(optdigits) m <- length(unique(optdigits$label)) # number of classes n <- nrow(optdigits$x) / m # number of units ## Use function with data in matrix form fit1 <- match.rec(optdigits$x, unit=n) ## Use function with data in array form p <- ncol(optdigits$x) x <- t(optdigits$x) dim(x) <- c(p,m,n) fit2 <- match.rec(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.