Classifier Trainer - Linear Discriminant Analysis (LDA) - ERROR: Plugin code causing crash

About the GUI application to design signal processing pipelines
Post Reply
KevMat
Posts: 6
Joined: Sat Apr 04, 2020 11:01 pm

Classifier Trainer - Linear Discriminant Analysis (LDA) - ERROR: Plugin code causing crash

Post by KevMat »

Hi OpenViBE forum,

I concatenated two files into one using the Signal Concatenation Box. I also made sure to have one marker in the last file for the Classifier Trainer to initiate the training.

when I load the concatenated file into the mi-csp-3-classifier-trainer.xml scenario, the messaging box shows a lot of 'error' texts once the k-fold test is initiated. Please see the text below. Unforunately, I'm still new to OpenViBE and I don't understand what is causing the error :(

Any help to start moving in the right direction would be incredibly helpful! Thank you so much! - KevMat

[ INF ] At time 609.250 sec <Box algorithm::(0x0a5a6a4a, 0x1d92a778) aka Classifier trainer> Received train stimulation. Data dim is [1650x6]
[ INF ] At time 609.250 sec <Box algorithm::(0x0a5a6a4a, 0x1d92a778) aka Classifier trainer> For information, we have 825 feature vector(s) for input 1
[ INF ] At time 609.250 sec <Box algorithm::(0x0a5a6a4a, 0x1d92a778) aka Classifier trainer> For information, we have 825 feature vector(s) for input 2
[ INF ] At time 609.250 sec <Box algorithm::(0x0a5a6a4a, 0x1d92a778) aka Classifier trainer> Randomizing the feature vector set
[ INF ] At time 609.250 sec <Box algorithm::(0x0a5a6a4a, 0x1d92a778) aka Classifier trainer> k-fold test could take quite a long time, be patient
[ ERROR ] Plugin code caused crash 1 time(s)
[ ERROR ] [name:LDA Classifier]
[ ERROR] [class identifier:(0x2ba17a3c, 0x1bd46d84)]
[ ERROR ] [location:process callback]
[ ERROR ] <Algorithm::LDA Classifier> Classifier expected 0 features, got 6
...(repeated line of code removed)
[ INF ] At time 609.250 sec <Box algorithm::(0x0a5a6a4a, 0x1d92a778) aka Classifier trainer> Finished with partition 1 / 5 (performance : 49.697%)
[ ERROR ] Plugin code caused crash 2 time(s)
...(repeated line of code removed)
[ INF ] At time 609.250 sec <Box algorithm::(0x0a5a6a4a, 0x1d92a778) aka Classifier trainer> Finished with partition 2 / 5 (performance : 52.1212%)
[ ERROR ] Plugin code caused crash 3 time(s)
...(repeated line of code removed)
[ INF ] At time 609.250 sec <Box algorithm::(0x0a5a6a4a, 0x1d92a778) aka Classifier trainer> Finished with partition 3 / 5 (performance : 50.6061%)
[ ERROR] Plugin code caused crash 4 time(s)
...(repeated line of code removed)
[ INF ] At time 609.250 sec <Box algorithm::(0x0a5a6a4a, 0x1d92a778) aka Classifier trainer> Finished with partition 4 / 5 (performance : 48.1818%)
[ ERROR ] Plugin code caused crash 5 time(s)
...(repeated line of code removed)
[ ERROR ] At time 609.250 sec <Box algorithm::(0x0a5a6a4a, 0x1d92a778) aka Classifier trainer> Training failed.
[ ERROR ] At time 609.250 sec <Box algorithm::(0x0a5a6a4a, 0x1d92a778) aka Classifier trainer> Bailing out (from whole set training)...
[WARNING] Box algorithm <Classifier trainer> has been deactivated because process() function returned error

Thibaut
Posts: 264
Joined: Wed Oct 31, 2018 9:14 am

Re: Classifier Trainer - Linear Discriminant Analysis (LDA) - ERROR: Plugin code causing crash

Post by Thibaut »

Hi, I have never seen this error. In case of, you use wich version of openvibe ? And a release or a personnal build Version.
Can you attach a folder with your scenario, scripts and data used.
All I can say is during the train, he test the classifier. I think, each time he try to train he cause crash, next, he test and say the error that the discriment function return a weight with a size of 0 instead of 6.
Can you click on trace button in log part to have more message.
Thibaut

KevMat
Posts: 6
Joined: Sat Apr 04, 2020 11:01 pm

Re: Classifier Trainer - Linear Discriminant Analysis (LDA) - ERROR: Plugin code causing crash

Post by KevMat »

Hi Thibaut,

Thank you for looking into this!
I concatenate two trials into one data file (.gdf file format)
Both trial 1 and 2 are epoched and performed ICA (Independent Component Analysis) before combined, using EEGLAB.
I tried concatenate the two trials into one data file unedited but openvibe freezes :cry:

Version of OpenviBE: v1.2.2

mi-csp-2-train-CSP_KevMat.xml
  • Data Used for GDF File Reader: BRYAN-NO-SQUEEZE-micsp-trial 1 and 2 merged datasets - epochs pruned with ICA 769 770 only.gdf
Data Info:
**Headset: Customed EasyCap Emotiv+ headset
**Channels per frame: 14
**Frames per epoch: 640
**Epochs: 50
**Events: 50
**Sampling Rate (Hz): 128
**Epoch start (sec): -1.000
**Epoch End (sec): 3.992
**Reference: Nz
**Channel locations: Yes

I set the 'CSP Spatial Filter Trainer' Box to OVTK_StimulationID_EndOfFile train trigger. Filter is successfully trained

mi-csp-3-classifier-trainer_KevMat.xml
  • Data Used for GDF File Reader: BRYAN-NO-SQUEEZE-micsp-trial12-merged_EPOCH.gdf
  • Used trained csp filter in scenario 2
Data Info:
**same data, except no ICA performed
**No additional filtering

I set the 'Classifier trainer' to OVTK_StimulationID_EndOfFile and run scenario. This is when the LDA classifier fails.

Maybe it's because I am using different files for the GDF file reader? How can I combine two data trials combined successfully?

Best,
KevMat
Attachments
Classifier Trainer - Linear Discriminant Analysis (LDA) - ERROR Plugin Code Causing Crash.zip
(12.65 KiB) Downloaded 144 times

KevMat
Posts: 6
Joined: Sat Apr 04, 2020 11:01 pm

Re: Classifier Trainer - Linear Discriminant Analysis (LDA) - ERROR: Plugin code causing crash

Post by KevMat »

Also, how can I upload the data (.gdf) to this post? and, where's the trace button in the log part?

Thank you again!

Kevin Matsuno

Thibaut
Posts: 264
Joined: Wed Oct 31, 2018 9:14 am

Re: Classifier Trainer - Linear Discriminant Analysis (LDA) - ERROR: Plugin code causing crash

Post by Thibaut »

HI, For the trace button see image
Capture d’écran (132).png
Capture d’écran (132).png (80.23 KiB) Viewed 8625 times
.
For the GDF maybe with an other site to temporaly share and suppress after
Thibaut

Post Reply