-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Found while working on #330.
The predict() method of connectivity objects cannot be used when VAR coeffs have multiple lags.
I haven't been able to investigate exactly why this is occurring or if this behaviour was ever supported, but I wanted to open this as a reminder to myself.
Steps to reproduce
import numpy as np
from mne_connectivity import vector_auto_regression
rng = np.random.RandomState(0)
n_epochs, n_signals, n_times = 2, 3, 64
data = rng.randn(n_epochs, n_signals, n_times)
times = np.arange(n_times)
conn = vector_auto_regression(data, model="dynamic", lags=2)
conn.predict(data)
Expected results
The predicted data is returned.
Actual results
File "\GitHub\mne-connectivity\mne_connectivity\base.py", line 282, in predict
predicted_data[jdx, :, lags:] += np.dot(
^^^^^^^
ValueError: shapes (3,2,2) and (3,62) not aligned: 2 (dim 2) != 3 (dim 0)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working