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

multidimensional pairwise distance computations #2

Merged
merged 1 commit into from Jun 30, 2020

Conversation

kristianeschenburg
Copy link
Owner

Split the fitting procedure into two parts:

  1. Compute the principle angles between subspaces with _theta method
  2. Compute the subspace distance with fit method.

Updated the fit method so that it can compute pairwise distance matrices analogous to Scipy's cdist function.
This pairwise computation uses numba to parallelize the iterations over pairs of subspaces.

@@ -1,6 +1,29 @@
import numpy as np
import scipy.spatial.distance as ssd
from scipy.stats import spearmanr

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spearmanr is still susceptible to issues related to columns of all NaN -- we can either create a pull request on the scipy package, fixing this issue, or we can check for columns of all NaNs and replace them with Inf

@kristianeschenburg kristianeschenburg merged commit 5b6b4c7 into master Jun 30, 2020
@kristianeschenburg kristianeschenburg deleted the multidim branch June 30, 2020 21:32
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

Successfully merging this pull request may close these issues.

None yet

1 participant