Questions about the focus widget
Dear OpenBCI team,
I know that the focus widget is currently deprecated in the new version of openbci gui software but I downloaded the older version and used it for a university project,
The thing is, I think it was deprecated to have better accuracy about "focus" detection, but for our project we don't really care about the status of being "focused" and if the person is focused for real or not, we just want high alpha and low beta to be detected and then trigger an output , anyways we did it but we need some clarifications about the focus widget ,
1 -- Why is the threshold put to 0.7 (as in the photo attached) ? it was automatically like that, we can change it though, but I have read the post : https://openbci.com/community/focus-visualization-widget/ about the creation of focus widget and apparently the creator tested it on 20 people and finalized it as :
"Focus == (alpha_average > 1.0uV) && (beta_average < 1.0 uV) && (alpha_average < 4 uV)"
So I'm not sure what is the correct threshold for detecting high alpha and low beta when a person close her or his eyes and try to breath and relax.
2-- How much reliable it is in terms of detecting high alpha and low beta,
Again, we do not mean the quality of "detecting if the person is focusing", we only mean if it detects alpha and beta randomly in any condition, Can we depend on it in detecting high alpha and low beta for our project? or should we mention that this as well is in need of further improvments?
Anyone with knowledge about this can reply,
Thank you
Shaima
Comments
Shaima, hi.
Please see this related thread,
https://openbci.com/forum/index.php?p=/discussion/2418/gui-focus-widget-algorithm-question
Also see the 'Google Advanced Search' button in the upper right corner. For example:
https://www.google.com/search?as_q=focus+widget&as_sitesearch=openbci.com
Regards, William
Dear William,
Thank you very much I will go through it
Shaima
https://github.com/OpenBCI/OpenBCI_GUI/pull/961
New Focus widget coming in the next version of the GUI!!!
Richard, have you tested the new widget? How does it perform? If it uses ML (machine learning), is there any training involved? Or does the ML configuration work for all individuals?
https://brainflow.readthedocs.io/en/stable/UserAPI.html?highlight=mlmodel#brainflow-ml-model
https://brainflow.readthedocs.io/en/stable/Examples.html#python-eeg-metrics
Is the 'concentration' metric listed there, the same as 'focus'?
William
I guess this is the ML training module,
https://github.com/brainflow-dev/brainflow/blob/master/src/ml/train/focus_classifiers.py
After deploying the new widget, we will be looking to improve the models for the BrainFlow metrics. I think some OpenBCI team members may be working on this already.
There will be two metrics: "Relaxation"(usually achieved with eyes closed) and "Concentration", which both fall under the umbrella of "Focus".
@Andrey1994 Can you share a brief description of the current state of these metrics?
Concentration metrics there means focus in fact. Relaxation metric is determined as 1.0 - concentration(most of the time at least).
There is no training phase, predefined coefficients are used.
Python script which you mentioned performs training and stores needed weights in files which are used by inference stage from C++ code(only inference API exposed from brainflow). For example this file is generated by python script https://github.com/brainflow-dev/brainflow/blob/master/src/ml/generated/regression_model.cpp
And here is how its used https://github.com/brainflow-dev/brainflow/blob/master/src/ml/concentration_regression_classifier.cpp in cpp code
User of these classifiers can select channels he\she wants to use and configure time window
@Andrey1994, thanks.
Does it not seem likely, that the accuracy of this 'concentration' scoring, will be hugely dependent on the number of electrodes and their locations? So many possibilities. Or are you saying the settings of these weights will be constrained by instructing the user to pick (say) 4 specific electrode sites? The channel mapping to sites will also need to be exactly matching.
Regards, William
Yes, accuracy will depend on channels used. Roughly speaking channels used affect avg/stddev of band powers. Models trained on band powers.
In brainflow itself its up to the user to find the best combination of electrodes. In GUI we can hardcode one combination or write instructions how to pick them