sccn / amica

Code for AMICA: Adaptive Mixture ICA with shared components
BSD 2-Clause "Simplified" License
23 stars 13 forks source link

question about random seed #29

Closed skostrichegg closed 2 years ago

skostrichegg commented 3 years ago

Hi,

I would like to ask you a question about random seed of amICA.

amICA is calling random_seed with multiplication of system clock and some other values. There doesn't seem to be a parameter to fix random seed.

Could you explain me why amICA uses random indexing? And are there any expected problem with setting a fixed seed number of amICA?

ex) call random_seed(100)

Because I want to get the same results for all runs, if the inputs are same.

I'm waiting your reply,

Thank you.

japalmer29 commented 3 years ago

Hi, There is a keyword 'fix_init' which you can set to 1 and it should produce the same output. Use the keyword in runamica15() in matlab or in the .param file if using binary only. Best, Jason

On Fri, Aug 27, 2021, 4:49 PM skostrichegg @.***> wrote:

Hi,

I would like to ask you a question about random seed of amICA.

amICA is calling random_seed with multiplication of system clock and some other values. There doesn't seem to be a parameter to fix random seed.

Could you explain me why amICA uses random indexing? And are there any expected problem with setting a fixed seed number of amICA?

ex) call random_seed(100)

Because I want to get the same results for all runs, if the inputs are same.

I'm waiting your reply,

Thank you.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/japalmer29/amica/issues/29, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACRBESRDIJPNSRQ4FKBN3VTT647SDANCNFSM5C47SGSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

skostrichegg commented 3 years ago

Oh, I got it, thank you for quickly response!

skostrichegg commented 3 years ago

Hi,

I got a one more question.

As you had guided, I tested amICA after enabled 'fix_init', then can check returns the same results by every run.

But weird thing is that all components are quite different from before enabled 'fix_init'.

And we tested with another time-series data, all components are very similar with the result of the first time-series data, even if those two time-series data looks like different.

It doesn't seems to amICA analyze components of time-series well, if not using random function.

Could you explain me if there are any restrictions of enabling 'fix_init' ?

Thank you!

japalmer29 commented 3 years ago

The starting point should not be that different so I’m not sure why it is working very differently, except that maybe with the fixed starting point it takes many more iterations. If the results are similar from two datasets, you may be looking at the sphering components near the starting point, which are similar for different datasets. If you increase max_iter to 10,000 it may converge to the non-fixed starting point solution.

Best,

Jason

From: skostrichegg @. Sent: Friday, September 3, 2021 4:56 PM To: japalmer29/amica @.> Cc: Jason Palmer @.>; Comment @.> Subject: Re: [japalmer29/amica] question about random seed (#29)

Hi,

I got a one more question.

As you had guided, I tested amICA after enabled 'fix_init', then can check returns the same results by every run.

But weird thing is that all components are quite different from before enabled 'fix_init'.

And we tested with another time-series data, all components are very similar with the result of the first time-series data, even if those two time-series data looks like different.

It doesn't seems to amICA analyze components of time-series well, if not using random function.

Could you explain me if there are any restrictions of enabling 'fix_init' ?

Thank you!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/japalmer29/amica/issues/29#issuecomment-912337871 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACRBESRQKBPW6QNYZXQ47QTUAB5PJANCNFSM5C47SGSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . https://github.com/notifications/beacon/ACRBESTLWG3IMXWHK72SXQLUAB5PJA5CNFSM5C47SGS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGZQSXTY.gif

skostrichegg commented 3 years ago

Thank you for response!