simrunmodular_reduced_model_inferencestrategyStrategy_spatiotemporalRaisedCosinecompute_basis

Strategy_spatiotemporalRaisedCosine.compute_basis

simrun.modular_reduced_model_inference.strategy.Strategy_spatiotemporalRaisedCosine.compute_basis()

Compute the basis vectors for the dataset.

These basis vectors are defined as \(\mathbf{f}(t) \cdot \mathbf{g}(z) \cdot \mathbf{D}\). When these basis vectors are weighed, they form the argument of the integral over the domain. Once integrated over the domain, they yield the weighted net input.

\[\begin{split}WNI(t) = \int_{t-width}^{t} \int_z \mathbf{w}_{\\tau}(\\tau) \cdot \mathbf{w}_{z}(z) \cdot \mathbf{D} = \int_{t-width}^{t} \int_z \mathbf{x} \cdot \mathbf{y} \cdot \mathbf{f}(t) \cdot \mathbf{g}(z) \cdot \mathbf{D}\end{split}\]

Attention

These are not the same basis vectors as in RaisedCosineBasis. These basis vectors are already multiplied with the data \(\mathbf{D}\). Since dot product is commutative, the order of this multiplication does not matter for calculating the weighted net input, but these intermediate basis vectors are different.

Returns:

A dictionary of basis vectors for each group. basis vectors are of shape \((n_trials, dim(\mathbf{f}(\\tau)), dim(\mathbf{g}(z)))\).

Return type:

dict