Giter VIP home page Giter VIP logo

Comments (13)

pierreablin avatar pierreablin commented on August 20, 2024

Hi,

It's interesting, do you have a script to share? I'm especially interested in the data that you use: where are they from, what is the number of sources/ number of samples, what options do you use in picard?

Thanks :)

from picard.

mmagnuski avatar mmagnuski commented on August 20, 2024

The data are 64 channels x ~640 * 1001 timepoints reduced to 62 pca components due to channel interpolation. The data are centered before pca. The picard parameters are:

args = pyargs('ortho', false, 'extended', true, 'max_iter', ...
                  int32(360), 'tol', 1e-08, 'whiten', false, ...
                  'verbose', opt.verbose);

(the picard is run via matlab - python integration)
The runica was run via fieldtrip with additional options of pca, 62 and extended, true (I can check the default parameters for other options).

I can make a more rigid comparison with timings and better parameter choices (according to your suggestions). I can also share the file. The whole script is in matlab - I can share it if that would be helpful.

from picard.

mmagnuski avatar mmagnuski commented on August 20, 2024

with picard at least 30% of components explaining the most signal variance had almost the same strange topography (nothing physiologically meaningful) - with some components with positive and some with negative weights (meaning that the topography was very similar across these strange components but sometimes the weight signs were inverted).

from picard.

pierreablin avatar pierreablin commented on August 20, 2024

I'd be very interested in having the input matrix you give to picard ( of size 62 x 1001 if I get it right) so that I can investigate. Do you get the same behavior with whiten=True?

from picard.

mmagnuski avatar mmagnuski commented on August 20, 2024

I can check with whiten=True, to be precise the data is of format: 62 x 629308, how would you prefer to get the data - is dropbox link ok?

from picard.

pierreablin avatar pierreablin commented on August 20, 2024

Yes it is perfect! Thanks

from picard.

mmagnuski avatar mmagnuski commented on August 20, 2024

here is the link.
You can load the data using scipy.io.loadmat:

from scipy.io import loadmat

data = loadmat('data_for_ica.mat')['tmpdata']

from picard.

mmagnuski avatar mmagnuski commented on August 20, 2024

one note: I did centering before pca, but not after, so the channel means of the pca-transformed data are not identical to zero. However the same procedure worked well on the other files I have.

from picard.

pierreablin avatar pierreablin commented on August 20, 2024

Hi,

It converges to tol=1e-7 in about 100 iterations on my machine. I think that your problem is that you say whiten=False while the data are very far from decorrelated.

(By decorrelated I mean that np.dot(data, data.T) / data.shape[1] = Id)

from picard.

pierreablin avatar pierreablin commented on August 20, 2024

Note that when ortho=False, saying whiten=True only amounts to selecting a nice starting point for the algorithm, and does not constrain the solution.

from picard.

mmagnuski avatar mmagnuski commented on August 20, 2024

Ok, good to know, I thought that because I used pca I don't need to use whiten. (also because I already have one "sphering" matrix from pca and getting data from python to matlab is quite inconvenient - I preferred not to have to get sphering from picard and then combine it with pca weights).

from picard.

pierreablin avatar pierreablin commented on August 20, 2024

To get white data after pca, you only need to make sure that their std is one :) So a simple
data /= np.std(data, axis=1, keepdims=True) should do the trick.

I'm closing since it is solved.

from picard.

mmagnuski avatar mmagnuski commented on August 20, 2024

right, thanks!

from picard.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.