<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Data-Tools | Maria Monzon</title><link>https://mariamonzon.github.io/tags/data-tools/</link><atom:link href="https://mariamonzon.github.io/tags/data-tools/index.xml" rel="self" type="application/rss+xml"/><description>Data-Tools</description><generator>HugoBlox Kit (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Tue, 01 Jul 2025 00:00:00 +0000</lastBuildDate><image><url>https://mariamonzon.github.io/media/icon_hu_a17d2bf575673c.png</url><title>Data-Tools</title><link>https://mariamonzon.github.io/tags/data-tools/</link></image><item><title>Lumbar Injection Satisfaction — Data-Driven Analysis</title><link>https://mariamonzon.github.io/projects/lbp-injection-outcome/</link><pubDate>Tue, 01 Jul 2025 00:00:00 +0000</pubDate><guid>https://mariamonzon.github.io/projects/lbp-injection-outcome/</guid><description>&lt;p&gt;Data-driven project that retrospectively identifies which chronic low-back-pain (CLBP) patients benefit from lumbar steroid injections, using the clinical, demographic and patient-reported data of the &lt;strong&gt;TREXI&lt;/strong&gt; study. The aim is to find key predictors of treatment satisfaction and to establish clinically meaningful pain-reduction thresholds.&lt;/p&gt;
&lt;h2 id="study-design"&gt;Study design&lt;/h2&gt;
&lt;p&gt;212 participants completed questionnaires directly before (T0) and two weeks after (T1) the injection, covering pain intensity, patient-reported outcomes (COMI, PSEQ), and demographic and clinical variables.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img alt="Study design — baseline and post-treatment data collection"
src="https://mariamonzon.github.io/projects/lbp-injection-outcome/study-design.svg"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h2 id="methodology"&gt;Methodology&lt;/h2&gt;
&lt;p&gt;Missing values were imputed with Random Forest (numeric) and K-Nearest-Neighbours (categorical); features were standardised or encoded by type. Nested cross-validation trained Random Forest, Logistic Regression and Gradient Boosting classifiers, with the best model optimised through Bayesian hyperparameter tuning. SHAP values interpreted the predictions and ROC analysis derived the pain-reduction thresholds.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img alt="Model development pipeline"
src="https://mariamonzon.github.io/projects/lbp-injection-outcome/model-development.svg"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h2 id="key-results"&gt;Key results&lt;/h2&gt;
&lt;p&gt;A Random Forest model reached &lt;strong&gt;0.865 average precision&lt;/strong&gt; in predicting treatment satisfaction. SHAP analysis identified &lt;strong&gt;pain self-efficacy&lt;/strong&gt; — coping mechanisms and maintained daily-activity performance — as the strongest predictors. A &lt;strong&gt;2.03-point&lt;/strong&gt; absolute (or &lt;strong&gt;30 %&lt;/strong&gt; relative) drop on the pain scale was found to be clinically meaningful.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img alt="Classification results"
src="https://mariamonzon.github.io/projects/lbp-injection-outcome/results.svg"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;Published in &lt;strong&gt;Scientific Reports (Nature)&lt;/strong&gt;, 2025. Supported by the PHRT Strategic Focus Area of the ETH Domain.&lt;/p&gt;</description></item><item><title>ORMIR-MIDS — Open Standard for Musculoskeletal Imaging Data</title><link>https://mariamonzon.github.io/projects/mids-converter/</link><pubDate>Thu, 01 Jun 2023 00:00:00 +0000</pubDate><guid>https://mariamonzon.github.io/projects/mids-converter/</guid><description>&lt;p&gt;Open-source contribution to the &lt;strong&gt;ORMIR&lt;/strong&gt; (Open and Reproducible Musculoskeletal Imaging Research) community: both a &lt;strong&gt;specification&lt;/strong&gt; and a &lt;strong&gt;Python package&lt;/strong&gt; that standardise the Medical Image Data Structure (MIDS) for musculoskeletal imaging, building directly on &lt;strong&gt;BIDS&lt;/strong&gt; (Brain Imaging Data Structure) and &lt;strong&gt;muscle-BIDS&lt;/strong&gt; and extending those ideas to the broader MSK domain.&lt;/p&gt;
&lt;h2 id="the-problem"&gt;The problem&lt;/h2&gt;
&lt;p&gt;Musculoskeletal imaging research suffers from a lack of standardized, machine-readable data organization. Raw clinical data typically arrives as DICOM, where acquisition metadata is scattered, inconsistently labeled, and difficult to query programmatically. This makes data sharing, multi-site collaboration, and reproducible analysis pipelines hard to build and maintain. ORMIR-MIDS addresses this by defining a common, open data structure so that musculoskeletal imaging datasets can be curated, shared, and reused consistently across the research community.&lt;/p&gt;
&lt;h2 id="approach"&gt;Approach&lt;/h2&gt;
&lt;p&gt;The package centres on converting source DICOM data into the standardized ORMIR-MIDS layout, and then providing tooling to work with that layout. Once data is converted, ORMIR-MIDS can be used as a Python module to &lt;strong&gt;find, load and interrogate&lt;/strong&gt; ORMIR-MIDS-format data. Because it inherits from the BIDS and muscle-BIDS philosophy, the standard emphasises a predictable on-disk organization with structured, self-describing metadata, making datasets easier to process automatically.&lt;/p&gt;
&lt;h2 id="key-features"&gt;Key features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;DICOM-to-ORMIR-MIDS conversion&lt;/strong&gt; from raw clinical imaging data into the standardized format.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Command-line interface&lt;/strong&gt; for batch processing, with built-in anonymization and recursive directory handling (e.g. &lt;code&gt;dcm2omids -anonymize &amp;lt;pseudo_name&amp;gt; -recursive &amp;lt;input_dir&amp;gt; &amp;lt;output_dir&amp;gt;&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Python API&lt;/strong&gt; (&lt;code&gt;import ormir_mids&lt;/code&gt;) to find, load and interrogate standardized data programmatically.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Anonymization / pseudonymization&lt;/strong&gt; during conversion — important for sharing clinical imaging data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Demo notebooks&lt;/strong&gt; illustrating usage, runnable locally or via Binder.&lt;/li&gt;
&lt;li&gt;Distributed on PyPI (&lt;code&gt;pip install ormir-mids&lt;/code&gt;), with a development install via the repository.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="status--citation"&gt;Status &amp;amp; citation&lt;/h2&gt;
&lt;p&gt;A community effort with multiple lead contributors under the broader ORMIR community; released under the &lt;strong&gt;Apache 2.0&lt;/strong&gt; license and intended for research purposes only (not a certified medical device). The work is described in the open-standard paper &lt;strong&gt;&amp;ldquo;ORMIR-MIDS: an open standard for curating and sharing musculoskeletal imaging data,&amp;rdquo;&lt;/strong&gt; &lt;em&gt;JBMR Plus&lt;/em&gt; 10(3), ziag013 (2026).&lt;/p&gt;</description></item><item><title>Biomarkers Voice Classifier App</title><link>https://mariamonzon.github.io/projects/voice-classifier-app/</link><pubDate>Wed, 15 Sep 2021 00:00:00 +0000</pubDate><guid>https://mariamonzon.github.io/projects/voice-classifier-app/</guid><description>&lt;p&gt;This project aim is to embeed a sound classification moden into simple android app for learning purposes. The model that classify 2-second audio samples is a small convolutional neural network.
Sound classification is a machine learning task where you input some sound to a machine learning model to categorize it into predefined categories such as singing and speech. There are already many applications of sound classification.&lt;/p&gt;
&lt;h2 id="dataset"&gt;&lt;strong&gt;Dataset&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;The first step to develop the model is to find a suitable dataset. For the siging database, the&lt;/p&gt;
&lt;p&gt;
developed at Sound and Music Computing Laboratory at National University of Singapore was used.
The corpus is a 169-min collection of audio recordings of the sung and spoken lyrics of 48 (20 unique) English songs by 12 subjects and a complete set of transcriptions and duration annotations at the phone-level for all recordings of sung lyrics, comprising 25,474 phone instances.&lt;/p&gt;
&lt;p&gt;The training datasetwas further pre-process by convert them to the WAV format and splitting them in 2 seconds window.&lt;/p&gt;
&lt;p&gt;
&lt;figure id="figure-comparison-of-spectrogram-of-a-spoken-lyrics-and-its-corresponding-singing-signal-for-the-sentence-i-believe-that-the-heart-does-go-on-adapted-from-1httpswwwsemanticscholarorgpapernus-hlt-spoken-lyrics-and-singing-sls-corpus-gao-sismanfdc6c08d687114efe37bf11175542f43890e62fa"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://mariamonzon.github.io/images/voice-classifier-app/dataset.png" alt="dataset" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
Comparison of spectrogram of a spoken lyrics and its corresponding singing signal for the sentence &amp;lsquo;I believe that the heart does go on&amp;rsquo; Adapted from
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;For the background samples, the dataset was complemented with the
. ESC-50 consist of a labeled collection of 2000 environmental audio recordings suitable for benchmarking methods of environmental sound classification. The dataset consists of 5-second-long recordings organized into 50 semantical classes (with 40 examples per class) loosely arranged into 5 major categories:&lt;/p&gt;
&lt;h2 id="model"&gt;&lt;strong&gt;Model&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;The proof-of-concept model is just a basic 1D CNN model.
The model receives a 1D time representation of sound. It first processes the time eries with successive layers of 2D convolution (Conv1D) bi-layers with ReLU activations.&lt;/p&gt;
&lt;p&gt;The model ends in a number of dense (fully-connected) layers, which are interleaved with dropout layers for the purpose of reducing overfitting during training. The final output of the model is an array of probability scores, one for each class of sound the model is trained to recognize. The model was trained on Google Collab to take advantage of free GPU. For the integration into the app, the trained model was deployed with TensorFlow Lite.&lt;/p&gt;
&lt;h2 id="app-deployment"&gt;&lt;strong&gt;App Deployment&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Android sample app was the starting point to design the custom app. It enables to acquire the microphone data for over 2 seconds when tiping the record button.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://mariamonzon.github.io/images/voice-classifier-app/app.png" alt="app-visualization" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h2 id="references"&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;
Gao, X., Sisman, B., Das, R., &amp;amp; Vijayan, K. (2018). NUS-HLT Spoken Lyrics and Singing (SLS) Corpus. 2018 International Conference on Orange Technologies (ICOT), 1-6.&lt;/p&gt;</description></item><item><title>Panoramic-based 3D Viewer</title><link>https://mariamonzon.github.io/projects/3d-viewer/</link><pubDate>Thu, 15 Jul 2021 00:00:00 +0000</pubDate><guid>https://mariamonzon.github.io/projects/3d-viewer/</guid><description>&lt;p&gt;Application designed to enable the computer science department of the Friedrich-Alexander University Erlangen-Nuremberg to display its 50 years computer science department exhibition online. This 3D Viewer web application can be easily accessed via
.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://mariamonzon.github.io/images/3d-viewer/example-viewer.png" alt="Visualization" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;The mission of the project was to deliver a web based viewer that allows users to display the
panoramas of the computer science department&amp;rsquo;s 50th anniversary on the web, without
having to pay extensive license costs for other commercial 3D viewers. Detailed
information at each booth should be delivered via third-party plugins, which operate on the
viewers API.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a web-based Viewer in order to display the exhibition from the 50th
anniversary of the CS department at FAU&lt;/li&gt;
&lt;li&gt;Users can rotate the view, zoom in/out, walk through rooms and change
floors&lt;/li&gt;
&lt;li&gt;an extensive API is provided such that third party plugins can be integrated&lt;/li&gt;
&lt;li&gt;A map is integrated in the bottom corner of the screen, such that the user
always has a feeling of where is currently standing inside the room&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://mariamonzon.github.io/images/3d-viewer/start-page.png" alt="Start-Page" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>Reach-and-Grasp EEG Decoder</title><link>https://mariamonzon.github.io/projects/eeg-grasp-decoder/</link><pubDate>Sat, 01 May 2021 00:00:00 +0000</pubDate><guid>https://mariamonzon.github.io/projects/eeg-grasp-decoder/</guid><description>&lt;p&gt;Decoding three different executed reach-and-grasp actions utilizing their electroencephalogram (EEG) recording from different electrodes is of crutial significance for the rehabilitation of hand functions of patients with motor disorders
.
Despite the high freedom of the human hand movements, most actions of daily life can be executed incorporating only palmar, lateral and grasp. Recent studies have already shown that neural correlates of natural reach-and-grasp actions can be identified in the EEG
.&lt;/p&gt;
&lt;p&gt;Deep Learning has recently achieved promising results in the field of Computer Vision and Biomedical Engineering. Therefore, this work aims to study the possibility of develop Deep learning based decoders to classify grasp actions based on EEG signals. We have also studied the possibility of developing intersubject classifiers and transfer learning between the different subject technologies. For this purpose, different neural network architectures have been tested, single trial vs crop trial performance has been evaluated as well as the different training techniques: within-subject and inter-subject training.&lt;/p&gt;
&lt;h3 id="1-eeg-introduction"&gt;1-EEG Introduction&lt;/h3&gt;
&lt;p&gt;The EEG is a cost-effective, non-invasive technique to examine brain activity linked to multiple neurocognitive processes that underlie human behavior. It consists of placing electrodes on the head to monitor the electrical activity produced when neurons fire. The EEG records and measures electrical signals of the human brain from multiple cortical areas. Therefore, EEG monitoring allows to quantify different types of brain waves, also known as neural oscillations.
The standard pipeline followed to extract information is depicted in the next figure:&lt;/p&gt;
&lt;p&gt;
&lt;figure id="figure-eeg-standard-decoding-pipeline-adapted-from-bitbrain-three-important-steps-when-processing-eeg-april-23-2020-httpswwwbitbraincomblogai-eeg-data-processing"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://mariamonzon.github.io/images/eeg-grasp-decoder/methods-eeg-decoding.png" alt="methods-eeg-decoding" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
EEG standard decoding pipeline. Adapted from Bitbrain. &amp;lsquo;Three important steps when processing EEG&amp;rsquo;, April 23, 2020,
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h3 id="2-dataset"&gt;2-Dataset&lt;/h3&gt;
&lt;p&gt;In a cue-guided experiment, 15 healthy individuals were asked to perform reach-and-grasp actions using daily life objects. The dataset is publicly available at
.
The pre-recorded dataset contains 7 min runs, leading to 80 trials per condition (TPC) distributed over 4 runs / 20 trials for each reach-and-grasp condition and from a no-movement condition.
The 45 right handed participants performed two self-initiated reach-and-grasp (palmar and lateral grasp) movement conditions.&lt;/p&gt;
&lt;p&gt;
&lt;figure id="figure-reach-and-grasp-movement-decoding-from-eeg-with-gel-water-and-dry-electrodes-dataset-experimental-set-up-2httpswwwfrontiersinorgarticles103389fnins202000849full"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://mariamonzon.github.io/images/eeg-grasp-decoder/grasp-dataset-definition.png" alt="grasp-task" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
Reach and Grasp movement decoding from EEG with gel, water and dry electrodes dataset experimental set-up
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Gel-based electrodes recordings. EEG was measured with 58 electrodes (frontal, central and parietal areas).&lt;/li&gt;
&lt;li&gt;Water-based electrodes recordings mobile and water-based electrodes EEG-Versatile™ system with 32 electrodes&lt;/li&gt;
&lt;li&gt;Dry-electrodes recordings measured using the dry-electrodes EEG-Hero™ headset. EEG was measured with 11 electrodes over the sensorimotor cortex.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="data-proprocesssing"&gt;Data Proprocesssing&lt;/h4&gt;
&lt;p&gt;The EEG data processsing was analogous to the one in
. All the modalities data were filtered with a zero-phase 4th order Butterworth filter with a cut-off frequency of 0.3 and resample to 128 Hz.
We defined a window of interest for each movement trial of [-2 3] s with respect to the movement onset at second 0.
In addition, we also extracted 81 rest trials from inactivity periods with a duration of 5 seconds.&lt;/p&gt;
&lt;h3 id="3-methods"&gt;3-Methods&lt;/h3&gt;
&lt;h4 id="vanilla-1d-network"&gt;Vanilla 1D Network&lt;/h4&gt;
&lt;p&gt;We aimed to design a single convolutional neural network (CNN) architecture to accurately classify grasp actions from differente EEG decoding modalitites, while being as compact and simple as possible. We try a simple vanilla 1D convolutional neural network based on 1D temporal convolutions in order to encapsulate EEG feature extraction methodologies used in traditional classiers
&lt;figure id="figure-overview-of-1d-cnn-designed-architecture-it-contains-a-1d-convolution-block-layer-followed-by-a-temporal-pooling-and-convolution-kernel-to-extract-features-that-are-the-input-for-the-dense-layer"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://mariamonzon.github.io/images/eeg-grasp-decoder/network-description.png" alt="methods-eeg-network" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
Overview of 1D CNN designed architecture. It contains a 1D convolution block layer followed by a temporal pooling and convolution kernel to extract features that are the input for the dense layer
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h4 id="eegnet-"&gt;EEGNet
&lt;/h4&gt;
&lt;p&gt;EEGNet is a compact CNN designed for BCIs that can be trained with very limited data. The architecture has three convolution layers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a one-dimensional convolution analogous to temporal band-pass filtering&lt;/li&gt;
&lt;li&gt;a depthwise convolution to perform spatial filtering,&lt;/li&gt;
&lt;li&gt;a separable convolution to identify temporal patterns across the previous filters&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="htnet-architecture-"&gt;HTNet architecture
&lt;/h4&gt;
&lt;p&gt;HTNet builds upon EEGNet
. The authors added a Hilbert transform layer after this initial temporal convolution to compute relevant spectral power features using a data-driven filter-Hilbert. The temporal convolution and Hilbert transform layers generate data-driven spectral features that can then be projected from electrodes onto common regions of interest using a predefined weight matrix.&lt;/p&gt;
&lt;h4 id="training-strategies"&gt;Training Strategies&lt;/h4&gt;
&lt;p&gt;Transfer learning techniques from the field of machine learning have been adopted also for EEG feature distribution for inter-subject variability. The common cross-validation strategy used in EEG decoding is known as &amp;ldquo;leave one-subject-out&amp;rdquo;. Given the N subjects, the training subset is fromed by N - 1, while the remaining subject is used for testing.
Classiffcation results are reported for differente training stratesgies: within-subject, inter-subject and with pretraining in another recording technology.&lt;/p&gt;
&lt;p&gt;
&lt;figure id="figure-test-strategies-for-the-evaluation-of-the-resutls"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://mariamonzon.github.io/images/eeg-grasp-decoder/methods-training-valdation-strategy.png" alt="methods-training" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
Test strategies for the evaluation of the resutls
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h4 id="data-augmentation"&gt;Data Augmentation&lt;/h4&gt;
&lt;p&gt;Data augmentation refers to techniques used to increase the amount of data by slightly modifying training data.
Data augmentation is especially useful for EEG signals where the limitation of small-scale datasets greatly affects the performance of classifiers. Still due to the variability of EEG and time-series nature, it is challenging to augment the data in the feature space. Based on the findings of
, we implemented an easy on-the-fly data augmentation that consist on band filtering the training data. The aim is to enforce the network to learn different features at different frequency bands.&lt;/p&gt;
&lt;p&gt;
&lt;figure id="figure-overview-of-training-pipeline-including-the-data-augmentation-method"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://mariamonzon.github.io/images/eeg-grasp-decoder/methods-split-bands.png" alt="methods-augmentation" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
Overview of training pipeline including the data augmentation method
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h3 id="4-results"&gt;4-Results&lt;/h3&gt;
&lt;p&gt;In a single-trial multiclass based decoding approach, which incorporated both movement conditions and rest
can be successfully decodes using Deep learning based decoders.
We performed a comparison on the decoding accuracy for single trial of 2 seconds on the state-of-the-art network architecture on the time of the study. Table depicts the inter-participant classification results.
&lt;figure id="figure-decoding-accuracy-on-single-trial-classification"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://mariamonzon.github.io/images/eeg-grasp-decoder/results-architecture.png" alt="results-architecture" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
Decoding accuracy on single trial classification
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;The effect of cropping window duration was investigated. We can conlcude that longer signal windows show better performance.&lt;/p&gt;
&lt;p&gt;
&lt;figure id="figure-overview-of-training-pipeline-including-the-data-augmentation-method"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://mariamonzon.github.io/images/eeg-grasp-decoder/results-cropping-window.png" alt="results-window" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
Overview of training pipeline including the data augmentation method
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;The best results were achieved when training the model with a cropped window T =[0,1] with overlapping strides 250ms. The models were pretrained in another recording technology resampled to 128 Hz with split frequencies data augmentation strategy. On average, best classification performance could be reached 1s after the movement onset.&lt;/p&gt;
&lt;p&gt;
&lt;figure id="figure-single-trial-decoding-performance-of-the-dry--and-water-electrodes-recordings"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://mariamonzon.github.io/images/eeg-grasp-decoder/results-accuracy-time.png" alt="results-accuracy" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
Single trial decoding performance of the dry- and water-electrodes recordings
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;Despite the reduced number of channels of the dry electrodes recordings, the average performance was not decreased significantly as it can be seen in the above figure.&lt;/p&gt;
&lt;h4 id="5-conclusion"&gt;5-Conclusion&lt;/h4&gt;
&lt;p&gt;This study confirmed that EEG based correlates of reach-and-grasp actions can be successfully identified using Deep Leaning based decoders. We demonstrated that a simple, yet effective, 1D convolution CNN can reach state-of-the-art neural decoders when and improve the results appliying the mmodes to new participants, even when a different recording modality is used. Unfortunately, a direct comparison to other reach-and-grasp studies such as is difficult due significant differences in experimental setup and paradigm and hence cannot be made in a serious manner.&lt;/p&gt;
&lt;h3 id="references"&gt;References&lt;/h3&gt;
&lt;p&gt;
Schwarz A, Ofner P, Pereira J, Sburlea AI, Müller-Putz GR. Decoding natural reach-and-grasp actions from human EEG. J Neural Eng. 2018 Feb;15(1):016005. doi: 10.1088/1741-2552/aa8911. PMID: 28853420.&lt;/p&gt;
&lt;p&gt;
Schwarz, A., Escolano, C., Montesano, L., &amp;amp; Müller-Putz, G. (2020). Analyzing and Decoding Natural Reach-and-Grasp Actions Using Gel, Water and Dry EEG Systems. Frontiers in Neuroscience, 14.&lt;/p&gt;
&lt;p&gt;
Lawhern V J, Solon A J, Waytowich N R, Gordon S M, Hung C P and Lance B J 2018 Eegnet: a compact convolutional neural network for EEG-based brain–computer interfaces J. Neural Eng. 15 056013&lt;/p&gt;
&lt;p&gt;
Peterson, S. M., Steine-Hanson, Z., Davis, N., Rao, R. P. N., &amp;amp; Brunton, B. W. (2021). Generalized neural decoders for transfer learning across participants and recording modalities. Journal of Neural Engineering.
&lt;/p&gt;</description></item><item><title>Warehouse Route Optimization with Reinforcement Learning</title><link>https://mariamonzon.github.io/projects/reinforcement-learning-warehouse/</link><pubDate>Tue, 15 Dec 2020 00:00:00 +0000</pubDate><guid>https://mariamonzon.github.io/projects/reinforcement-learning-warehouse/</guid><description>&lt;p&gt;The problem represents a storage decision process where outcome is under the control of a robot, i.e, a decision maker
agent, but also are partly random. Therefore, the problem can be well modeled as a discrete-time Markov Decision
Processes. The approach follow was:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Implement a reinforcement-learning based algorithm&lt;/li&gt;
&lt;li&gt;The robot is the agent and decides where to place the next part&lt;/li&gt;
&lt;li&gt;Use the markov decision process toolbox for your solution&lt;/li&gt;
&lt;li&gt;Choose the best performing MDP&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="defitinions"&gt;Defitinions&lt;/h2&gt;
&lt;p&gt;The basic concepts to understand the promblem are shortly introduced based on &lt;em&gt;Artificial Intelligence: A Modern Approach&lt;/em&gt; book:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Reinforcement learning&lt;/strong&gt;: Type of dynamic programming that trains algorithms using
a system of reward and punishment. The agent learns without intervention from a human by maximizing its reward
and minimizing its penalty and updates itself continuously. The algorithm it automatically finds patterns
and relationships inside of that dataset. It requires realtime data.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Agent&lt;/strong&gt;: A is the set of all possible moves the agent can make. An action is almost self-explanatory, but it should be noted that agents choose among a list of possible actions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Environment&lt;/strong&gt;: The world through which the agent moves. The environment takes the agent&amp;rsquo;s current state and action as input, and returns as output the agent&amp;rsquo;s reward and its next state.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;State&lt;/strong&gt;: The parameter values that describe the current cofiguration of the environment, which the agent uses to choose an action. A state is a concrete and immediate situation in which the agent finds itself; i.e. a specific place and moment.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Reward&lt;/strong&gt;: Feedback by which we effectively evaluate the agent&amp;rsquo;s action.
From any given state, an agent sends output in the form of actions to the environment, and the environment
returns the agent&amp;rsquo;s new state (which resulted from actingon the previous state) as well as rewards, if any.
Rewards
can be immediate or delayed.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Markov decision process&lt;/strong&gt;: Markov decision processes (MDPS) is a model decision making in stochastic, sequential environments. The essence of the model is that a decision maker, or agent, inhabits an environment, which changes state randomly in response to action choices made by the agent.
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://mariamonzon.github.io/images/reinforcement-learning-warehouse/agent-environment.png" alt="agent" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="example-introduction"&gt;Example Introduction&lt;/h2&gt;
&lt;p&gt;A tiny warehouse with (2x2) storage capacity locations is simulated. The picking robot (agent) interacts with the
warehouse (environment) by store-restoring items in each warehouse cell or shelve. The dataset contains store and
restore action for red, blue and white colored items although an empty field is also possible.&lt;/p&gt;
&lt;p&gt;When the agent is placed on a field position (𝑥𝑑, 𝑦𝑑), it can either store or restore each of the color items.
There exists a total of six possible actions to change its environment. The robot can move in the (2x2) grid
environment and start moving at initial grid position (1,1) . The robot is constrained to always to move only
to one adjacent fields (not in diagonal).&lt;/p&gt;
&lt;p&gt;The distance the robot needs to move is derived based on current (𝑥𝑐 , 𝑦𝑐 ) and goal position (𝑥𝑑 , 𝑦𝑑). The
distance is calculated as the sum of the absolute differences of the layout position
$$ 𝑑 = |𝑥_𝑑 − 𝑥_𝑐 | + |𝑦_𝑑 − 𝑦_𝑑|$$
&lt;/p&gt;
&lt;p&gt;Therefore, the distance to the position can be assigned to the cost of the action or negative reward. The ideal
goal of the reinforcement learning approach would be to optimize the route picking storage strategy by
minimizing the distance with rewards the store/restore motion actions.&lt;/p&gt;
&lt;h2 id="methods"&gt;Methods&lt;/h2&gt;
&lt;p&gt;The Markov Discrete Process (MDP) algorithm was implemented for modelling the problem. A MDP is
described by state transition probabilities. A general Reinforcement Learning and thus also MDP algorithm
is defined with a set of variables:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Actions (A): refers to the operations an agent can perform which direct modify the environment. In our
problem this are related to the effect on the warehouse grid cells, directly proportional to the warehouse size
(𝑋, 𝑌). $ A = \{ 𝐴_{(1,1)}, 𝐴_{(1,2)}, 𝐴_{(2,1)}, … , 𝐴_{(X,Y)}\}$
where $ |𝐴| = |𝑋 \cdot 𝑌|$
.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;States (S): represent all the possible configuration of environment, i.e, how the items are storage in the warehouse grid. In the addressed problem, the total states can be computed $ |S| = \{𝑖𝑡𝑒𝑚𝑠_{𝑔𝑟𝑖𝑑}*move_{action} \}$
where the items on the grid is calculated as the exponential relation of colored items number to grid size, and the move actions represent all the possible robot movements {store: blue/red/white, restore: blue/red/white }.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Transition probability matrix (TMP) in Markov processes stores the probability to transition from the current state to a next possible state after the agent has performed given action in a single time unit. The dimension if this matrix is determined by (|𝐴|,|𝑆|,|𝑆|).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Reward matrix (R), is composed by the defined reward or symbolic benefit received performing and action 𝐴(𝑥,𝑦) for a given state. The shape of this matrix (|𝑆|,|𝐴|).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="transition-probability-matrix-tpm"&gt;Transition Probability Matrix (TPM)&lt;/h3&gt;
&lt;p&gt;In the simple addressed problem, the warehouse grid is of size the 2x2. Therefore, so have 2·2=4 possible actions and 1536 different states. In order to compute the probability actions, is necessary to iterate through all possible actions as well as all generated states. Then assign the possibility of having a colored item or being empty derived from the training data frequencies.
It should also be taken into account if the warehouse grid is already full and if the linked operation is invalid. In that case, the transition probabilities are kept 0. To assert that the computation was correct, it was checked that all he probabilities for a particular state sum 1.&lt;/p&gt;
&lt;h3 id="regard-matrix"&gt;Regard Matrix&lt;/h3&gt;
&lt;p&gt;The aim of the reinforcement learning algorithm is to maximize the obtained rewards. In this problem, the distance should influence the reward. Thus, the simple criteria to assign the negative distances values from the origin warehouse cell (1,1). At the same time, not from every state the robot can transition to other state. For the entries in the reward matrix, as the movement action would be invalid, a penalization of -10000 was taken as a reward.
With the necessary TMP and R, a MDP model is trained within the python-MDPtoolbox package. It contains the most common Reinforcement Learning training approaches, such as Value Iteration and Policy Iteration. These were the best models selected for the simplified problem. The discount factor and maximum iteration hyperparameters were set to 0.9 and 750 respectively.&lt;/p&gt;
&lt;h2 id="evaluation"&gt;Evaluation&lt;/h2&gt;
&lt;p&gt;MDP policy refers to a solution to which specifies an action for each state. Value iteration is defined as an algorithm that gives an optimal policy for a MDP, i.e., The ideal MDP solution. In the training run, for policy iteration 6 iterations were performed whereas for value iteration 35 were performed.
To evaluate the model, a test dataset containing 60 pair of movement actions and colored items was used. Although different MDP algorithms were tried, there was no change on the result. The movements distance need was 232 for both Value Iteration and Policy Iteration. That may be due to on the restricted problem, the simple algorithm is already learning the optimal policy for the given rewards.
In order to assess if the policy represents a better utility than random, a simple random walk approach through the grid was also implemented. In that the distance or movements performed by the robot are count. The random distance, although the random seed was fix, it rounds the range of 264.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Algorithm&lt;/th&gt;
&lt;th style="text-align: center"&gt;Move Distance&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Value Iteration&lt;/td&gt;
&lt;td style="text-align: center"&gt;232&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Policy Iteration&lt;/td&gt;
&lt;td style="text-align: center"&gt;232&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Random Walk&lt;/td&gt;
&lt;td style="text-align: center"&gt;264&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;</description></item><item><title>Financial Transaction Text Classifier</title><link>https://mariamonzon.github.io/projects/text-classifier-bayes/</link><pubDate>Wed, 15 Apr 2020 00:00:00 +0000</pubDate><guid>https://mariamonzon.github.io/projects/text-classifier-bayes/</guid><description>&lt;p&gt;The aim of the project is to classify financial transactions, stored in a datasheet file, into one of seven categories listed:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Income&lt;/li&gt;
&lt;li&gt;Private (cash, deposit, donation, presents)&lt;/li&gt;
&lt;li&gt;Living (rent, additional flat expenses, &amp;hellip;)&lt;/li&gt;
&lt;li&gt;Standard of living (food, health, children, &amp;hellip;)&lt;/li&gt;
&lt;li&gt;Finance (credit, bank costs, insurances, savings)&lt;/li&gt;
&lt;li&gt;Traffic (public transport, gas stations, bike, car &amp;hellip;)&lt;/li&gt;
&lt;li&gt;Leisure (hobby, sport, vacation, shopping, &amp;hellip;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The selected approach is to train a Multinomial Naive Bayes classifier, fitted with the transaction word counts and class categories. Naive Bayes is a statistical classification technique based on Bayes probability theorem, considered as one most basic supervised learning algorithm. Naive Bayes classifier assumes that the features in a class are independent of other features.
The followed approach to implement the classifier can be is based on the standard steps of Machine Learning (ML) algorithms: data exploration and preprocessing, feature selection and transformation, classifier model definition and training. The final phase of the assignment is dedicated for results visualization and evaluation.&lt;/p&gt;
&lt;h2 id="data-exploration-and-preprocessing"&gt;Data exploration and preprocessing&lt;/h2&gt;
&lt;p&gt;The essential first step is to import the dataset files into the python program, loaded as a pandas DataFrame data structure. The next step performed was a data quality assessment by printing the header columns, missing values datatypes and a short overview of the data samples. Furthermore, the unique values of each field as well as the label frequencies are printed to determine if the dataset suffers from class imbalance.
As a quality assessment result, data cleaning procedures were performed. The missing values were substituted the missing values with 0, to minimize the effect of these on the accuracy of the model. For the text fields, the data was standardized by removing capital, special and/or punctuation characters, German stopwords and 2 or a single character-words. Finally, the sentences were splitted into single words (tokenize).
After the data cleaning and preprocessing, to check if the process was done successfully, a final data inspection and a summary of the dataset by class was depicted. A secondary reason for the data inspection was to have an insight of the feature’s distributions and outlier identification.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://mariamonzon.github.io/images/text-classifier-bayes/1-HistogramTransactionClass.png" alt="transaction-visualization" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h2 id="feature-transformation"&gt;Feature transformation&lt;/h2&gt;
&lt;p&gt;Feature transformation refers to translating the data into an appropriate format allowing the ML model to learn from the data. For instance, categorical data need to be converted to numerical data for the Naïve Bayes classifier. The categorical labels were converted to values ranged between 0-5.
A common step in ML is also feature selection, i.e selection of the features in dataset hypothesized to be the most descriptive. Therefore, all the numeric values were scaled between the range 0-1 to reduce the variance. The string features were vectorized and concatenated to create the feature matrix. The final feature dimension was 502. As an optional step, a model selector of the best K features was also implemented for feature dimensionality reduction.&lt;/p&gt;
&lt;h2 id="model-training"&gt;Model Training&lt;/h2&gt;
&lt;p&gt;The selected classifier model is a Multinomial Naïve bayes classifier implemented in the sklearn library. As only few data samples were available in the dataset, a cross validation scheme has been used for training and evaluation. The data was splitted in k=10 folds and with stratified sampling to mitigate the class imbalance. Note that even the predict phase was done in after fitting the classifier on the KFold iteration, but this does not interfere in the training process.&lt;/p&gt;
&lt;h2 id="evaluation-and-result-visualization"&gt;Evaluation and Result visualization&lt;/h2&gt;
&lt;p&gt;As stated previously, the data samples present in the datasheet are not many to test the robustness of the classifier a cross validation scheme has been used for evaluation. For each class, the predicted probabilities are plotted in the next figure. The probabilities for each sample are close to 1, which resembles the a extreme probability assignament of Naïve Bayes Classifier.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://mariamonzon.github.io/images/text-classifier-bayes/2-predicted-probabilities.png" alt="probabilites" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;In order to quantified the performance of the classifier, many quantitative metrics were computed.
The most common evaluation method in classification is the so-called confusion matrix. The Matrix is represented for a binary classification although it can be extended to multiclass problem. The matrix represents the relation between correctly classified, i.e. true positives (TP) and True Negatives (TN), and wrongly predicted samples , i.e. false negatives (FN) and false positives (FP) for each class. The matrix can be displayed with absolute frequency values or normalized by each class total number of elements. The confusion matrix for the assignment are shown below:&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://mariamonzon.github.io/images/text-classifier-bayes/2-confussion-matrix.png" alt="results" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;From the confusion matrix to assess the the quality of the predictions further evaluation metrics can be derived, a ranged from 0 to 1 (represents the best possible score):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Accuracy: metric of all the correctly classified samples over the total number of samples that asses the overall performance of the model
$$ Accuracy = \frac{TP+TN}{TTP+TN+FP+FN}$$
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Precision: proportion of correctly predicted samples (TP) to the total predicted samples as positive, therefore assess the correct prediction capability for each class.
$$Precision= \frac{TP}{TP+FP}$$
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Recall: ratio of correctly predicted samples (TP) and actual total samples of such class, therefore an assessment metric of the ability to classify all correct instances per class.
$$ Recall = \frac{TP}{TP+FN}$$
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;F1-score: is the harmonic mean between precision (P) and recall (R) and asses the incorrectly predicted samples, especially in class imbalanced problems
$$F1= \frac{2 \cdot P \cdot R}{P+R}$$
&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The model achieves a total weighted accuracy of 90% and an averaged F1-score of 90%. The detailed evaluation metrics for each class are summarize in the following table:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Label&lt;/th&gt;
&lt;th style="text-align: center"&gt;Total Samples&lt;/th&gt;
&lt;th style="text-align: center"&gt;Precision&lt;/th&gt;
&lt;th style="text-align: center"&gt;Recall&lt;/th&gt;
&lt;th style="text-align: center"&gt;F1-score&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Finance&lt;/td&gt;
&lt;td style="text-align: center"&gt;33&lt;/td&gt;
&lt;td style="text-align: center"&gt;1.00&lt;/td&gt;
&lt;td style="text-align: center"&gt;0.88&lt;/td&gt;
&lt;td style="text-align: center"&gt;0.94&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Income&lt;/td&gt;
&lt;td style="text-align: center"&gt;17&lt;/td&gt;
&lt;td style="text-align: center"&gt;1.00&lt;/td&gt;
&lt;td style="text-align: center"&gt;1.00&lt;/td&gt;
&lt;td style="text-align: center"&gt;1.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Leisure&lt;/td&gt;
&lt;td style="text-align: center"&gt;65&lt;/td&gt;
&lt;td style="text-align: center"&gt;0.89&lt;/td&gt;
&lt;td style="text-align: center"&gt;0.95&lt;/td&gt;
&lt;td style="text-align: center"&gt;0.92&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Living&lt;/td&gt;
&lt;td style="text-align: center"&gt;26&lt;/td&gt;
&lt;td style="text-align: center"&gt;0.91&lt;/td&gt;
&lt;td style="text-align: center"&gt;0.81&lt;/td&gt;
&lt;td style="text-align: center"&gt;0.86&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Private&lt;/td&gt;
&lt;td style="text-align: center"&gt;21&lt;/td&gt;
&lt;td style="text-align: center"&gt;0.77&lt;/td&gt;
&lt;td style="text-align: center"&gt;0.95&lt;/td&gt;
&lt;td style="text-align: center"&gt;0.85&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Standard of living&lt;/td&gt;
&lt;td style="text-align: center"&gt;47&lt;/td&gt;
&lt;td style="text-align: center"&gt;0.91&lt;/td&gt;
&lt;td style="text-align: center"&gt;0.85&lt;/td&gt;
&lt;td style="text-align: center"&gt;0.88&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;For further visualization of the results, two additional graphic representations are shown in Figure 3. A Receiver Operator Characteristic (ROC) curve is a representation to assess the performance of binary classifiers, but it can be adapted for a multiclass classification by computing a curve for each class. The curve was computed following one-vs-all approach so that each class considers that class label as a true and all others as negative. From this curve, a further metric is usually derived as a summary of ROC, the area under the curve (AUC). When AUC value is 1, it means that the classifier is able to classify all the classes, on the contrary, when the values is 0.5, the classifier only can classify a random label or a constant value. As depicted in the evaluation ROC, for all classes the AUC measures are over 0.88. Furthermore, the Jaccard similarity is a similarity metric for samples of two class sets to determine which samples are shared and which are distinct. It is defined as the number of the label intersection divided by the union of two label sets.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://mariamonzon.github.io/images/text-classifier-bayes/metrics-roc-jaccard.png" alt="metrics" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>ECG Annotation &amp; Arrhythmia Classifier</title><link>https://mariamonzon.github.io/projects/ecg-resuscitation/</link><pubDate>Wed, 27 Apr 2016 00:00:00 +0000</pubDate><guid>https://mariamonzon.github.io/projects/ecg-resuscitation/</guid><description>&lt;p&gt;Out-of hospital cardiac arrest (OHCA) is one of the major causes of death in developed countries. Resuscitation guidelines recommend different treatments depending on the heart rhythm of the patient. The objective of this work is to develop a machine learning algorithm based on the ECG signal to automatically label heart rhythms in resuscitation episodes, a key tool for the retrospectively evaluation and improvement of the quality treatment. This work would help to systematise the annotation of databases since manual annotation of rhythms is a time-consuming task which can be an obstacle for handling large data sets.&lt;/p&gt;
&lt;p&gt;The starting point of this project was a database composed of 1631 intervals of 3 seconds taken from a larger database containing OHCA 298 episodes. To review the ECG segments, a graphical interface (GUI) was developed which allows the display of the ECGs classified by the type of arrhythmia:
asystole (AS), ventricular tachycardia (VT) that degenerates into ventricular fibrillation (VF), pulseless electrical activity (PEA) pulse generating rhythms (PR).&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://mariamonzon.github.io/images/egc-svm-annotation/GUI-visualization.png" alt="GUI-example-visualization" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;The database has been processed using a machine learning algorithm and the results obtained using cross-validation. Two classifiers have been developed selecting five features of the ECG, first to identify AS, and then to discriminate organised rhythms (PR and PEA) from ventricular arrhythmias (VT and VF).&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://mariamonzon.github.io/images/egc-svm-annotation/ECG-classification-Example.png" alt="ECG-Visualization" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;These algorithms have been combined to create a three class rhythm classification algorithm. The total accuracy of the final algorithm was 90.9%. A precise algorithm was obtained for the classification of OHCA rhythm into: AS, organised, and shockable rhythms. This algorithm can be implemented to analyse resuscitation episodes using 3 seconds ECG segments, and could be integrated into new methods for retrospective analysis of OHCA.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://mariamonzon.github.io/images/egc-svm-annotation/SVM-classification-results.png" alt="ECG-Visualization" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;The results show that it is possible to automatically interpret resuscitation cardiac rhythm. These types of algorithms can be very useful since they allow an efficient rhythm classification with a minimum level of expert clinician supervision.&lt;/p&gt;</description></item></channel></rss>