Skip to content

This project presents a separate study from the Ladybird software, focusing on the results of varying class weights (FR vs non-FR) during CNN training. Note: FR = Fast Ripple, a pathological brain oscillation in epilepsy.

Notifications You must be signed in to change notification settings

LudovicGardy/ladybird_CNN_weights

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ladybird Neural Network - Impact of Class Weights

📄 Description

This repository showcases a component of Ladybird that is focused on the efficient automatic detection of Fast Ripples (FR) in epilepsy. Depending on the amount of data to be analyzed, it may be interesting to vary the performance of the model, by varying the ratio between omissions and false positives. The more time we have to process the results, the less we will be constrained on false positives. The reduction of false positives generally goes hand in hand with a reduction of omissions. Conversely, the less time user has, the less time he will accept to sort out false positives, often at the cost of an increase in the number of omissions.

In a training set, the data of class 1 (e.g. FR) and class 2 (e.g. non-FR) can be balanced or not. In the reality of an EEG recording, the proportion of non-FR signal is obviously largely dominant. To account for this phenomenon, we trained several models by assigning an increasingly strong weight to the non-FR class.

As shown in data tables in this repository (main/markers_spike), false positives are almost always found on the same recording channels (GPH'2), as if they carry high frequencies that impact the detection, without this effect being caused by the spikes directly. Indeed, identical spikes on other recording channels are not detected.

⚒️ Installation

Prerequisites

  • Python 3.11
  • Python libraries
    pip install -r requirements.txt

📝 Usage

Detailed analysis can be accessed and performed from main.ipynb.

Input data

  • markers_FR: Fast Ripples detected in the EEG [1] [5]
  • markers_spike: Epileptic Spikes detected in the EEG [1] [5]

Results

CNN performance on Fast Ripples

The model was evaluated on open source data [see ref. 1] containing 5760 Fast Ripples at different signal to noise ratios: 0, 5, 10 and 15 dB (1440 events per category).

CNN performance on non-FRs

The model was evaluated on open source data [see ref. 1] containing 5760 Spikes (non-FR) at different signal to noise ratios: 0, 5, 10 and 15 dB (1440 events per category).

📚 References

[1] Roehri, N., Pizzo, F., Bartolomei, F., Wendling, F., & Bénar, C. G. (2017a). What are the assets and weaknesses of HFO detectors? A benchmark framework based on realistic simulations. PLoS ONE, 12(4). https://doi.org/10.1371/journal.pone.0174702

[2] Cohen M.X. Analyzing Neural Time Series Data: Theory and Practice, Cambridge, MA, USA:MIT Press, 2014.

[3] Roehri, N., & G, B. C. (2017b). A New Hope for HFO representation: the ZH0 time-frequency normalization Modeling variability of brain electrical activity View project Characterizing and modeling the neurovascular coupling for interictal spikes View project A New Hope for HFO representation: the ZH0 time-frequency normalization. Journal of Neuroscience Methods, 130(9), 118–126. https://doi.org/10.13140/RG.2.2.19375.74406

[4] Roehri, N., Lina, J.-M., Mosher, J. C., Bartolomei, F., and Benar, C.-G. (2016). Time-frequency strategies for increasing high-frequency oscillation detectability in intracerebral eeg. IEEE Transactions on Biomedical Engineering, 63(12):2595–2606. https://doi.org/10.1109/TBME.2016.2556425

[5] Gardy L., Barbeau E.J., Hurter C. Automatic Detection of Epileptic Spikes in Intracerebral EEG with Convolutional Kernel Density Estimation. Proceedings of the 15th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications - Volume 2 : HUCAPP, pages 101-109, 2020. https://doi.org/10.5220/0008877601010109

About Ladybird

Ladybird, developed during L. Gardy's doctoral research under the guidance of E. Barbeau (neuroscientist, CNRS) and C. Hurter (engineer, ENAC), is a sophisticated software designed for the automatic detection of fast-ripples (FRs) in epilepsy. Originally developed by L. Gardy, with significant input from various researchers and medical professionals the early trials in the neurology department at Toulouse Hospital, along with support from various academic and economic entities, led to widespread enthusiasm and substantial funding, allowing for further development and eventual patenting (Brevet: FR3128111). Ladybird was later rebranded as Halyzia©, a name change necessitated for trademark reasons, and is now being further developed and commercialized by the French startup Avrio MedTech.

Image 1 Image 2
Image 3 Image 4
Image 5 Image 6

👤 Author

About

This project presents a separate study from the Ladybird software, focusing on the results of varying class weights (FR vs non-FR) during CNN training. Note: FR = Fast Ripple, a pathological brain oscillation in epilepsy.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published