Skip to content

Commit a2cbace

Browse files
authored
Reverted accidental removal of docstring
Restored docstring
1 parent 9cdaf61 commit a2cbace

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

bindsnet/evaluation/evaluation.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)