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

MOTP with euclidean distance metric gives mean squared distance. #161

Open
angelcarro opened this issue Jun 29, 2022 · 1 comment
Open

Comments

@angelcarro
Copy link
Contributor

When usign motmetrics.utils.compare_to_groundtruth() function with dist='euc', the distance metric is configured to the squared euclidean distance (norm2squared_matrix).
As a consequence, the distance threshold (distth) should be the maximum squared distance. Also, the MOTP metric returns the mean squared distance.

The compute_euc() function can be modified to obtain the desired/expected units.

return norm2squared_matrix(a, b, max_d2=distth)

    def compute_euc(a, b):
        return np.sqrt(norm2squared_matrix(a, b, max_d2=distth**2))

I don't think this will have much impact on the computation time.

@cheind
Copy link
Owner

cheind commented Jul 30, 2022

Hey, sorry for the late reply. Yes that seems like an oversight when we added euclidean distance metrics. Would you mind opening a PR?

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