flatironinstitute / mountainsort5

MountainSort spike sorting algorithm, version 5
Apache License 2.0
34 stars 8 forks source link

Confusion about actual # PC's used in SnippetClassifier #9

Closed oaaij-gnahz closed 1 year ago

oaaij-gnahz commented 1 year ago

Hi, while learning about Mountainsort5, I am confused about the number of PC's used in SnippetClassifier in scheme 2.

The scheme 2 doc describes classifier_npca as follows:

The number of principal components to use for each neighborhood classifier. If None (the default), then the number of principal components will be automatically determined as min(12, M * 3) where M is the number of channels in the neighborhood.

Whereas SnippetClassifier,fit() reads:

            effective_npca = max(12, self.M * 3)

So shall the algorithm use not more than or not less than 12 PC's for classification?

Thanks!

magland commented 1 year ago

@oaaij-gnahz Thanks so much for the report, that was indeed an error in the doc. I have updated it to max