scot-dev / scot

EEG/MEG Source Connectivity Toolbox in Python
http://scot-dev.github.io/scot-doc/index.html
MIT License
58 stars 23 forks source link

Reshape coefficients into 3D array #194

Open cbrnr opened 7 years ago

cbrnr commented 7 years ago

As discussed in #177, we should reshape the coefficient matrices (which are currently in an interleaved 2D array) into a 3D array with shape (m, m, p).

mbillingr commented 7 years ago

That is going to be a rather big change. We have several options.

  1. Change everything at once and be done with it.
  2. Change the internal representation first, and expose the old shape through a property for a while.
  3. Expose the new shape through a property at once and change the internals step by step.
cbrnr commented 7 years ago

Hm. I remember our last big reshaping change, so maybe option 3 is best. However, it depends on how many lines we really need to change. If it's not that many we could also go for option 1. What do you think?

mbillingr commented 7 years ago

I think it's not too many lines - we only need to do a reshape in every function that uses coef - but there may be some hidden traps waiting :)

It may also be a good idea to follow scikit-learn's naming convention and rename coefto coef_.

cbrnr commented 7 years ago

+1 for renaming to coef_. See my other comment in #195 - then coef_ is generated by the toolbox and thus not defined by the user. Let's discuss this further at #195.

So regarding the shape change, let's do everything at once and for all.