utils.py
get_time_bins_from_interval(interval_times, sampling_rate)
¶
Gets the superset of the interval.
Source code in src/spyglass/decoding/v0/utils.py
discretize_and_trim(series, ndims=1)
¶
Discretizes a continuous series and trims the zeros.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
series |
(DataArray, shape(n_time, n_position_bins))
|
Continuous series to be discretized |
required |
ndims |
int
|
Number of spatial dimensions of the series. Default is 1 for 1D series (time, position), 2 for 2D series (time, y_position, x_position) |
1
|
Returns:
Name | Type | Description |
---|---|---|
discretized |
(DataArray, shape(n_time, n_position_bins))
|
Discretized and trimmed series |
Source code in src/spyglass/decoding/v0/utils.py
make_default_decoding_params(clusterless=False, use_gpu=False)
¶
Default parameters for decoding
Returns:
Name | Type | Description |
---|---|---|
classifier_parameters |
dict
|
|
fit_parameters |
dict
|
|
predict_parameters |
dict
|
|