problem about running the program

49 views
Skip to first unread message

Atieh

unread,
Mar 30, 2011, 4:34:31 AM3/30/11
to Stationary Subspace Analysis
Hi,

I'm using :
Java 1.6.0_04-b12 with Sun Microsystems Inc. Java HotSpot(TM) 64-Bit
Server VM mixed mode

I have some problem: is for the dimensionality of the stationary part

my EEG signal is 212585x5 which means I have 5 channels, So the order
of the X matrix would be 212585x5, this makes problem, I don't know
why,
but if I use the transform 5x212585 then I can run the code but I can
not increase the dimensionality d to more than 4!!!

would you please help me,

Jan Saputra Müller

unread,
Mar 30, 2011, 6:51:58 AM3/30/11
to ssa-...@googlegroups.com
Hi Atieh,

> my EEG signal is 212585x5 which means I have 5 channels, So the order
> of the X matrix would be 212585x5, this makes problem, I don't know
> why,
> but if I use the transform 5x212585 then I can run the code

Are you using the Matlab-wrapper or the standalone-version of the
toolbox? And do you get any error messages, and if this is the case, how
do they look like?

> not increase the dimensionality d to more than 4!!!

This makes absolutely sense! If you have only 5 channels, it would not
be useful to assume to have 5 stationary sources (or more)... This is
because the result of SSA is a linear subspace. Because your data set is
5 dimensional, the highest dimensionality of a subspace is 5, which
would be the whole vector space itself. SSA would do nothing in this
case, therefore d is restricted to be in range 1 <= d <= 4.

Best, Jan

Atieh

unread,
Mar 30, 2011, 10:10:03 PM3/30/11
to Stationary Subspace Analysis
Hi,

this is the first error I got when I run the ssa for my data:

??? Java exception occurred:
java.lang.IllegalArgumentException: Number of epochs must be smaller
than the number of samples available

at ssatoolbox.Data.setNumberOfEqualSizeEpochs(Unknown Source)


Error in ==> ssa at 147
ssadata.setNumberOfEqualSizeEpochs(equal_epochs);


I mean I enter X as a 212585x5 matrix for SSA. I als set d=4, reps=4,
equal-epochs=4.

but if I enter the transpose of above matrix (i.e. X: 5x212585) I can
run without anyproblem!

regarding my second question:
I guess I have a misunderstanding do you consider channels as
stationary/non stationary sources?!
If yes it seems you are doing a kind of channel selection!!!

Atieh

unread,
Mar 30, 2011, 11:41:00 PM3/30/11
to Stationary Subspace Analysis
Sorry let me explain more my doubt about the second question As I
followed the works pulished by Bunau et all in "Finding stationary
brain sources in EEG Data" and other sources published by this group,
I understand that x(t)=A*s(t), x(t) here is our EEG signal and we
should find estimation of A to get stat and non stat parts of signal.
which does not necessarily means that these stat and non stat are
separate channels since they're projected data.
may be I'm making mistake, or may be your code has different concept.

One more thing how can I see the algorithms. Actually I aimed to check
your code to understand better but I can not open it. you'd write with
java since I only have matlab,

Best,
Atieh

Atieh

unread,
Mar 31, 2011, 2:11:32 AM3/31/11
to Stationary Subspace Analysis
Sorry for several questions:

I also tried to test ssa on another EEG data set: the data set is
40x372040 and int32,

So first I decided to convert it to double: but I got the following
error:

??? Java exception occurred:
java.lang.OutOfMemoryError: Java heap space


Error in ==> ssa at 141
Xdm = ssatoolbox.SSAMatrix(X);


It seems the program can not be used for high dimensional data!!!

thank you again,
Regards,
Atieh

On Mar 30, 6:51 pm, Jan Saputra Müller <sapu...@cs.tu-berlin.de>
wrote:

Atieh

unread,
Mar 31, 2011, 2:50:35 AM3/31/11
to Stationary Subspace Analysis
Hi again, sorry for several questions,

I have some more doubts:
this SSA can not be used for higher dimensional EEG data?
because I tired it on a new data set 40x372040 int32 data set.

to use ssa I fist convert it to double, then I got the following
error:

??? Java exception occurred:
java.lang.OutOfMemoryError: Java heap space


Error in ==> ssa at 141
Xdm = ssatoolbox.SSAMatrix(X);

I tried for different number of channels and time samples, but ssa can
work only for smaller data set.
It seems it has some problem with high dimension data set,
Since when I reduce the size there is no more error.Shall I perform
any modification?

P.S: sorry if you got this email several times, there was something
wrong in sending the message, so I tried more than one time.

Thak you again,
Regards,
Atieh

On Mar 30, 6:51 pm, Jan Saputra Müller <sapu...@cs.tu-berlin.de>
wrote:

Jan Saputra Müller

unread,
Mar 31, 2011, 6:11:48 AM3/31/11
to ssa-...@googlegroups.com
Hi Atieh,

On 03/31/2011 04:10 AM, Atieh wrote:
> this is the first error I got when I run the ssa for my data:
>
> ??? Java exception occurred:
> java.lang.IllegalArgumentException: Number of epochs must be smaller
> than the number of samples available
>
> at ssatoolbox.Data.setNumberOfEqualSizeEpochs(Unknown Source)
>

When you are using the Matlab-version, you have to provide the data in
the format "channels x time" (see 'help ssa'). This is the default in
the machine learning community. But this is not problematic, if your
matrix has the format "time x channels", just transpose it.

> regarding my second question:
> I guess I have a misunderstanding do you consider channels as
> stationary/non stationary sources?!
> If yes it seems you are doing a kind of channel selection!!!

No, SSA does more than just channel selection. See my reply to your next
e-mail.

> On Mar 30, 4:34 pm, Atieh<atieh.bamdad...@gmail.com> wrote:
>> Hi,
>>
>> I'm using :
>> Java 1.6.0_04-b12 with Sun Microsystems Inc. Java HotSpot(TM) 64-Bit
>> Server VM mixed mode
>>
>> I have some problem: is for the dimensionality of the stationary part
>>
>> my EEG signal is 212585x5 which means I have 5 channels, So the order
>> of the X matrix would be 212585x5, this makes problem, I don't know
>> why,
>> but if I use the transform 5x212585 then I can run the code but I can
>> not increase the dimensionality d to more than 4!!!
>>
>> would you please help me,
>


--
Jan Saputra Mueller
Machine Learning (ML) Group

Technical University of Berlin
Dept. Computer Science
Sekr. FR 6-9
Franklinstr. 28/29
10587 Berlin

http://www.ml.tu-berlin.de

Jan Saputra Müller

unread,
Mar 31, 2011, 6:57:39 AM3/31/11
to ssa-...@googlegroups.com
On 03/31/2011 05:41 AM, Atieh wrote:
> I understand that x(t)=A*s(t), x(t) here is our EEG signal and we
> should find estimation of A to get stat and non stat parts of signal.

This is correct. Notice that A is assumed to be *quadratic* (for
practical reasons), otherwise it would not be possible to invert A.

> which does not necessarily means that these stat and non stat are
> separate channels since they're projected data.

The observations x(t) are assumed to be *linear mixtures* of the sources

s(t) = [stat(t); non-stat(t)]

where stat(t) are stationary sources, and non-stat(t) are non-stationary
sources. Therefore, each channel in x(t) can be non-stationary, because
it is a mixture of stat(t) and non-stat(t) (we do *not* assume that
stat(t) can be obtained just by throwing away some channels in x(t) !!).
SSA finds projection directions, such that the stationary sources are
seperated from the non-stationary ones. Or more correctly: SSA finds a
subspace, such that the projection of the time series x(t) to this
subspace is stationary.
And because it is a subspace, it is not possible that it has more
dimensions than the original space!

All clear?

> One more thing how can I see the algorithms. Actually I aimed to check
> your code to understand better but I can not open it. you'd write with
> java since I only have matlab,

You are right, the algorithm is implemented in Java. You can download
the source code from the SSA Toolbox homepage:

http://www.stationary-subspace-analysis.org/toolbox

Hope that helps! If you have any further question, do not hesitate to
ask again!

Best, Jan

Jan Saputra Müller

unread,
Mar 31, 2011, 7:04:59 AM3/31/11
to ssa-...@googlegroups.com
This is a known problem! The default size of the Java Heap Space in
Matlab is quite small; are you using Matlab 2010a or later? If this is
the case, it is very easy to increase it: Just go to the menu

File -> Preferences -> General -> Java Heap Memory

There, you have to increase the Java Heap Space. I would recommend to
set it to the maximum value.

If you are using an older version of Matlab, it is also possible to
increase the Heap Space (but a little bit more difficult than in version
2010a). Just have a look here:

http://www.mathworks.com/support/solutions/en/data/1-18I2C/

Hope that helps!


On 03/31/2011 08:50 AM, Atieh wrote:
> Hi again, sorry for several questions,
>
> I have some more doubts:
> this SSA can not be used for higher dimensional EEG data?
> because I tired it on a new data set 40x372040 int32 data set.
>
> to use ssa I fist convert it to double, then I got the following
> error:
>
> ??? Java exception occurred:
> java.lang.OutOfMemoryError: Java heap space
>
>
> Error in ==> ssa at 141
> Xdm = ssatoolbox.SSAMatrix(X);
>
> I tried for different number of channels and time samples, but ssa can
> work only for smaller data set.
> It seems it has some problem with high dimension data set,
> Since when I reduce the size there is no more error.Shall I perform
> any modification?
>
> P.S: sorry if you got this email several times, there was something
> wrong in sending the message, so I tried more than one time.
>
> Thak you again,
> Regards,
> Atieh
>

> On Mar 30, 6:51 pm, Jan Saputra M�ller<sapu...@cs.tu-berlin.de>


> wrote:
>> Hi Atieh,
>>
>>> my EEG signal is 212585x5 which means I have 5 channels, So the order
>>> of the X matrix would be 212585x5, this makes problem, I don't know
>>> why,
>>> but if I use the transform 5x212585 then I can run the code
>>
>> Are you using the Matlab-wrapper or the standalone-version of the
>> toolbox? And do you get any error messages, and if this is the case, how
>> do they look like?
>>
>>> not increase the dimensionality d to more than 4!!!
>>
>> This makes absolutely sense! If you have only 5 channels, it would not
>> be useful to assume to have 5 stationary sources (or more)... This is
>> because the result of SSA is a linear subspace. Because your data set is
>> 5 dimensional, the highest dimensionality of a subspace is 5, which
>> would be the whole vector space itself. SSA would do nothing in this
>> case, therefore d is restricted to be in range 1<= d<= 4.
>>
>> Best, Jan
>

Jan Saputra Müller

unread,
Mar 31, 2011, 7:10:08 AM3/31/11
to ssa-...@googlegroups.com
Oh, and do not forget to restart Matlab after changing this parameter!
Matlab will use the old Java heap space value until you restart it.

atieh bamdadian

unread,
Apr 1, 2011, 10:47:37 PM4/1/11
to ssa-...@googlegroups.com, Jan Saputra Müller
Hi Jan,

thank you so much for your complete answer,
unfortunately my Matlab in 2009a, so i follow the procedure in mathworks but still I have the same problem of out of memory!
I should try more I guess,
Regards,
Atieh

one more thing I should open the

2011/3/31 Jan Saputra Müller <sap...@cs.tu-berlin.de>
On Mar 30, 6:51 pm, Jan Saputra Müller<sapu...@cs.tu-berlin.de>
Reply all
Reply to author
Forward
0 new messages