RJB vs D2Box

This forum deals with BCI2000 configuration issues.
Locked
Elizabeth
Posts: 19
Joined: 20 Jan 2005, 16:29

RJB vs D2Box

Post by Elizabeth » 22 Feb 2005, 17:57

Hello,

When running a 1D BCI mu/beta rhythm task do you always use the RJB application or do you use D2Box set up in a way to make it run as 1D task? I ask because using D2Box seems to be the only way I can get the weight adaptation to work (sort of).

When I use the RJB application and set 'weightuse' to '2', a *.lms file is created in the data directory, but it is always empty (and weights don't update), no matter how many trials I run.

When using D2Box, the file is created and contains data. However, the weights only update in the MUD matrix when AdaptCode (in the TargetPos Matrix) is set to '3'... indicating it should adapt in the X and Y dimensions. Why won't this updating of weights work when it is set to '2' for adaptation only in the Y dimension (i.e. a 1D task)? Also, why doesn't it work when using the RJB program?

Thanks a lot for your help!

Elizabeth
UW-Madison

dmcfarland
Posts: 5
Joined: 24 Feb 2005, 14:11

RJB D2Box and adaptation of weights

Post by dmcfarland » 24 Feb 2005, 14:19

RJB does not support weight adaptation. In fact, RJB is not currently being updated since D2Box can do the same functions and more. There is no way to specificy the code for adaptation in RJB. This is part of the target definition in D2Box. Parameter fragments are available to parameterize D2Box so that it can do several 1-d tasks including RJB.

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

Re: Adaptation

Post by gschalk » 25 Feb 2005, 13:52

Elisabeth,

It is possible that we got the documentation backwards for the adaptation row in TargetPos. Please try to use 1 for Y and 2 for X, respectively.

We'll look into this as well and update the documentation if we find an error.

Let us know if this fixed the problem.

Thanks,
Gerv

Elizabeth
Posts: 19
Joined: 20 Jan 2005, 16:29

Re: Adaptation

Post by Elizabeth » 26 Feb 2005, 15:19

Yes, that is the problem! Putting in 1 adapts for the Y dimension (and putting in 2 adapts for the X dimension)... opposite to what the documentation states.

Thanks,
Elizabeth

Elizabeth
Posts: 19
Joined: 20 Jan 2005, 16:29

Re: RJB D2Box and adaptation of weights

Post by Elizabeth » 26 Feb 2005, 15:45

dmcfarland wrote:RJB does not support weight adaptation. In fact, RJB is not currently being updated since D2Box can do the same functions and more. There is no way to specificy the code for adaptation in RJB. This is part of the target definition in D2Box. Parameter fragments are available to parameterize D2Box so that it can do several 1-d tasks including RJB.
Hello,

Thanks for your response... this is good information to know since I was still using RJB! I found the parameter fragments and they were similar to what I ended up creating for the D2Box task before I knew they existed. However, I am wondering about some of the values I should use in the TargetPos martix if I want an RJB like task with 3 or more targets. Of course I would have a column for each target and include the appropriate screen location and dimensions, however, what would I use for Row 5, which "contains a zero-mean value that describes the relative Y location of each target." For a 2 target task this 1 and -1. For a 3 target task would it be 1, 0 and -1? What about for a 4 target task... 1, 0.5, -0.5, -1?

Also, for the 2 target task fragments (rjb2.prm and ud.prm), the value in row 5 of the TargetPos matrix in the first column is -1 and the second column is 1. However, the first column describes the top target... shouldn't that value be a 1 (and the second column -1 for the bottom target)?

Thanks,
Elizabeth

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

Re: Adaptation questions ...

Post by gschalk » 28 Feb 2005, 10:51

However, I am wondering about some of the values I should use in the TargetPos martix if I want an RJB like task with 3 or more targets. Of course I would have a column for each target and include the appropriate screen location and dimensions, however, what would I use for Row 5, which "contains a zero-mean value that describes the relative Y location of each target." For a 2 target task this 1 and -1. For a 3 target task would it be 1, 0 and -1? What about for a 4 target task... 1, 0.5, -0.5, -1?
Elisabeth, these are all good questions. There are a few things to say. The first is that the sum of all numbers needs to have a zero mean. (e.g., -1, 0, +1). Second, these are basically the target values for an algorithm trying to predict those values from the weighted sum of all features. As you know, each feature (e.g., row in the MUD/MLR matrices) has a weight associated with it. If you used -1 and +1 in a 2 target scenario, and for example for vertical control, the weighted feature sum would be -1 every time you want to hit the top target +1 every time you hit the bottom target. The (LMS, or delta rule) algorithm then takes the error, i.e., the difference between the predicted value (as calculated by the MUD matrix for each data block) and the expected value (as prescribed by the TargetPos adaptation value (e.g., -1) to change the weights in the MUD matrix so as to optimize performance on future trials.
Also, for the 2 target task fragments (rjb2.prm and ud.prm), the value in row 5 of the TargetPos matrix in the first column is -1 and the second column is 1. However, the first column describes the top target... shouldn't that value be a 1 (and the second column -1 for the bottom target)?
Because negative numbers make the cursor go up, and positive numbers make it go down, you want to predict a negative number for the top target and a positive number for the bottom target.

In either case, it is probably advisable to first start with a configuration that does not adapt on the feature weights. Then, once you have a subject that can do the task, and once you understand better the issues involved, you might want to turn this feature on. Even then, you should probably turn in on as 'compute' first, so that weights are computed but not used. Once you get appropriate values in the .lms file, you can then turn it on to be used online.

The Gerv

Elizabeth
Posts: 19
Joined: 20 Jan 2005, 16:29

Re: Adaptation questions ...

Post by Elizabeth » 24 Mar 2005, 16:39

gschalk wrote:
In either case, it is probably advisable to first start with a configuration that does not adapt on the feature weights. Then, once you have a subject that can do the task, and once you understand better the issues involved, you might want to turn this feature on. Even then, you should probably turn in on as 'compute' first, so that weights are computed but not used. Once you get appropriate values in the .lms file, you can then turn it on to be used online.

The Gerv
Hello,

When I set WeightUse to 1 (=compute) in the D2Box program, the LMS file is created, but it is empty (and stays empty until I actually turn WeightUse to 2 (=use)). I am just wondering how I can access the computed values so I can see how the program is adapting the weights?

Thanks,
Elizabeth

dmcfarland
Posts: 5
Joined: 24 Feb 2005, 14:11

Post by dmcfarland » 25 Mar 2005, 08:48

The lms file should contain values when WeightUse = 1. Perhaps there is some other problem. Try running it with WeightUse = 2 (perhaps without actually having a subject attached). The adaptation also depends upon the values in row 7 of the Target Position Matrix (adaptcode). If this value is 0 (or something other than 1,2, or 3) the adaptation will not run.

Elizabeth
Posts: 19
Joined: 20 Jan 2005, 16:29

Post by Elizabeth » 25 Mar 2005, 13:23

dmcfarland wrote:The lms file should contain values when WeightUse = 1. Perhaps there is some other problem. Try running it with WeightUse = 2 (perhaps without actually having a subject attached). The adaptation also depends upon the values in row 7 of the Target Position Matrix (adaptcode). If this value is 0 (or something other than 1,2, or 3) the adaptation will not run.
Hello,

I tried it both ways and the LMS file will fill only if WeightUse=2. The file is created, but stays empty if WeightUse=1. The value in row 7 of the Target Position Matrix is set to 1 (since I am interested in adaptation for the Y dimension... this setting is opposite to what the manual states as mentioned in previous posts above). However, I did try setting that value to 2 and 3 and got the same results (empty LMS file if WeightUse=1).

Am I using the correct settings for the WeightControl matrix? Rows 1 - 4 are as follows:

Xadapt
Yadapt
AdaptCode
ResultCode

Thanks,
Elizabeth

Elizabeth
Posts: 19
Joined: 20 Jan 2005, 16:29

LMS File

Post by Elizabeth » 12 Apr 2005, 09:32

Hello,

I was just wondering if anyone has any insignt as to why the LMS file stays empty when weightuse is set to 1? (Please see my previous post for details).

Thanks,
Elizabeth
UW-Madison

Locked

Who is online

Users browsing this forum: No registered users and 1 guest