Comments (2)
Hello @StanSStanman !
Thanks for pointing me out the issue. Probably the best way to fix it would be that the self._reshape
becomes a list of shapes instead of just the shape of the first element. Something like :
In ds_ephy :
self._reshape = None
if all([k.ndim == 4 for k in x]):
logger.debug(f" 4d reshaping")
self._reshape = []
for k in range(len(x)):
n_e, n_r, n_f, n_t = x[k].shape
x[k] = x[k].reshape(n_e, n_r, n_f * n_t)
self._reshape.append((n_f, n_t))
Then, you also need to modify the WfMi with something like :
self._reshape = dataset._reshape
if isinstance(self._reshape, list):
logger.debug(f" reshaping before computing statistics")
for k in range(len(mi)):
n_f, n_t = self._reshape[k]
n_p, n_s, _ = mi_p[k].shape
mi[k] = mi[k].reshape(n_s, n_f, n_t)
mi_p[k] = mi_p[k].reshape(n_p, n_s, n_f, n_t)
If you want to test your code, there's one example illustrating spatio-temporal clusters (online doc and github code).
I suggest that you modify this example such that each simulated subject has a different number of trials. Then you can start to modify the scripts and submit the PR.
What do you think?
from frites.
Hello @EtienneCmb
Thanks for your answer. As we discussed trough other channels, I'm going to fix the bug, but without transforming shape._reshape
in a list of tuples.
Indeed this attribute is in the form of (n_freqs, n_times) and those two dimensions should remains the same across all the subjects.
I will also update the example code, to include the case of computing mi across subjects with a variable number of trials.
See you soon!
from frites.
Related Issues (12)
- FIT directed to unidirectionnal HOT 4
- KeyError: 'y' when using wf.fit()
- HTML representation of the `DatasetEphy` HOT 1
- `subject` and `subjects` dimension HOT 1
- CI
- MI values when cholesky failed HOT 5
- Interest in merging work into mne-connectivity? HOT 3
- Personal sanity check problem HOT 1
- Issue docs and PR docs HOT 1
- Do you need to repeat permutation of y vector for each ROI ? HOT 2
- GPU integrations (Brainhack Marseille 2020) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from frites.