Hello all!

I’m wondering what’s the most efficient way to go about optimizing over a specific distance metric.

As of right now, I have two vectors, `x`

, `y`

and `bhattacharyya(x, y)`

as loaded from Distances.jl. I’d like to call something like `optimize(bhattacharyya(x, y), x)`

in order to find the adjustment to x that minimizes the Bhattacharyya distance between it and y.

If I run the above directly, Julia will crash out without a warning or error after some time.

There’s a better way of coding what I’m trying to perform, but I don’t know how to go about that.

Can someone direct me to some resources or tell me if there’s something glaring that I’m missing?

Thanks,