Back to the main page.

Bug 2374 - update the utilities/private/randomseed function

Reported 2013-11-13 13:50:00 +0100
Modified 2014-01-15 14:47:52 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P3 normal
Assigned to: Jan-Mathijs Schoffelen
Depends on:
See also:

Robert Oostenveld - 2013-11-13 13:50:11 +0100

right now it deals inconsistently with matlab versions and scalar/numeric/char inputs

Jan-Mathijs Schoffelen - 2013-11-14 09:27:49 +0100

bash-4.1$ svn commit -m "enhancement - made randomseed internally more consistent and allow for cfg.randomseed = 'yes'/'no'" utilities/private/randomseed.m ft_statistics_montecarlo.m Sending ft_statistics_montecarlo.m Sending utilities/private/randomseed.m Transmitting file data .. Committed revision 8775.

Robert Oostenveld - 2013-11-14 11:58:46 +0100

I see on and in that test_ft_componentanalysis is now randomly failing/succeeding on subsequent executions. I don't know whether it is related to this change, but could you perhaps check?

Jan-Mathijs Schoffelen - 2013-11-14 12:05:32 +0100

Het zou ook te mooi zijn geweest om waar te zijn. Voor info: welke matlab versie?

Robert Oostenveld - 2013-11-14 12:11:37 +0100

(In reply to comment #3) matlab2012b on the cluster.

Jan-Mathijs Schoffelen - 2013-11-14 12:48:24 +0100

hehehe, and we're just trying to do a pca on the data. What seems to happen (more or less at random) is that the polarity of the components is flipped. Does svd/eig have a random behavior in this? and the question then would be: why did this not show up before? one way to ensure a no-fail here would be to feed the random number generator with the random seed that was used to construct the data on disk

Jan-Mathijs Schoffelen - 2013-11-14 12:57:53 +0100

oh, but I see that the identical function actually checks for that, but that for the itab153 data the tolerance threshold of 1e-7 is exceeded.

Jan-Mathijs Schoffelen - 2013-11-24 12:02:56 +0100

test function runs through on matlab2011b, but not on matlab2012b the testdata stored on disk seems to have been created with matlab2013a

Jan-Mathijs Schoffelen - 2013-11-24 12:12:05 +0100

Given that fact that the current Matlab version that is used to do the regression testing is 2012b, I recomputed and saved the component data with this version. I also updated the test-function. Since the cause of the failing test function is a numeric issue based on the Matlab version, it may need to be followed up in another bug, the randomseed functionality seems to be OK.