objective.fun {matchFeat}R Documentation

Calculate Cost of Multidimensional Assignment

Description

Calculates the objective value in the multidimensional assignment problem with decomposable costs (MDADC). The dissimilarity function used in this problem is the squared Euclidean distance.

Usage

objective.fun(x, sigma = NULL, unit = NULL, w = NULL)

Arguments

x

data: matrix of dimensions (mn,p)(mn,p) or 3D array of dimensions (p,m,n)(p,m,n) with mm = number of labels/classes, nn = number of sample units, and pp = number of variables)

sigma

permutations: matrix of dimensions (m,n)(m,n)

unit

integer (=number of units) or vector mapping rows of x to sample units (length mnmn). Must be specified only if x is a matrix.

w

weights for loss function: single positive number, pp-vector of length, or (p,p)(p,p) positive definite matrix

Details

Given nn datasets having each mm vectors of same size, say x11,...,x1m,...,xn1,...,xnm{x_{11},...,x_{1m}},...,x_{n1},...,x_{nm}, and permutations σ1,...,σn\sigma_1,...,\sigma_n of 1,...,m{1,...,m}, the function calculates 1/(n(n1))sumi,jsumkxi,sigmai(k)xj,σj(k)21/(n(n-1)) sum_{i,j} sum_{k} || x_{i,sigma_i(k)- x_{j,\sigma_j(k) \|^2}} where ii and nn run from 1 to nn and kk runs from 1 to mm. This is the objective value (1) of Degras (2021), up to the factor 1/(n(n1))1/(n(n-1)).

Value

Objective value

References

Degras (2022) "Scalable feature matching across large data collections." doi:10.1080/10618600.2022.2074429

See Also

objective.gen.fun

Examples

data(optdigits)
m <- 10
n <- 100
sigma <- matrix(1:m,m,n) # identity permutations
objective.fun(optdigits$x, sigma, optdigits$unit)

[Package matchFeat version 1.0 Index]