You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running into the following error when I run the quality_metrics module (using the master branch) on a dataset I collected:
d_prime = lda_metrics(all_pcs, all_labels, cluster_id) (from line 278 in metrics.py) ValueError: n_components cannot be larger than min(n_features, n_classes - 1).
I've done a little digging and, from what I can tell, it is failing on clusters that do not have any other units_in_range. One way to avoid the problem is to increase the num_channels_to_compare in the quality_metrics_params. Is this a good solution though? I know this will increase the number of neighboring units each cluster is compared to. Another possible solution would be to set a d_prime value (NaN or some high value?) if there are no units_in_range. Does this make sense? I could also be misdiagnosing the problem, any ideas?
The text was updated successfully, but these errors were encountered:
I think the second option makes the most sense. If there's only one unit on a segment of the probe, LDA and other PCA-based metrics are not defined. I would recommend adding an extra check on line 272 of metrics.py to test if len(units_in_range) > 1.
I'm running into the following error when I run the quality_metrics module (using the master branch) on a dataset I collected:
d_prime = lda_metrics(all_pcs, all_labels, cluster_id)
(from line 278 in metrics.py)ValueError: n_components cannot be larger than min(n_features, n_classes - 1).
I've done a little digging and, from what I can tell, it is failing on clusters that do not have any other
units_in_range
. One way to avoid the problem is to increase thenum_channels_to_compare
in thequality_metrics_params
. Is this a good solution though? I know this will increase the number of neighboring units each cluster is compared to. Another possible solution would be to set a d_prime value (NaN or some high value?) if there are nounits_in_range
. Does this make sense? I could also be misdiagnosing the problem, any ideas?The text was updated successfully, but these errors were encountered: