Giter Club home page Giter Club logo

bcilab's Introduction

BCILAB

MATLAB Toolbox for Brain-Computer Interface Research

This software was written at the Swartz Center for Computational Neuroscience, UCSD. This work was funded by the Army Research Laboratory under Cooperative Agreement Number W911NF-10-2-0022 and a gift from The Swartz Foundation (Old Field, NY). The design of BCILAB was inspired by a preceding toolbox (the PhyPA toolbox) written in 2006-'09 by C. Kothe with contributions from T. Zander at the Department for Human-Machine Systems, Berlin Institute of Technology.

This toolbox is no longer actively developed as of 2017. However, critical updates are still performed. If you are interested in further developping and maintaining BCILAB, feel free to contact us.

See documentation on the Github repository wiki.

bcilab's People

Contributors

arnodelorme avatar chkothe avatar intheon-buildbot avatar nedaeh avatar trmullen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bcilab's Issues

Wiki examples for SCPs do not work.

The examples in the Wiki for Analyzing slow cortical potentials all fail for me.
I want to do my own signal processing and feature extraction anyway, so I'm content to use ml_train for now, but it was rather difficult to get to know the toolbox when none of the documented examples work.

For the first, I receive the following error:

Error using bci_train (line 605)
A paradigm class with the name (DAL_Lofreq) was not found.

Switching the paradigm to DALERP gives a different error about EventTypes.

For any with Windowmeans, I receive the following error:

Error using arg_define>arguments_to_nvps (line 507)
ParadigmDataflowSimplified.calibrate_simple:arg_define:invalid_arguments

Error in arg_define (line 179)
        nvps = arguments_to_nvps(caller_name,fmt,vals,structmask,flat_names,first_names,skip*leading_skippable);

Error in ParadigmDataflowSimplified/calibrate_simple (line 535)
            args = arg_define(varargin, ...

Error in ParadigmBaseSimplified/calibrate (line 183)
            model = self.calibrate_simple('signal',signal,varargin{:});

Error in bci_train/@(varargin)instance.calibrate(varargin{:})



Error in arg_report (line 101)
        func(args{:},'__arg_report__',type);

Error in bci_train (line 627)
    paradigm_parameters = arg_report('vals',calibrate_func,paradigm_parameters);

run_readlsl isnt working. the error is:

run_readlsl
Looking for a device with name=openvibeSignal ...
Opening an inlet...
Warning: the size of the channel location structure does not match with
number of channels. Channel information have been removed.
Struct contents reference from a non-struct array object.

Error in set_new (line 119)
exp_endfun('set_online',struct('head',@RawData,'parts',{{{signal.chanlocs.labels},unique({signal.chanlocs.type})}}));

Error in hlp_wrapresults (line 51)
[a{1:len}] = f(varargin{:});

Error in exp_eval (line 133)
varargout = hlp_wrapresults(x.head,x.parts{:});

Error in onl_newstream (line 106)
stream = exp_eval(set_new('buffer_len',10,'timestamps_len',25,'types',[],varargin{:}, ...

Error in run_readlsl (line 55)
onl_newstream(opts.new_stream,'srate',srate,'chanlocs',channels,'buffer_len',opts.buffer_len);

Status of BCILAB

I tried downloading BCIlab a couple weeks ago for matlab 18b, but there appeared to be errors on the code. What is the status on the current master branch, and are there any editions recommended for osx High Sierra 10.13? I am thinking of using EEGLAB because I have had success w them in the past, but i am hesitant to give up the breadth bcilab offers, and its real-time capabilities.

Error in ml_trainsvm

Hello,

I'm using devel branch of BCILAB and trying to train my model with svm.
However, the error message like below was emerged.

ml_trainsvm: There is a Java method named "variant" on your path; if you experience any name clash with it, please report this issue.
Note: cannot determine free disk space on your platform, trying to cache results anyway. This message will only be shown once.

And when the toolbox was started, there was a message like below.

code is in C:\Users\cvpr\Desktop\code_ane\BCILAB-devel\code
data is in C:\Users\cvpr\Desktop\code_ane\BCILAB-devel\userdata
results are in C:\Users\cvpr\Desktop\code_ane\BCILAB-devel\userdata
cache is disabled
temp is in C:\Users\cvpr\Desktop\code_ane\BCILAB-devel-temp

The point of this problem is that iteration of cross-validation does not stop.

I'm really appreciated if someone helps me to solve this problem.

Thanks a lot.

unable to stream

Hi,

I am an undergrad which having BCI system for my final year project.
I was trying to connect neuroscan to BCILAB. However when i try to perform online analysis>read input from >neuroscan recorder.
a small window pop out where i can fill the source TCP Hostname, TCP host port, etc.
I am pretty sure that my neuroscan is running in server mode and i also key-in the exact port to the BCILAB..
However BCILAB giving me this error..

Error in ns_open (line 21)
h.handle = pnet('tcpconnect', hostname, port);

Error in run_readneuroscan (line 38)
h = ns_open(opts.src_hostname, opts.src_port);

Error in arg_guidialog (line 238)
[varargout{1:nargout(func)}] = func(oldparams{:},params);

Error while evaluating Menu Callback

so would you mind to give me your suggestion so that i can carry on with my research.

your kind attention is highly appreciated

Supergui and Filter Errors on Mac

Hi,
I tried to do the BCILAB tutorials from SCCN last week (since I'll have to use it for my thesis) and encountered some errors.

I use a Mac with OS 10.12.3 with all recent updates, my MATLAB version is R2015b (8.6.0.267246).
Furthermore, I've tried both the EEGLAB plugin provided with BCILAB (13_4_4_b) as well as the newest version from SCCN (14_0_0_b), and the BCILAB version from SCCN (1.1), the BCILAB version from the master branch (1.2-alpha) and the BCILAB version from the devel branch (1.4) in various combinations.

It could be important to mention that when starting BCILAB, I get a warning:

Warning: Function cummax has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict 
   In path (line 109)
   In addpath (line 88)
   In env_load_dependencies>load_dependencies (line 165)
   In env_load_dependencies (line 78)
   In env_startup (line 224)
   In bcilab (line 115) 

These are the errors: in the BCILAB versions from SCCN and from the master branch I've encountered the supergui error referenced in other issues, every time I try to define a new approach (after choosing one, before the window to specify the parameters):

Error using supergui (line 122)
supergui error: argument 'fig' must be numeric

Error in inputgui (line 161)
            [tmp tmp2 allobj] = supergui( 'fig', fig, 'minwidth', 200, 'geomhoriz',
            g.geometry, 'uilist', g.uilist, 'geomvert', [g.geomvert(:)' 1 1] );

Error in arg_guidialog (line 194)
[outs,dummy,okpressed] = inputgui('geometry',geometry,
'uilist',uilist,'helpcom',['env_doc ' helptopic],
'title',dialogtitle,'geomvert',geomvert); %#ok<ASGLU>

Error in gui_configapproach (line 37)
result = arg_guidialog(calibrate_func,'params',approach.parameters,'title','BCILAB:
Configure approach','Invoke',false);

Error in gui_newapproach>gui_newapproach_OutputFcn (line 65)
        [varargout{1:2}] = gui_configapproach(varargout{1},true);

Error in gui_mainfcn (line 264)
        feval(gui_State.gui_OutputFcn, gui_hFigure, [], gui_Handles);

Error in gui_newapproach (line 28)
    gui_mainfcn(gui_State, varargin{:});
 
Error while evaluating Menu Callback

I've read that this occurs when you're using an old EEGLAB version, but I have the current one (14.0.0 from the SCCN, and the recent version in the BCILAB).

So I tried to check out the devel branch of BCILAB, and I didn't encounter the supergui error (jay!), but another error popped up when I was training the classifier (nooo!):

Error using matlab.ui.Figure/set
Invalid or deleted object.

Error in matlab.hg.internal.openfigLegacy (line 111)
                set(fig,'Visible','off');

Error in gui_mainfcn>local_openfig (line 286)
    gui_hFigure = matlab.hg.internal.openfigLegacy(name, singleton, visible);

Error in gui_mainfcn (line 158)
        gui_hFigure = local_openfig(gui_State.gui_Name, gui_SingletonOpt, gui_Visible);

Error in gui_reviewresults (line 42)
    gui_mainfcn(gui_State, varargin{:});


Error in gui_calibratemodel>pushbutton1_Callback (line 171)
    gui_reviewresults(stats); end


Error in gui_mainfcn (line 95)
        feval(varargin{:});

Error in gui_calibratemodel (line 30)
    gui_mainfcn(gui_State, varargin{:});


Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)gui_calibratemodel('pushbutton1_Callback',hObject,eventdata,guidata(hObject)) 
Error using uiwait (line 81)
Error while evaluating UIControl Callback

Error using filter
Initial conditions must be a vector of length max(length(a),length(b))-1, or an array
with the leading dimension of size max(length(a),length(b))-1 and with remaining
dimensions matching those of x.

Error in filter_fast (line 45)
        [X,Zf] = filter(B,A,X,Zi,dim);


Error in flt_fir (line 273)
            [X(range,:),state.(f{1})] = filter_fast(b,1,X(range,:),state.(f{1}),1);


Error in hlp_wrapresults (line 52)
        [a{1:len}] = f(varargin{:});


Error in exp_eval (line 131)
            varargout = hlp_wrapresults(x.head,x.parts{:});


Error in exp_beginfun (line 428)
            parts{i} = exp_eval(parts{i},inf); %#ok<AGROW>


Error in set_makepos (line 61)
if ~exp_beginfun('filter'), return; end


Error in hlp_wrapresults (line 52)
        [a{1:len}] = f(varargin{:});


Error in exp_eval (line 131)
            varargout = hlp_wrapresults(x.head,x.parts{:});


Error in hlp_scope>@(f,a,frame__f1)feval(f,a{:})

Error in hlp_scope (line 53)
    [varargout{1:nargout}] = func(f,varargin);


Error in exp_eval_optimized (line 52)
    [varargout{1:nargout}] =
    hlp_scope({'memoize',{'memory',1,'disk',double(unpartitioned)}}, @exp_eval,x,iters);


Error in bci_predict (line 219)
    dataset.streams{g} = exp_eval_optimized(resolved_graph{g}); end


Error in gui_applymodel>pushbutton1_Callback (line 130)
[pred,loss,stats,targ] = bci_predict('model',model,'data',dataset,'metric',metric);
%#ok<NASGU>


Error in gui_mainfcn (line 95)
        feval(varargin{:});

Error in gui_applymodel (line 42)
    gui_mainfcn(gui_State, varargin{:});


Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)gui_applymodel('pushbutton1_Callback',hObject,eventdata,guidata(hObject)) 
Error using uiwait (line 81)
Error while evaluating UIControl Callback

beginning evaluation...
NOTE: no perfectly matching stream found; matches ordered labels: 0, matches unordered labels: 0, provides necessary labels: 1, matches channel count: 0, matches channel types: 0, provides necessary types: 0, provides necessary channel count: 1
  pipeline input labels: {'Fp1', 'Fp2', 'F3', 'F4', 'C3', 'C4', 'P3', 'P4', 'O1', 'O2', 'F7', 'F8', 'T3', 'T4', 'T5', 'T6', 'CB2', 'Cz', 'Fz', 'Pz', 'T5''', 'T6''', 'O1''', 'O2''', 'P3''', 'P4''', 'Pz''', 'Oz', 'CB1', 'M1', 'M2', 'VEOG'}
  using stream's labels: {'Fp1', 'Fp2', 'F3', 'F4', 'C3', 'C4', 'P3', 'P4', 'O1', 'O2', 'F7', 'F8', 'T3', 'T4', 'T5', 'T6', 'CB2', 'Cz', 'Fz', 'Pz', 'T5''', 'T6''', 'O1''', 'O2''', 'P3''', 'P4''', 'Pz''', 'Oz', 'CB1'}
Error using filter
Initial conditions must be a vector of length max(length(a),length(b))-1, or an array
with the leading dimension of size max(length(a),length(b))-1 and with remaining
dimensions matching those of x.

Error in filter_fast (line 45)
        [X,Zf] = filter(B,A,X,Zi,dim);


Error in flt_fir (line 273)
            [X(range,:),state.(f{1})] = filter_fast(b,1,X(range,:),state.(f{1}),1);


Error in hlp_wrapresults (line 52)
        [a{1:len}] = f(varargin{:});


Error in exp_eval (line 131)
            varargout = hlp_wrapresults(x.head,x.parts{:});


Error in exp_beginfun (line 428)
            parts{i} = exp_eval(parts{i},inf); %#ok<AGROW>


Error in set_makepos (line 61)
if ~exp_beginfun('filter'), return; end


Error in hlp_wrapresults (line 52)
        [a{1:len}] = f(varargin{:});


Error in exp_eval (line 131)
            varargout = hlp_wrapresults(x.head,x.parts{:});


Error in hlp_scope>@(f,a,frame__f1)feval(f,a{:})

Error in hlp_scope (line 53)
    [varargout{1:nargout}] = func(f,varargin);


Error in exp_eval_optimized (line 52)
    [varargout{1:nargout}] =
    hlp_scope({'memoize',{'memory',1,'disk',double(unpartitioned)}}, @exp_eval,x,iters);


Error in bci_predict (line 219)
    dataset.streams{g} = exp_eval_optimized(resolved_graph{g}); end


Error in gui_applymodel>pushbutton1_Callback (line 130)
[pred,loss,stats,targ] = bci_predict('model',model,'data',dataset,'metric',metric);
%#ok<NASGU>


Error in gui_mainfcn (line 95)
        feval(varargin{:});

Error in gui_applymodel (line 42)
    gui_mainfcn(gui_State, varargin{:});


Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)gui_applymodel('pushbutton1_Callback',hObject,eventdata,guidata(hObject)) 
Error using uiwait (line 81)
Error while evaluating UIControl Callback

beginning evaluation...
NOTE: no perfectly matching stream found; matches ordered labels: 0, matches unordered labels: 0, provides necessary labels: 1, matches channel count: 0, matches channel types: 0, provides necessary types: 0, provides necessary channel count: 1
  pipeline input labels: {'Fp1', 'Fp2', 'F3', 'F4', 'C3', 'C4', 'P3', 'P4', 'O1', 'O2', 'F7', 'F8', 'T3', 'T4', 'T5', 'T6', 'CB2', 'Cz', 'Fz', 'Pz', 'T5''', 'T6''', 'O1''', 'O2''', 'P3''', 'P4''', 'Pz''', 'Oz', 'CB1', 'M1', 'M2', 'VEOG'}
  using stream's labels: {'Fp1', 'Fp2', 'F3', 'F4', 'C3', 'C4', 'P3', 'P4', 'O1', 'O2', 'F7', 'F8', 'T3', 'T4', 'T5', 'T6', 'CB2', 'Cz', 'Fz', 'Pz', 'T5''', 'T6''', 'O1''', 'O2''', 'P3''', 'P4''', 'Pz''', 'Oz', 'CB1'}
Error using filter
Initial conditions must be a vector of length max(length(a),length(b))-1, or an array
with the leading dimension of size max(length(a),length(b))-1 and with remaining
dimensions matching those of x.

Error in filter_fast (line 45)
        [X,Zf] = filter(B,A,X,Zi,dim);


Error in flt_fir (line 273)
            [X(range,:),state.(f{1})] = filter_fast(b,1,X(range,:),state.(f{1}),1);


Error in hlp_wrapresults (line 52)
        [a{1:len}] = f(varargin{:});


Error in exp_eval (line 131)
            varargout = hlp_wrapresults(x.head,x.parts{:});


Error in exp_beginfun (line 428)
            parts{i} = exp_eval(parts{i},inf); %#ok<AGROW>


Error in set_makepos (line 61)
if ~exp_beginfun('filter'), return; end


Error in hlp_wrapresults (line 52)
        [a{1:len}] = f(varargin{:});


Error in exp_eval (line 131)
            varargout = hlp_wrapresults(x.head,x.parts{:});


Error in hlp_scope>@(f,a,frame__f1)feval(f,a{:})

Error in hlp_scope (line 53)
    [varargout{1:nargout}] = func(f,varargin);


Error in exp_eval_optimized (line 52)
    [varargout{1:nargout}] =
    hlp_scope({'memoize',{'memory',1,'disk',double(unpartitioned)}}, @exp_eval,x,iters);

> Error in bci_predict (line 219)
>     dataset.streams{g} = exp_eval_optimized(resolved_graph{g}); end


Error in gui_applymodel>pushbutton1_Callback (line 130)
[pred,loss,stats,targ] = bci_predict('model',model,'data',dataset,'metric',metric);
%#ok<NASGU>


Error in gui_mainfcn (line 95)
        feval(varargin{:});

Error in gui_applymodel (line 42)
    gui_mainfcn(gui_State, varargin{:});


Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)gui_applymodel('pushbutton1_Call back',hObject,eventdata,guidata(hObject)) 
Error using uiwait (line 81)
Error while evaluating UIControl Callback

BCILAB told me to install xCode, after doing this the master BCI still produces the supergui error, the devel branch version produces a new one:

WARNING: The MVAR algorithm 'BSBL BO' depends on BSBL_BO.m, which cannot be located on the path. This algorithm will not be available.
WARNING: The MVAR algorithm 'BSBL L1' depends on BSBL_L1_noise.m, which cannot be located on the path. This algorithm will not be available.
WARNING: The MVAR algorithm 'T-MSBL' depends on TMSBL.m, which cannot be located on the path. This algorithm will not be available.
WARNING: The MVAR algorithm 'SCSA EM' depends on scsa_em.m, which cannot be located on the path. This algorithm will not be available.
Error using arg_guidialog>obtain_items (line 273)
The specified identifier (SignalProcessing.FIRFilter.Frequencies) could not be found in the function's declared
arguments.

Error in arg_guidialog (line 116)
[spec,subset] = obtain_items(rawspec,subset,'',show_guru);


Error in gui_configapproach (line 37)
result = arg_guidialog(calibrate_func,'params',approach.parameters,'title','BCILAB: Configure
approach','Invoke',false);


Error in gui_newapproach>gui_newapproach_OutputFcn (line 65)
        [varargout{1:2}] = gui_configapproach(varargout{1},true);


Error in gui_mainfcn (line 264)
        feval(gui_State.gui_OutputFcn, gui_hFigure, [], gui_Handles);

Error in gui_newapproach (line 28)
    gui_mainfcn(gui_State, varargin{:});

 
Error while evaluating Menu Callback 

I've tried reinstalling all plugins, resetting the default paths, restarting both MATLAB and my computer. I guess there could be an error with the dependencies on my computer, but I'm not quite sure how to solve that.
Is there a solution, or do I have to switch to a Windows-PC?

Regards,
Juliane

Your lead-field matrix has a # of columns that does not correspond to the # of source vertices

I am trying to run BCILAB with the following outlines given here

https://docs.google.com/document/d/1iTGj23C5uPW85g4JPDc9l5BTDuKnTvp90y2oCT5JSiY/edit?usp=sharing

As the title suggested it gives me an error while calibrating the model

“Your lead-field matrix has a # of columns that does not correspond to the # of source vertices."

I have tried to debug the problem and reached to the source of the problem

in flt_sourceLocalize.m the struct state has the fields :

state =

struct with fields:

  leadFieldMatrix: [343×3740 double]
laplacianOperator: [3740×3740 double]
        rmIndices: [1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880]
        nVertices: 3751
        nChannels: 64

The error occurs because number of columns leadFieldMatrix doesn't equal to nVertices

What should I do to make them equal ?

Error in Loading BCILAB dependencies with NARGINCHK

Greeting

I face problem require change every 'nargchk' to 'NARGINCHK'
Explanation:
The recommended functions for validating the number of input and output arguments are narginchk(minargs, maxargs) and nargoutchk(minargs, maxargs), respectively. Each of these functions throws an error if the number of arguments falls outside the specified range. Therefore, there is no need to use the error function in combination with either of these functions.

For example, I put "narginchk( 1, inf ) ;" instead of "error( nargchk( 1, Inf, nargin ) );"

But I faced dependency problem : Undefined function 'NARGINCHK' for input arguments of type 'double'. The dependency will likely not be fully operational.

Please help
Here is the run:
Trial>> bcilab
starting BCILAB...
running config script C:\Users\Meshael\BCI researches\sw\BCILAB-1.1\bcilab_config.m...
running startup function...
BCILAB sub-directories have been detected in the MATLAB path, removing them.
The previously loaded EEGLAB path has been replaced.
Loading BCILAB dependencies...
Loading C:\Users\Meshael\BCI researches\sw\BCILAB-1.1\dependencies\unlocbox-1.1.70...
UnLocBoX version 1.1.70. Copyright 2012-2013 LTS2-EPFL, by Nathanael Perraudin
Loading C:\Users\Meshael\BCI researches\sw\BCILAB-1.1\dependencies\mlunit-1.5.1\src...
mlUnit has found a built-in assert functions.
Trying to rename mlUnit assert.m...not found.
Loading C:\Users\Meshael\BCI researches\sw\BCILAB-1.1\dependencies\eeglab_10_0_1_0x...
eeglab: options file is C:\Users\Meshael\BCI researches\sw\BCILAB-1.1\dependencies\eeglab_10_0_1_0x\functions\adminfunc\eeg_options.m
Error running dependency loader C:\Users\Meshael\BCI researches\sw\BCILAB-1.1\dependencies\eeglab_10_0_1_0x\env_exec.m; reason: While setting property 'FontName' of class 'UIControl':
String value must not be empty
The dependency will likely not be fully operational.
Loading C:\Users\Meshael\BCI researches\sw\BCILAB-1.1\dependencies\cvx-1.21.b795...

Testing the cvx distribution. If this script aborts with
an error, please report the error to the authors.

Error running dependency loader C:\Users\Meshael\BCI researches\sw\BCILAB-1.1\dependencies\cvx-1.21.b795\env_exec.m; reason: Undefined function 'NARGINCHK' for input arguments of type 'double'.
The dependency will likely not be fully operational.

code is in C:\Users\Meshael\BCI researches\sw\BCILAB-1.1\code
data is in C:\Users\Meshael\BCI researches\sw\BCILAB-1.1\userdata
results are in C:\Users\Meshael\BCI researches\sw\BCILAB-1.1\userdata
cache is disabled
temp is in C:\Users\Meshael\BCI researches\sw\BCILAB-1.1-temp

Welcome to the BCILAB toolbox on Meshael!

Running/extending BCILAB with GNU Octave

For users and contributors who don't use MATLAB, how might we run and extend the BCILAB? E.g. what are some opportunities and/or difficulties running BCILAB with GNU Octave? What are the possibilities of porting BCILAB to a fully open-source platform?

Load data

Dear

I'm working with BCILAB toolbox and I have a problem in how can I load more than one .edf file to train the model, would you please help me in solving this problem

*Note : I use the physionet database https://physionet.org/pn4/eegmmidb/

Thank you
Best

SVMlight-6.01 install.sh assertion failed

Hi,

Recently I downloaded the SVMlight-6.01 and tried to install it in Matlab. However, when I executed the "install.sh" to copy and patch the SVM files, error occurs. It says that "This application has requested the Runtime to terminate it in an usual way. Please contact the application's support team for more information." Error occurs when "patching file avm_classify.c", says "assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354".

I have followed] all the installation instructions, and extract Thorsten Joachim's svm-lite archive into the "src" directory. I don't know whether it is I've done somewhere incorrectly, or it is just a bug.

Here is the link of the error message screenshot
image

Best,
Sc

how to add events to EEG data acquired through EMOTIV EEG.?

Dear all, please help me. I am using EMOTIV EEG to determine person's cognitive state. Either person is in stress or happy etc. After acquiring EEG signal through EMOTIV, How I add events(markers) of stress, not stress . happy & not happy. I am using EEGLAB and BCILAB. Please help me how I add events/markers to continuous EEG signal.

Error when streaming data using run_readlsl plugin

Step 1: Run SendData-mac or SendData64 on Windows to send fake BioSemi EEG stream
Step 2: run BCILAB-root/bcilab.m
Step 3: run_readlsl('BioSemi'); OR GUI/Online Analysis/Read Input From.../Lab Streaming Layer/ (default settings)

This Error is printed with each incoming sample:

Error in block-reading function:
Too many input arguments.
occurred in:
run_readlsl/read_data: 183
@()read_data(inlet,marker_inlet,opts.always_double): 175
append_data: 86
onl_read_background/@(timer_handle,varargin)append_data(stream_name,stream_id,timer_handle,block_reader): 0
timercb: 30
timercb: 13

183 data_clock = data_inlet.time_correction([],opts.clock_alignment,opts.clock_est_window);

Line 164 of set targetmarkers.m fails: clear_existing_targets_on_match not defined

Line 164 of set targetmarkers.m fails because variable "clear_existing_targets_on_match" was not defined.
if clear_existing_targets_on_match && isfield(signal.event,'target') && ~isempty([signal.event.target])

I suspect that this is because the arg_define specified earlier in the file was not successful for the variable: clear_existing_targets_on_match.

I'm not sure how to fix it.

bug in RVM bias?

I haven't actually run the code but I was looking through the linear RVM train and predict functions.

Imagining if the bias happens to be relevant the predict code first adds the ones to the trials and then selects features. Would this not discard the last relevant feature?

I think the one should be added after selecting the features. Maybe I am misunderstanding something?

how to read data from BioSemi amplifier online

Hi,
I chose to read data from BioSemi amplifier in real time through the GUI and the error popped up, indicating that the bs_open() function could not find Labview_DLL.dll . I know I mustn't have connected to the USB2 driver. The computer has already set up AntiView to record EEG data. So I want to know how to make a connection between BCILAB and Biosemi.

Issues running biosig2eeglab.m

We have been trying to run merge_sets.m, an EEGLAB script, which calls the script biosig2eeglab, and we have been getting the following errors. Does anyone have any insight into what might be going wrong?

_**Warning SREAD: NoS yields non-integer position [Inf, NaN]
Error SREAD: unknown-format not supported yet.
Reference to non-existent field 'InChanSelect'.

Error in biosig2eeglab (line 65)
if max(dat.InChanSelect) > size(DAT,1)

Error in pop_biosig (line 160)
EEG = biosig2eeglab(dat, DAT, interval, g.channels, strcmpi(g.importevent, 'on'));**_

We converted the data from .bdf to .edf files before running this script. Thanks!

LabStreamingLayer plugin for reading run_readlsl hangs

I am trying to read lsl stream from the online analysis menu using the run_readlsl. I already have a few streams running in the LSL (confirmed by labrecorder, showing a listing of the streams). I am primarily interested in acquiring the stream from openVibe (connecting a TMSi device) and that stream is visible in the labrecorder. The problem is that the online plugin just doesn't work and once I try to run it, it just hangs. I have narrowed it down to "lsl_resolve_bypred" which basically returns an empty result even if I provide a LSLstream in type (e.g. "type=openvibeSignal"). If I instead use the command lsl_resolve_all, I do end up getting all the streams returned in matlab. Any pointers as to why "lsl_resolve_bypred" is not working ? I am using windows 7 64 bit.

permutation test

Is there a way of doing statistical permutation test with BCILAB? I would like to randomly permute the classes to get an estimate of the probability distribution of the classifier results. This would be to generate alpha values as an additional check alongside typical cross validation.

Problem with loading EEG dataset and visualization in BCILAB

Hi,

I have been trying to load my EEG data (~8 hours data from an overnight sleep study) into BCILAB for offline analyses but when I inspect it before training, the EEG plot isn't displayed correctly and chunks of my data are missing. I collected my EEG data using BrainVision Recorder and added channel locations and event labels using EEGLAB. I loaded this dataset (.set) to BCILAB. Interestingly, when I inspect the data I see 1-10 seconds data in the first window, 299.9-309.9 data in the second window, 599.8-609.8 in the third window (a consistent loss of 289.9 seconds data across windows) and so on. Moreover, the axes are wrong and it's not 'channel activities EEG plot' that I see with EEGLAB and what's shown in the BCILAB tutorial (https://www.youtube.com/watch?v=Sup2SaJyFQE&t=33).

Does anyone have any idea why the data doesn't load properly? I tried different paradigms but I cannot train the model because of the lack of event markers in the data training because of data loss. Does anyone have any suggestions as I am very new to BCILAB? I will really appreciate any recommendations. Thanks!

Software versions used:
MATLAB version 2015a (Mac OS Sierra 10.12.4 but I also observed this on Windows)
BCILAB DEVEL (with EEGLAB 13_4_4b in dependencies) - With BCILAB master, I get supergui problems

Error obtained when I try to train my data (my event markers are present in the data when I check with EEGLAB but because of data loss, most of the events are absent in the data loaded by BCILAB)

`WARNING: the data set did not contain matching target markers.
WARNING: set_gettarget did not find any target information in this data set. See help of set_gettarget and set_targetmarkers for how data sets can be annotated with target information.

The loaded EEGLAB set is lacking an online expression; assuming it contains unfiltered data.
If it contains filtered data, however, BCI models derived from it will likely not be online-capable.
fold.
WARNING: This data set contains no trials for one of your target classes: please check whether your target marker naming is correct, and ensure that your data has enough target events in each of its required subsets (e.g., in a (nested) cross-validation).
WARNING: After set_selepos your signal is empty.
WARNING: This training set contains only one class - the subsequent learning phase will likely fail.

Computation failed; error trace:
Your training data set has no trials for one of your classes; you need at least two classes to train a classifier.
The most likely reasons are that one of your target markers does not occur in the data, or that all your trials of a particular class are concentrated in a single short segment of your data (10 or 20 percent). The latter would be a problem with the experiment design.
occurred in:
ml_trainlda: 103
ml_train: 170
ParadigmDataflowSimplified.calibrate_prediction_function: 481
ParadigmDataflowSimplified.calibrate_simple: 602
ParadigmBaseSimplified.calibrate: 184
instantiate_paradigm/@(varargin)instance.calibrate(varargin{:}): 0
@(trainset,varargin)utl_complete_model(args.calibrate_func('collection',{trainset},varargin{:}),args.predict_func): 903
evaluate_internal: 62
cached_evaluate: 42
utl_evaluate_fold: 34
par_beginschedule: 166
par_schedule: 71
utl_crossval: 311
utl_nested_crossval: 141
run_computation: 938
make_func/@(f,a,frame__f1)feval(f,a{:}): 0
hlp_scope: 53
bci_train: 856
pushbutton1_Callback: 156
gui_mainfcn: 95
gui_calibratemodel: 30
@(hObject,eventdata)gui_calibratemodel('pushbutton1_Callback',hObject,eventdata,guidata(hObject)): 0

`

Supergui Error in BCILAB

Hello,

I'm getting the following error when trying to use a few different functions in BCILAB.

Error using supergui (line 140)
supergui error: argument 'fig' must be numeric

Error in inputgui (line 169)
[tmp tmp2 allobj] = supergui( 'fig', fig, 'minwidth',
200, 'geomhoriz', g.geometry, 'uilist', g.uilist,
'geomvert', [g.geomvert(:)' 1] );

Error in arg_guidialog (line 194)
[outs,dummy,okpressed] = inputgui('geometry',geometry,
'uilist',uilist,'helpcom',['env_doc ' helptopic],
'title',dialogtitle,'geomvert',geomvert); %#ok

Error while evaluating Menu Callback

In particular, this occurs when I select: Online Analysis > Read Input From > Lab Streaming Layer
How can I solve it?

Thanks

Trouble setting markers correctly

Hello,

I am getting started on BCILAB so I'm currently following through the practicum slides. I am using the current version (devel branch) which looks slighty different to the one used in the practicum. I don't understand how to set the target markers correctly. In the practicum the field appears under 'configure approach' while in my version I can only make changes to them under 'calibrate model'. I tried naming them as {'StimulusCode_2','StimulusCode_3'} as described on the website: https://sccn.ucsd.edu/wiki/BCILAB as well as {'S 1' 'S 2'} as described in the practicum.
In any case I get the following error:

WARNING: the data set did not contain matching target markers.
Computation failed; error trace:
X and V must be of the same length.
occurred in:
reshapeAndSortXandV: 416
interp1: 91
design_fir: 51
flt_fir: 206
hlp_wrapresults: 52
exp_eval: 131
exp_beginfun: 428
set_makepos: 61
hlp_wrapresults: 52
exp_eval: 131
@(f,a,frame__f2)feval(f,a{:}): 0
hlp_scope: 53
exp_eval_optimized: 52
ParadigmDataflowSimplified.calibrate_simple: 588
ParadigmBaseSimplified.calibrate: 184
@(varargin)instance.calibrate(varargin{:}): 0
@(trainset,varargin)utl_complete_model(args.calibrate_func('collection',{trainset},varargin{:}),args.predict_func): 903
utl_searchmodel: 183
hlp_getresult: 47
par_beginschedule: 166
run_computation: 932
@(f,a,frame__f1)feval(f,a{:}): 0
hlp_scope: 53
bci_train: 856
pushbutton1_Callback: 156
gui_mainfcn: 95
gui_calibratemodel: 30
@(hObject,eventdata)gui_calibratemodel('pushbutton1_Callback',hObject,eventdata,guidata(hObject)): 0
Here are two screenshots of both my windows:
screenshot calibrate
screenshot configure approach

Is the [7 30] as the frequency specification of the filter correct? I assume it's the same thing as 'frequency domain selection' in the practicum?

I've been trying for a while now to fix this but I am not a programmer and new to this. The 'help' function didn't get me any further.
Does anybody have an idea? Any help would be greatly appreciated!

filters does not run online

trying to call some filters (flt_buffer and flt_cleansettings), but those functions give output only when those are called. how to render them online while streaming data?

Reference to non-existent field 'targets'.

been getting this error from my bcilab developer version. even though i have different event markers. it still wasn't able to select the target marker. Please what can i do?

Issue with BCI annotate

Hello! I'm attempting to use bci_annotate(Model,Data) on the BCILAB development branch with MATLAB R2017b on Ubuntu 18.04 and revive the following errors:

io_loadset(): loading /usr/local/MATLAB/R2017b/toolbox/BCILAB-devel-temp/flushedsets/1989740531.sto...
Using deprecated argument "icachansind/ComponentChannelIndices" in function @(f,a,frame__f2)feval(f,a{:}) (help: Secondary location for component channel subset. Usage not recommended.).
Using deprecated argument "plotrad/PlottingRadius" in function @(f,a,frame__f2)feval(f,a{:}) (help: Preferred plotting radius for topoplot()).
Using deprecated argument "shrink/ShrinkFactor" in function @(f,a,frame__f2)feval(f,a{:}) (help: Preferred shrink factor for topoplot()).
Using deprecated argument "nodatchans/NoDataChans" in function @(f,a,frame__f2)feval(f,a{:}) (help: Legacy option for EEGLAB).
Warning: The event structure has changed across successive chunks passed to set_makepos; discarding buffered events.
Subscripted assignment dimension mismatch.

Error in bci_annotate (line 172)
data.streams{1}.data(C+(1:NC),:) = tmp.data;

Error in basic_script (line 40)
bci_annotate('Model',lastmodel, 'Data',traindata)

I'm not sure where to go with this one. Any help would be greatly appreciated.

ml_train does not work with svm

Everytime I use ml_train with svm, no matter what parameters I choose, it always predicts all trials to be members of the first class. See below.

nSamples = 64;
nChannels = 16;
nTrials = 1000;
nClasses = 4;
classAmp = 20;
mixingGain = 5;
noiseAmp = 10;

labels = mod(1:nTrials, nClasses); labels(labels==0) = nClasses;
labels = shuffle(labels);

classOffsets = classAmp*(rand(1, nClasses) - 0.5);
templateSignal = [zeros(floor(nSamples/2), 1); ones(floor(nSamples/2), 1)];
mixingMatrix = mixingGain*(rand(1, nChannels) - 0.5);

trials = nan(nTrials, nSamples, nChannels);
for class_ix = 1:nClasses
    trialBool = labels == class_ix;

    latentSig = templateSignal * classOffsets(class_ix);
    sensorSig = shiftdim(templateSignal * mixingMatrix, -1);
    sensorSig = repmat(sensorSig, sum(trialBool), 1);
    sensorSig = sensorSig + noiseAmp*(rand(size(sensorSig)) - 0.5);

    trials(trialBool, :, :) = sensorSig;
end


trials = reshape(trials, nTrials, nSamples*nChannels);
model = ml_train({trials, labels}, {'svm',...
    'cost', 1,...
    'variant', 'dual',...
    'kernel', 'rbf',...
    'gamma', 0.3,...
    'scaling', 'std'});
predictions = ml_predict(trials, model);
[~, predY] = max(predictions{2}, [], 2);
acc = 100 * sum(labels' == predY) / nTrials;
fprintf('Accuracy: %i\n', round(acc));

Note that these data can be classified when using other learners, e.g.:

model = ml_train({trials, labels}, {'lda'});

Mex files don't compile

I've download the latest version of BCILab and the mex files don't compile.

Are there any known compatibility issues with compiling mex files on a mac >10.10, Matlab 2013a, with Xcode 7.2?

I would like this version because it gives the timestamps because I'm not sure how to reconstruct them in the previous version of bcilab.

Supergui Error

Hello,

I'm getting the following error when trying to use a few different functions in BCILAB.

Error using supergui (line 122)
supergui error: argument 'fig' must be numeric

Error in inputgui (line 161)
[tmp tmp2 allobj] = supergui( 'fig', fig, 'minwidth',
200, 'geomhoriz', g.geometry, 'uilist', g.uilist,
'geomvert', [g.geomvert(:)' 1 1] );

Error in arg_guidialog (line 194)
[outs,dummy,okpressed] = inputgui('geometry',geometry,
'uilist',uilist,'helpcom',['env_doc ' helptopic],
'title',dialogtitle,'geomvert',geomvert); %#ok

Error while evaluating Menu Callback

In particular, this occurs when I select: Online Analysis > Read Input From > Lab Streaming Layer (among other options). After doing a bit of Googling, it seems that the supergui functionality in MATLAB 2014b and later has been redefined. Is there a workaround here that doesn't involve installing an older version of MATLAB?

Mex files do not compile with MSVC 2013/2015 on MATLAB R2017a

As title suggests, BCILAB refuses to compile with either Visual Studio 2013 or 2015 on my Windows 10 x64 machine running MATLAB R2017a.
It throws up an error suggesting I use old compilers which are not supported by my version of MATLAB.

There are no issues with the system I am using.
'mex -setup' shows that both compilers are present, and I can compile and run other mex files with no issues.

Do you have any idea how to fix this?
Below is a dump that appears when calling the bcilab() function.

starting BCILAB...
running config script C:\Users\cesposito\Desktop\BCILAB-master\bcilab_config.m...
running startup function...
Loading BCILAB dependencies...
Loading C:\Users\cesposito\Desktop\BCILAB-master\dependencies\unlocbox-1.1.70...
UnLocBoX version 1.1.70. Copyright 2012-2013 LTS2-EPFL, by Nathanael Perraudin
Loading C:\Users\cesposito\Desktop\BCILAB-master\dependencies\mlunit-1.5.1\src...
mlUnit has found a built-in assert functions.
Trying to rename mlUnit assert.m...not found.
Warning: Function cummax has the same name as a MATLAB
builtin. We suggest you rename the function to avoid a
potential name conflict. 
> In path (line 109)
  In addpath (line 88)
  In env_load_dependencies>load_dependencies (line 165)
  In env_load_dependencies (line 78)
  In env_startup (line 224)
  In bcilab (line 115) 
Warning: Function cummax has the same name as a MATLAB
builtin. We suggest you rename the function to avoid a
potential name conflict. 
> In path (line 109)
  In addpath (line 88)
  In env_load_dependencies>load_dependencies (line 165)
  In env_load_dependencies (line 78)
  In env_startup (line 224)
  In bcilab (line 115) 
Warning: Function cummax has the same name as a MATLAB
builtin. We suggest you rename the function to avoid a
potential name conflict. 
> In hlp_trycompile (line 445)
  In env_load_dependencies>load_dependencies (line 158)
  In env_load_dependencies (line 78)
  In env_startup (line 224)
  In bcilab (line 115) 
Warning: Function cummax has the same name as a MATLAB
builtin. We suggest you rename the function to avoid a
potential name conflict. 
> In hlp_trycompile (line 523)
  In env_load_dependencies>load_dependencies (line 158)
  In env_load_dependencies (line 78)
  In env_startup (line 224)
  In bcilab (line 115) 
Compiling the function/class cummax...failed.
Please make sure that you have a supported compiler and that your build environment is set up correctly.
Also, please consider reporting this issue.

In case you need to use a better / fully supported compiler, please have a look at:
  http://www.google.com/search?q=matlab+supported+compilers+2017a

On 64-bit Windows, MATLAB comes with no built-in compiler, so you need to have one installed.
A good choice is the free Microsoft Visual Studio 2005/2008/2010 Express compiler suite
together with the Microsoft Platform SDK (6.1 for 2008, 7.1 for 2010) for your Windows Version.
See also: http://argus-home.coas.oregonstate.edu/forums/development/core-software-development/compiling-64-bit-mex-files
          http://www.mathworks.com/support/compilers/R2010b/win64.html
The installation is easier if a professional Intel or Microsoft compiler is used.
Loading C:\Users\cesposito\Desktop\BCILAB-master\dependencies\eeglab_10_0_1_0x...
eeglab: options file is C:\Users\cesposito\Desktop\BCILAB-master\dependencies\eeglab_10_0_1_0x\functions\adminfunc\eeg_options.m
Warning: Function cummax has the same name as a MATLAB
builtin. We suggest you rename the function to avoid a
potential name conflict. 
> In path (line 109)
  In addpath (line 88)
  In eeglab (line 307)
  In run_script (line 123)
  In env_load_dependencies>runscript (line 225)
  In env_load_dependencies>load_dependencies (line 147)
  In env_load_dependencies (line 78)
  In env_startup (line 224)
  In bcilab (line 115) 
Warning: Function cummax has the same name as a MATLAB
builtin. We suggest you rename the function to avoid a
potential name conflict. 
> In path (line 109)
  In addpath (line 88)
  In eeglab (line 307)
  In run_script (line 123)
  In env_load_dependencies>runscript (line 225)
  In env_load_dependencies>load_dependencies (line 147)
  In env_load_dependencies (line 78)
  In env_startup (line 224)
  In bcilab (line 115) 
Error running dependency loader C:\Users\cesposito\Desktop\BCILAB-master\dependencies\eeglab_10_0_1_0x\env_exec.m; reason: supergui error: argument 'fig' must be numeric
The dependency will likely not be fully operational.
Loading C:\Users\cesposito\Desktop\BCILAB-master\dependencies\cvx-1.21.b795...
 
Testing the cvx distribution. If this script aborts with
an error, please report the error to the authors.
-------------------------------------------------------------
No errors! cvx has been successfully installed.
 
NOTE: The MATLAB path has been updated to point to the cvx distribution.
In order to use cvx regularly, you must save this new path definition.
To accomplish this, add these lines to your startup.m file:
    addpath c:\users\cesposito\desktop\bcilab-master\dependencies\cvx-1.21.b795
    addpath c:\users\cesposito\desktop\bcilab-master\dependencies\cvx-1.21.b795\structures
    addpath c:\users\cesposito\desktop\bcilab-master\dependencies\cvx-1.21.b795\lib
    addpath c:\users\cesposito\desktop\bcilab-master\dependencies\cvx-1.21.b795\functions
    addpath c:\users\cesposito\desktop\bcilab-master\dependencies\cvx-1.21.b795\commands
    addpath c:\users\cesposito\desktop\bcilab-master\dependencies\cvx-1.21.b795\builtins
Consult the MATLAB documentation if necessary.
 
There were compiling problems for the dependencies in:
  C:\Users\cesposito\Desktop\BCILAB-master\dependencies\mexutils-2013-11-11

This means that the affected features of BCILAB will be disabled.
These issues are usually resolved by installing a (free) Microsoft Visual Studio Express version that is between five years to a half year older than your MATLAB release.
If you install a new compiler, you might have to type "mex -setup" in the MATLAB command line, before MATLAB recognizes it.
Should BCILAB try to recompile in the future (or skip recompilation if not)? [y/n]n
BCILAB will add/update a file called C:\Users\cesposito\.bcilab\bcilab-dont-compile which contains the names of computers on which you chose to disable compilation.

Warning: Function cummax has the same name as a MATLAB
builtin. We suggest you rename the function to avoid a
potential name conflict. 
> In path (line 109)
  In addpath (line 88)
  In env_load_dependencies (line 118)
  In env_startup (line 224)
  In bcilab (line 115) 
Warning: Function cummax has the same name as a MATLAB
builtin. We suggest you rename the function to avoid a
potential name conflict. 
> In path (line 109)
  In addpath (line 88)
  In env_load_dependencies (line 118)
  In env_startup (line 224)
  In bcilab (line 115) 

code is in C:\Users\cesposito\Desktop\BCILAB-master\code
data is in C:\Users\cesposito\Desktop\BCILAB-master\userdata
results are in C:\Users\cesposito\Desktop\BCILAB-master\userdata
cache is disabled
temp is in C:\Users\cesposito\Desktop\BCILAB-master-temp

 Welcome to the BCILAB toolbox on 4310L-132464-W!

[OSX] Cannot compile dependencies; Cannot receive lsl stream.

OSX: 10.12.4
Matlab: R2015b (8.6.0.267246) 64-bit (maci64)
Output of xcode-select -p: /Applications/Xcode.app/Contents/Developer
xcode version: 8.2.1
Also just installed Matlab Runtime Environment, in case that's relevant.

Hi, I am a new user trying to receive an lsl stream from OpenBCI. I'd like to get BCILAB up and running ASAP so any help would be much appreciated. I'm also pretty new to Matlab in general, so I may have bloated this issue with a lot of unnecessary info.

Problems I face:

  1. hlp_trycompile fails on every dependency making BCILAB unusable (which is why I included xcode info)
  2. lsl hangs on the query

All the versions I tried:

Output/Results from each attempt

1.1 release

Runs without any printed errors.

...Until an attempt to read from lsl:

Error using supergui (line 122)
supergui error: argument 'fig' must be numeric

Error in inputgui (line 161)
            [tmp tmp2 allobj] = supergui( 'fig',
            fig, 'minwidth', 200, 'geomhoriz',
            g.geometry, 'uilist', g.uilist,
            'geomvert', [g.geomvert(:)' 1 1] );

Error in arg_guidialog (line 188)
[outs,dummy,okpressed] =
inputgui('geometry',geometry,
'uilist',uilist,'helpcom',['env_doc ' helptopic],
'title',dialogtitle,'geomvert',geomvert);
%#ok<ASGLU>
 
Error while evaluating Menu Callback

The above is described already in other issues but I am including it here just in case it is relevant.

current master branch

mlUnit has found a built-in assert functions.
Trying to rename mlUnit assert.m...not found.
Warning: Function cummax has the same name as a
MATLAB builtin. We suggest you rename the function
to avoid a potential name conflict. 
> In path (line 109)
  In addpath (line 88)
  In env_load_dependencies>load_dependencies (line 165)
  In env_load_dependencies (line 78)
  In env_startup (line 224)
  In bcilab (line 115) 
Compiling the function/class arraydeal...failed.
Compiling the function/class chopdeal...

this goes on for a long time, and every compile fails and when finally done BCILAB does not work. If more details will help here, I can attempt to wait for this whole thing again and take more notes, it just takes a very long time.

current devel branch

hangs on Looking for a device with Name='OpenBCI_EEG' ... and becomes unresponsive as described in this issue

current devel branch with lsl from 1.1

No change from before. Hangs on looking for a device just like the main devel branch despite it working for @iwalkdaline

current devel branch with haniawni's fix

This one I was the most hopeful for, but ran into compiler problems again:

UnLocBoX version 1.1.70. Copyright 2012-2013 LTS2-EPFL, by Nathanael Perraudin
Compiling the function/class lsl_append_child...failed.
Compiling the function/class lsl_append_child_value...

And so on...

Like before. Every compile fails, the whole thing takes forever, and BCILAB doesn't work in the end. Again if anyone wants me to go through the whole thing again and get more details I can do that.

I didn't include more details on the compiler fails because they take a very long time. I think one of them took an hour, but I forgot which one.

optimizing on nested cross-validation (CV)

Although i can train models using chronological CV (using commands, 'chron', 6, 2), I keep receiving an error if i try using nested cross-validation for either evaluating and/or optimizing my models. The input data was formatted in EEGLAB, so i'm not sure why the indexing may be causing issues. The parameter commands I've specified include: ('subchron', 2, 6, 0) OR ('subchron', 2, 6, 2).

Any insight would be appreciated. Thanks!

The value assigned to idxset in set_partition must be a row vector, but was: [1;2;3;4;5;6;7;8;9;10;11;12;13;14;85;86;87;88;89;90;91;92;93;94;95;96;97;98].
occurred in:
check_shape: 42
check_value: 735
assign_value: 669
assign_nvps: 645
arg_define: 184
set_partition: 50
hlp_wrapresults: 52
exp_eval: 131
@(f,a,frame__f8)feval(f,a{:}): 0
hlp_scope: 53
exp_eval_optimized: 52
utl_resolve_streams: 87
utl_preprocess_bundle: 39
@(testset,model)args.predict_func(utl_preprocess_bundle(testset,model),model): 904
evaluate_internal: 68
cached_evaluate: 42
utl_evaluate_fold: 34
par_beginschedule: 166
par_schedule: 71
utl_crossval: 311
@(varargin)utl_crossval(nestedcv_opts{:},'args',varargin): 0
hlp_wrapresults: 52
par_beginschedule: 166
par_schedule: 71
utl_gridsearch: 149
utl_searchmodel: 172
hlp_getresult: 47
par_beginschedule: 166
run_computation: 932
@(f,a,frame__f7)feval(f,a{:}): 0
hlp_scope: 53
bci_train: 856
do_run: 75
utl_run_batchjob: 33
par_beginschedule: 166
par_schedule: 71
bci_batchtrain: 421

Invalid mex-file issue

Running BCILAB on r2014a, Windows 8.1.

When training a new model, Computation failed; error trace:
Invalid MEX-file 'C:\Users\grace\Documents\BCILAB-master\dependencies\mexutils-2013-11-11\build-Jordan\arraydeal.mexw64': The specified procedure could not be found.
occurred in:
flt_resample: 107
hlp_wrapresults: 51
exp_eval: 133
exp_beginfun: 419
flt_laplace: 45
hlp_wrapresults: 51
exp_eval: 133
exp_beginfun: 419
flt_fir: 111
hlp_wrapresults: 51
exp_eval: 133
exp_beginfun: 419
set_makepos: 60
hlp_wrapresults: 51
exp_eval: 133
make_func/@(f,a,frame__f2)feval(f,a{:}): 0
hlp_scope: 51
exp_eval_optimized: 48
ParadigmDataflowSimplified.calibrate_simple: 549
ParadigmBaseSimplified.calibrate: 183
bci_train/@(varargin)instance.calibrate(varargin{:}): 0
@(trainset,varargin)utl_complete_model(calibrate_func('collection',{trainset},varargin{:}),predict_func): 709
utl_searchmodel: 167
hlp_getresult: 47
par_beginschedule: 140
run_computation: 769
make_func/@(f,a,frame__f1)feval(f,a{:}): 0
hlp_scope: 51
bci_train: 737
pushbutton1_Callback: 156
gui_mainfcn: 95
gui_calibratemodel: 30
@(hObject,eventdata)gui_calibratemodel('pushbutton1_Callback',hObject,eventdata,guidata(hObject)): 0

Online processing function "onl_append" doesn't recognize my workspace variable

Hello,

I am using the devel branch 1.1 for online processing and started writing a script to read an eeg signal from lsl, and then store chunks of it on a new stream that I created.

when trying to store chunks of my data into the online stream, I get the following error message from the function 'onl_append'

onl_append error: The given Name argument must be a string that refers to a variable in the MATLAB workspace, but was: 'lsl'

Please note that my stream was previously defined like this:

onl_newstream('lsl','srate',200,'chanlocs',{'C3','Cz','C4'});

The weird part is that the variable lsl is indeed saved in the workspace, I can even run it on the command prompt... but still, "onl_append" refuses to recognize it as a variable...
any suggestions as to what migh be causing the failure to recognize my variable?

Many thanks,
Green

Toolbox not showing properly

Hi, I have been trying to get BCILAB setup on matlab 2016a and have been running into an issue where after running the bcilab command it looks like everything is working fine with no errors in matlab, but the gui isn't showing. I can see it in my taskbar, but I can't bring it up or interact with it in any way.

This is on a fresh matlab 2016a install and using the development branch for BCILAB (I have also tried it on master).

It sounds like this issue is similar to what is reported by http://openbci.com/forum/index.php?p=/discussion/413/bcilab-toolbox-not-visible

Inspecting BCILAB userdata imag_movements2 and running CSP calibration

So I'm following Christian Kothe's videos on youtube as I do this. I'm trying to use CSP to create a model and perform feature extraction. Whenever I'm at the calibrate a model window, after specifying the approach and using the default parameters, I click on inspect data and get the following error: Link

After that, I pressed OK and tried the calibration but received another error: Link

I have a few other questions about this data set in general as I can't seem to find the details of these anywhere. Please excuse my lack of experience with BCI in general as this is my first real project with this.

  1. What do the different sessions of the data mean? There are sessions1, 2, 3, and 4.
  2. Is this a left or right handed movement? Basically, what was the paradigm exactly? The person waited a few seconds, a trigger was sent, and then the person moved their hand within a time window?
  3. Should I be using the default parameters after choosing CSP?
  4. How can we output the results of BCILAB into another matlab function? Should we just get the classification results from the lastmodel variable, if that's where the results are stored?
  5. I'm trying to do asynchronous cursor control with an OpenBCI headset the my design group made. Below are the steps I'm planning on taking in BCILAB to do this.

First I want to be able to do this offline, not asynchronous.

  • Once I am able to do CSP successfully with the provided user tutorial data, I will import one of the text files created using the OpenBCI GUI recording (with the external trigger input to the cap to record markers)
  • Then I will create a new approach, choose CSP. The question I have here is what parameters should I be using, or at least, how do I determine them. Specifically, I'm referring to this: Link
  • After that, I will train the model on the recorded data from the cap
  • Then I will test the model with other recordings by going to 'apply model to data'
  • Finally I will take the classification results from the lastmodel variable and use them in a custom GUI for cursor control in Matlab

Second, attempting to do asynchronous

  • Stream the time series data into Matlab via LSL (I can do this now). I'll go to online analysis-->read input from-->lab streaming layer. The data seems to come in batches.
  • Then I will define a new approach, CSP with LDA again, choose the correct parameters
  • Take the classification results and use them in a custom GUI made in matlab for cursor movement control

Is the general idea/process for these above steps I'm taking correct?

Any help would be much appreciated!

Error using supergui (line 122)

Hi,

I am using MATLAB R2017a and BCILAB version 1.1-beta (the only version I found) and when following the tutorial https://www.youtube.com/watch?v=Sup2SaJyFQE I get stuck when choosing the BCILAB paradigm.
The following error appears:

Error using supergui (line 122)
supergui error: argument 'fig' must be numeric

Error in inputgui (line 161)
[tmp tmp2 allobj] = supergui( 'fig', fig, 'minwidth', 200, 'geomhoriz', g.geometry, 'uilist', g.uilist, 'geomvert',
[g.geomvert(:)' 1 1] );

Error in arg_guidialog (line 188)
[outs,dummy,okpressed] = inputgui('geometry',geometry, 'uilist',uilist,'helpcom',['env_doc ' helptopic],
'title',dialogtitle,'geomvert',geomvert); %#ok

Error in gui_configapproach (line 38)
result = arg_guidialog(calibrate_func,'params',approach.parameters,'title','BCILAB: Configure approach','Invoke',false);

Error in gui_newapproach>gui_newapproach_OutputFcn (line 65)
[varargout{1:2}] = gui_configapproach(varargout{1},true);

Error in gui_mainfcn (line 264)
feval(gui_State.gui_OutputFcn, gui_hFigure, [], gui_Handles);

Error in gui_newapproach (line 28)
gui_mainfcn(gui_State, varargin{:});

Error while evaluating Menu Callback.

Any idea how to solve this issue?
Thanks

Devel: BCILab hangs on reading data from LSL stream

When using the devel branch of BCILab (1.4-devel) with Matlab 2015b on MacOSx 10.11.5, BCILab boots without issue, and menus can be browsed/etc.
When selecting Online Analysis -> Read input from... -> Lab streaming layer..., the window run_readlsl() opens, and the user can specify stuff to connect to/parameters just fine.

However, once the user selects "ok", BCILab simply prints "Looking for a device with type='EEG' ..." and fails to actually do anything. Attempting to use the BCILAB window then results in erroneous behavior, with menus highlighting but failing to open and buttons not actually doing anything.
When the user sends a keyboard interrupt in the Matlab command window, all the user's button presses go through in sequence, implying the attempt to find the LSL stream is hanging.

I'm demoing this on a single machine, running both LSL's SendData.py (which sends random 8-channel data with stream name="BioSemi" and type="EEG") and Matlab/BCILAB. Note that SendData.py is working, because I can concurrently run LSL's ReceiveData.py and print it.

Any idea what the problem is?

BCILab error after updating EEGLAB version in dependencies folder

I am using Matlab Version R2015b and installed BCILAB (downloaded from Github). Initially, it gave warnings for supergui and eegoptions which was resolved after I added the new version of eeglab in the dependencies folder. After that it gives following error when I try to modify approach.

**Using deprecated argument "flag_quantile/FlaggedQuantile" in function flt_clean_windows (help: Legacy parameter for pre-2012 methods. Quantile of data windows flagged for removal. Windows are emoved if flagged in all except for some possibly bad channels, controls the aggressiveness of the rejection.).
Cannot query arguments of function flt_ica (likely an issue with the argument definition): Undefined function 'fastif' for input arguments of type 'char'.
Cannot query arguments of function flt_siftpipeline (likely an issue with the argument definition): Undefined function or variable 'hlp_getModelingApproaches'.
Cannot query arguments of function flt_zscore (likely an issue with the argument definition): Function hlp_expWinMovVar does not exist.
Reference to non-existent field 'flt_ica'.

Error in flt_pipeline>order_filters (line 597)
preferences{end+1} = [remap.(flt.properties.follows{j}),i]; end

Error in hlp_microcache (line 233)
[varargout{1:nargout}] = f(varargin{:});

Error in flt_pipeline (line 324)
[ordering,unlinked] =
hlp_microcache('ordering',@order_filters,struct('name',{allflt.name},'properties',{allflt.properties}),custom_order);

Error in arg_report (line 99)
exp_eval(func(args{:},'arg_report',type));

Error in arg_define>assign_value (line 669)
spec.children = arg_report(report_type,spec.sources{pos},[value skip_arg]);

Error in arg_define>expand_spec (line 450)
spec(s) = assign_value(spec(s),def{1},report_type,caller_name,false,false,false); end

Error in arg_define>process_spec (line 394)
spec = expand_spec(compressed_spec,'rich',assign_defaults,caller_name);

Error in hlp_microcache (line 233)
[varargout{1:nargout}] = f(varargin{:});

Error in arg_define>process_spec_cached (line 384)
[varargout{1:nargout}] = hlp_microcache('spec',@process_spec,spec,report_type,assign_defaults,perform_namecheck);

Error in arg_define (line 176)
[spec,flat_names,first_names,name2idx,leading_skippable,checks] =
process_spec_cached(caller_name,compressed_spec,report_type,~nodefaults,nargout==0);

Error in ParadigmDataflowSimplified/calibrate_simple (line 535)
args = arg_define(varargin, ...

Error in ParadigmBaseSimplified/calibrate (line 183)
model = self.calibrate_simple('signal',signal,varargin{:});

Error in gui_configapproach>@(varargin)instance.calibrate(varargin{:})

Error in arg_report (line 101)
func(args{:},'arg_report',type);

Error in arg_guidialog (line 105)
rawspec = arg_report('rich', func, params); %#ok<*NODEF>

Error in gui_configapproach (line 37)
result = arg_guidialog(calibrate_func,'params',approach.parameters,'title','BCILAB: Configure approach','Invoke',false);

Error in gui_newapproach>gui_newapproach_OutputFcn (line 65)
[varargout{1:2}] = gui_configapproach(varargout{1},true);

Error in gui_mainfcn (line 264)
feval(gui_State.gui_OutputFcn, gui_hFigure, [], gui_Handles);

Error in gui_newapproach (line 28)
gui_mainfcn(gui_State, varargin{:});

Error while evaluating PushTool ClickedCallback

Undefined function or variable 'errordlg2'.

Error in gui_chooseapproach>gui_chooseapproach_OpeningFcn (line 96)
errordlg2('You first need to create an approach before you can operate on it.');

Error in gui_mainfcn (line 220)
feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});

Error in gui_chooseapproach (line 40)
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});

Error in gui_configapproach (line 19)
approach = gui_chooseapproach();

Error while evaluating PushTool ClickedCallback**

Error during model calibration..: undefined variable "signal" or class "signal.data"

Am new to bcilab and m using bcilab 1.4 development
Am trying to train a new model using SIFT paradigm.
Then I get the warnings....

  1. The data set did not contain matching Target markers
  2. The signal contains 99 events with out-of-bounds latencies...
    Please help me solve this issue .. ASAP..
    M going to submit this in the next 13 hours
    Thanks..

Undefined function or variable 'hFig'.

I am using BCILAB-devel-1.4 version. it has only one problem. it gives an error of undefined function or variable 'hFig' . below is given error
Error in vis_artifacts/on_resize (line 299)
wPos = get(hFig,'Position');

Virus on BCILAB?

Hello,

I installed BCILAB on my computer, however, later my virus scanner found a virus "Win.Trojan.Agent-1864973" from BCILAB folder.

screen shot 2018-01-22 at 4 47 10 pm

screen shot 2018-01-25 at 5 19 07 pm

Weighting of variance for SMSE calculation (population vs. sample)

% I recently identified an issue with the formulation of SMSE currently in
% BCILAB, especially for small samples.

% SMSE normalizes the MSE by the variance of the (real-valued) targets.
% This standardizes the degree of error across experiments which may use
% targets of different magnitudes. Additionally, SMSE should equal 1 if
% each 'prediction' is merely the mean of the target vector.

% The default formulation of variance within MATLAB estimates population variance from the
% provided sample, normalizing the sum of squared deviations from the mean
% by (n - 1). This has the effect of biasing the variance estimate upward,
% relative to the variance of the sample alone. This effectively lowers SMSE.
% This is especially an issue for small sample sizes. Below is an example,
% of both the existing and corrected formulation of variance (in which the sum of squared
% deviations of the mean are instead normalized by n). For a vector of 1000 chance
% predictions, the old and new formulations equal .999 and 1, respectively,
% as the sample and population variances converge as sample size increases.
% However, for a vector of only 2 chance predictions, old and new equal .5
% and 1, respectively.

% I will also submit a pull request shortly, referencing the issue.
% I apologize for not noticing this earlier, as I believe the current
% formulation of SMSE is something I had submitted.

% SMSE example:

% where:
% Tx = vector of real valued targets
% Px = vector of real valued predictions

% use 1000 samples, always 'predicting' the mean of the target vector
n = 1000;
Tx = rand(1, n);
Px = repmat(mean(Tx), [1 n]);

smse_1000_samples = mean((Px-Tx).^2) ./ var(Tx);

% smse = .999

% as previous, but with only two samples
n = 2;
Tx = rand(1, n);
Px = repmat(mean(Tx), [1 n]);

smse_2_samples = mean((Px-Tx).^2) ./ var(Tx);

% smse = .5! The variance formulation of course makes a huge difference
% with only 2 samples.

% SMSE with target variance normalized by the number of samples, not number
% of samples - 1. Variance estimate here is equivalent to MATLAB built in
% var with second argument of 1 ( var(Tx, 1) ).

smse_1000_samples_new = mean((Px-Tx).^2) ./ mean((Tx - mean(Tx)).^2);

% new smse = 1

% the same with only 2 samples
n = 2;
Tx = rand(1, n);
Px = repmat(mean(Tx), [1 n]);

smse_2_samples_new = mean((Px-Tx).^2) ./ mean((Tx - mean(Tx)).^2);

% new smse = 1

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.