File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,21 @@ def assign_labels(
1212 rates : Optional [torch .Tensor ] = None ,
1313 alpha : float = 1.0 ,
1414) -> Tuple [torch .Tensor , torch .Tensor , torch .Tensor ]:
15+ # language=rst
16+ """
17+ Assign labels to the neurons based on highest average spiking activity.
18+
19+ :param spikes: Binary tensor of shape ``(n_samples, time, n_neurons)`` of a single
20+ layer's spiking activity.
21+ :param labels: Vector of shape ``(n_samples,)`` with data labels corresponding to
22+ spiking activity.
23+ :param n_labels: The number of target labels in the data.
24+ :param rates: If passed, these represent spike rates from a previous
25+ ``assign_labels()`` call.
26+ :param alpha: Rate of decay of label assignments.
27+ :return: Tuple of class assignments, per-class spike proportions, and per-class
28+ firing rates.
29+ """
1530
1631 n_neurons = spikes .size (2 )
1732
You can’t perform that action at this time.
0 commit comments