Skip to content

Conversation

@chrishalcrow
Copy link

In #50, we discussed ways to speed up the compute_pca_features function in phase 1, which was the bottleneck for applying mountainsort5 my data.

When experimenting, I found that using the covariance_eigh algorithm for decomposition (https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.PCA.html) sped things up a lot! This PR allows users to specify the phase_1_svd_solver parameter, but keeps the current default.

I don't have any solid benchmarks for saying that covariance_eigh works fine - but it works fine for my data!

Note that this does not get passed to isosplit6_subdivision_method because it takes a smaller subset of data, and the default method runs quickly.

If something like this gets merged, I can update the spikeinterface side too :)

@magland
Copy link
Collaborator

magland commented Feb 20, 2025

This looks great @chrishalcrow !

Assuming we believe that folks should use this going forward, without wanting to affect existing pipelines, I'm wondering if you would mind updating the docs to include covariance_eigh in all the examples? You could even make a comment about the speed improvement.

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.

2 participants