Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

computeEuclideanDist not found in computeAverageHausdorffDistance #185

Open
YsoSirius opened this issue Jun 2, 2018 · 0 comments
Open

Comments

@YsoSirius
Copy link

The help page of computeAverageHausdorffDistance says, the default of the dist.fun argument is computeEuclideanDist and also computeEuclideanDistance. But when you try to assign this default it throws an error, but when you omit the argument at all, it runs correctly or when you write a dist.fun yourself.

Maybe you could rephrase the help page so its clear not to assign anything if euclidian distance is desired.

A small exampe is also always helpful. I wrote you a mini-example if you want to use it:

matA <- matrix(
  c(x = runif(10, 15, 19),
    y = runif(10, 50, 55)), 
  ncol = 2, byrow = F)

matB <- matrix(
  c(x = runif(10, 15, 19),
  y = runif(10, 50, 55)),
  ncol = 2, byrow = F)

## Use computeEuclideanDistance function
ecr::computeAverageHausdorffDistance(A = matA, B = matB, 
                                     p = 1, normalize = FALSE)

## Define a custom distance function
ecr::computeAverageHausdorffDistance(A = matA, B = matB, 
                                     p = 1, normalize = FALSE,
                                     dist.fun = function(x) {sqrt(sum(x^4))})


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant