Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

correctionDistanceMatrix

Correction of a Distance Matrix


Description

Convert (possibly non-euclidean or non-metric) distance matrix with chosen approach so that it becomes a CNSD matrix. Optionally, the resulting matrix is enforced to have positive elements and zero diagonal, with the repair parameter. Essentially, this is a combination of functions correctionDefinite or correctionCNSD with repairConditionsDistanceMatrix.

Usage

correctionDistanceMatrix(
  mat,
  type = "NSD",
  method = "flip",
  repair = TRUE,
  tol = 1e-08
)

Arguments

mat

symmetric distance matrix

type

string that specifies type of correction: "CNSD","NSD" to enforce CNSD or NSD matrices respectively.

method

string that specifies method for correction: spectrum clip "clip", spectrum flip "flip", nearest definite matrix "near", spectrum square"square", spectrum diffusion "diffusion", feature embedding "feature".

repair

boolean, whether or not to use condition repair, so that elements are positive, and diagonal is zero.

tol

torelance value. Eigenvalues between -tol and tol are assumed to be zero.

Value

list with corrected distance matrix mat, isCNSD (boolean, whether original matrix was CNSD) and transformation matrix A.

References

Martin Zaefferer and Thomas Bartz-Beielstein. (2016). Efficient Global Optimization with Indefinite Kernels. Parallel Problem Solving from Nature-PPSN XIV. Accepted, in press. Springer.

See Also

Examples

x <- list(c(2,1,4,3),c(2,4,3,1),c(4,2,1,3),c(4,3,2,1),c(1,4,3,2))
D <- distanceMatrix(x,distancePermutationInsert)
is.CNSD(D) #matrix should not be CNSD
D <- correctionDistanceMatrix(D)$mat
is.CNSD(D) #matrix should now be CNSD
D

CEGO

Combinatorial Efficient Global Optimization

v2.4.0
GPL (>= 3)
Authors
Martin Zaefferer <mzaefferer@gmail.com>
Initial release
2019-12-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.