Differences

This shows you the differences between two versions of the page.

Link to this comparison view

reference:ft_realtime_classification [2018/08/23 14:43] (current)
Line 1: Line 1:
 +=====  FT_REALTIME_CLASSIFICATION =====
 +
 +Note that this reference documentation is identical to the help that is displayed in MATLAB when you type "help ft_realtime_classification"​.
 +
 +<​html><​pre>​
 +  <a href=/​reference/​ft_realtime_classification><​font color=green>​FT_REALTIME_CLASSIFICATION</​font></​a>​ is an example realtime application for online
 +  classification of the data. It should work both for EEG and MEG.
 + 
 +  Use as
 +    ft_realtime_classification(cfg)
 +  with the following configuration options
 +    cfg.channel ​   = cell-array, see <a href=/​reference/​ft_channelselection><​font color=green>​FT_CHANNELSELECTION</​font></​a>​ (default = '​all'​)
 +    cfg.trialfun ​  = string with the trial function
 + 
 +  The source of the data is configured as
 +    cfg.dataset ​      = string
 +  or alternatively to obtain more low-level control as
 +    cfg.datafile ​     = string
 +    cfg.headerfile ​   = string
 +    cfg.eventfile ​    = string
 +    cfg.dataformat ​   = string, default is determined automatic
 +    cfg.headerformat ​ = string, default is determined automatic
 +    cfg.eventformat ​  = string, default is determined automatic
 + 
 +  This function works with two-class data that is timelocked to a trigger.
 +  Data selection is based on events that should be present in the
 +  datastream or datafile. The user should specify a trial function that
 +  selects pieces of data to be classified, or pieces of data on which the
 +  classifier has to be trained.The trialfun should return segments in a
 +  trial definition (see <a href=/​reference/​ft_definetrial><​font color=green>​FT_DEFINETRIAL</​font></​a>​). The 4th column of the trl matrix
 +  should contain the class label (number 1 or 2). The 5th colum of the trl
 +  matrix should contain a flag indicating whether it belongs to the test or
 +  to the training set (0 or 1 respectively).
 + 
 +  Example useage:
 +    cfg = [];
 +    cfg.dataset ​ = '​Subject01.ds';​
 +    cfg.trialfun = '​trialfun_Subject01';​
 +    ft_realtime_classification(cfg);​
 + 
 +  To stop the realtime function, you have to press Ctrl-C
 +</​pre></​html>​