Giter VIP home page Giter VIP logo

Comments (26)

agramfort avatar agramfort commented on August 28, 2024

you should write in more like a noise cov that stores also to what channels
the ICA mixing matrix applies. Otherwise +1. See mne/fiff/cov.py

from mne-python.

dengemann avatar dengemann commented on August 28, 2024

we the could init an ica session from saved ica matrixes. wdyt?

On 08.12.2012, at 14:40, Alexandre Gramfort [email protected] wrote:

you should write in more like a noise cov that stores also to what channels
the ICA mixing matrix applies. Otherwise +1. See mne/fiff/cov.py

Reply to this email directly or view it on GitHub.

from mne-python.

agramfort avatar agramfort commented on August 28, 2024

we the could init an ica session from saved ica matrixes. wdyt?

if it solves a relevant problem yes :)

from mne-python.

dengemann avatar dengemann commented on August 28, 2024

e. g. a staticmethod ICA.load() that takes fname as argument and returns an instance of ICA

wdyt?

On 08.12.2012, at 15:28, Alexandre Gramfort [email protected] wrote:

we the could init an ica session from saved ica matrixes. wdyt?

if it solves a relevant problem yes :)

Reply to this email directly or view it on GitHub.

from mne-python.

agramfort avatar agramfort commented on August 28, 2024

read_ica is more consistent with other objects. And static methods are
confusing for people.

ica = read_ica(frame)
ica.save(fname)

is the convention we have for other objects.

from mne-python.

dengemann avatar dengemann commented on August 28, 2024

On 08.12.2012, at 15:38, Alexandre Gramfort [email protected] wrote:

read_ica is more consistent with other objects. And static methods are
confusing for people.

both true.
would then be like read_cov

I like that

ica = read_ica(frame)
ica.save(fname)

is the convention we have for other objects.

Reply to this email directly or view it on GitHub.

from mne-python.

dengemann avatar dengemann commented on August 28, 2024

so basically i would store all ints and strings and matrixes
needed to re-init the session. just that we cannot really restore the internal pca and ica from scikit.
i then would bind at least mixing and unmixing and the related pca arrays to self so pca and ica can be discarded after decomposition.

from mne-python.

dengemann avatar dengemann commented on August 28, 2024

... i think we even could restore self._pca and self._ica just by also saving their params and the attributes set during decomposition...

from mne-python.

agramfort avatar agramfort commented on August 28, 2024

indeed it could be a pain to serialize _ica and pca objects unless you
only store the PCA matrices components
etc. but that's a bit of work...

from mne-python.

dengemann avatar dengemann commented on August 28, 2024

Would storing the _p/ica matrixes require a tag for each matrix?
Serializing the rest wouldn't be so hard I gues, we could dump the params in a string like for Epochs using FIFF_DESCRIPTION and then on calling read_ica just initialize new sessions for the parameters and then just setting attributes which aren't created by init. To me it seems part one might be more effortful, but let's see. Definitely worth some effort.

from mne-python.

mluessi avatar mluessi commented on August 28, 2024

Would it make sense to add a named matrix tag? It would allow us to easily save custom matrices without having to create new fif tag every time.

from mne-python.

agramfort avatar agramfort commented on August 28, 2024

+1

from mne-python.

dengemann avatar dengemann commented on August 28, 2024

That would be pretty brilliant!

On Sun, Dec 9, 2012 at 4:35 PM, Martin Luessi [email protected]:

Would it make sense to add a named matrix tag? It would allow us to
easily save custom matrices without having to create new fif tag every time.


Reply to this email directly or view it on GitHubhttps://github.com//issues/241#issuecomment-11172040.

from mne-python.

dengemann avatar dengemann commented on August 28, 2024

What do we have to do to add such a tag, presumably just adding it to mne.FIFF won't be enough. Or is it just that?

On 09.12.2012, at 16:35, Martin Luessi [email protected] wrote:

Would it make sense to add a named matrix tag? It would allow us to easily save custom matrices without having to create new fif tag every time.


Reply to this email directly or view it on GitHub.

from mne-python.

dengemann avatar dengemann commented on August 28, 2024

@agramfort 're-ping'! What do we need to create a named tag?

from mne-python.

agramfort avatar agramfort commented on August 28, 2024

@agramfort 're-ping'! What do we need to create a named tag?

I would really copy the cov way with a fif block containing
FIFF_MNE_ROW_NAMES and/or FIFF_MNE_COL_NAMES + the data.

from mne-python.

dengemann avatar dengemann commented on August 28, 2024

Sure, makes sense for now.
So for full serialization we would save exaplained_variance_ and
components_ from _pca and unmixing matrix from _ica. I then would need
three new tags or can I separate the data by using different blocks. That's
the reason why I'm asking for the named tags...

On Sun, Dec 9, 2012 at 9:37 PM, Alexandre Gramfort <[email protected]

wrote:

@agramfort 're-ping'! What do we need to create a named tag?

I would really copy the cov way with a fif block containing
FIFF_MNE_ROW_NAMES and/or FIFF_MNE_COL_NAMES + the data.


Reply to this email directly or view it on GitHubhttps://github.com//issues/241#issuecomment-11175610.

from mne-python.

agramfort avatar agramfort commented on August 28, 2024

you can create tags starting with FIFF_MNE_ICA_ in constants.py

from mne-python.

dengemann avatar dengemann commented on August 28, 2024

... ok, great. just looked into cov.py I would dare committing myself to
getting this working before 0.5 ;-)

On Sun, Dec 9, 2012 at 10:02 PM, Alexandre Gramfort <
[email protected]> wrote:

you can create tags starting with FIFF_MNE_ICA_ in constants.py


Reply to this email directly or view it on GitHubhttps://github.com//issues/241#issuecomment-11175923.

from mne-python.

agramfort avatar agramfort commented on August 28, 2024

... ok, great. just looked into cov.py I would dare committing myself to
getting this working before 0.5 ;-)

oh yes. that's not a trivial task to do it right.

from mne-python.

dengemann avatar dengemann commented on August 28, 2024

Yeah, but should be doable and would be very nice to have I think. We'll
see how it goes.

On Sun, Dec 9, 2012 at 10:07 PM, Alexandre Gramfort <
[email protected]> wrote:

... ok, great. just looked into cov.py I would dare committing myself to
getting this working before 0.5 ;-)

oh yes. that's not a trivial task to do it right.


Reply to this email directly or view it on GitHubhttps://github.com//issues/241#issuecomment-11175976.

from mne-python.

dengemann avatar dengemann commented on August 28, 2024

I'm currently designing an ICA.save function and I'm wondering what to do with the pre_whitener which is either a float value or an instance of mne.Covariance; in the latter case I could try to save the covariace into the ica_matix.fif or just keep the file name and hope the covariance matrix will be present. The first feels somehow wrong, because we already have a covariance matrix fif. The second feels wrong because it's just too fidgety. Any thoughts?

from mne-python.

dengemann avatar dengemann commented on August 28, 2024

... on the other hand side just trusting the user he / she will take care of the covariance supplied would make saving ICA much easier.

from mne-python.

dengemann avatar dengemann commented on August 28, 2024

Ok, froget about it; it's late and the fiff file is somewhat mind-bending. As I just have to save the result of compute_whitener all should be fine.

from mne-python.

dengemann avatar dengemann commented on August 28, 2024

wrong issue... deleting.

from mne-python.

dengemann avatar dengemann commented on August 28, 2024

Continuing on WIP PR.

from mne-python.

Related Issues (20)

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.