A Dataset of Microelectrode Recordings from Deep Brain Stimulation Procedures.
The 8 matches · 2 of them tie a paragraph to a whole file, not to given lines: weak matches, whose lines are not tinted
- [1] § Technical Validation › Artifact removal and quality control ↔ signal_quality_classifier/classifier/random_forest_trainer.py, lines 58–93 · score 0.85 · weighted F1 score, confusion matrix, balanced accuracy, Random Forest, leakage, predictions
- [2] § Technical Validation › Validation of subcortical brain structure annotations ↔ brain_layer_classifier/model_trainer_manual_features.py, the whole file · a weak match · score 0.84 · brain layer classifier, logistic regression, F1 score, windowing, accuracy, overlapping
- [3] § Technical Validation › Validation of subcortical brain structure annotations ↔ brain_layer_classifier/model_trainer.py, the whole file · a weak match · score 0.78 · brain layer classifier, F1 score, RBF, kernel, windowing, accuracy
- [4] § Technical Validation › Artifact removal and quality control ↔ signal_quality_classifier/cleaning/best_segment_extractor.py, lines 134–171 · score 0.70 · quality segments, artifact segments, segment duration, Neuronal Activity, classifications
- [5] § Methods › Signal quality classification ↔ signal_quality_classifier/cleaning/best_segment_extractor.py, lines 134–171 · score 0.66 · high quality, Neuronal activity, prioritizes, longest, duration, artifact
- [6] § Methods › Signal quality classification ↔ signal_quality_classifier/training_data/feature_definitions.py, lines 6–36 · score 0.58 · detected spikes, feature definitions, exceeding, threshold, quality, signal
- [7] § Methods › Signal quality classification ↔ signal_quality_classifier/cleaning/best_segment_extractor.py, lines 8–31 · score 0.54 · signal quality classifier, Neuronal activity, Validation, segments
- [8] § Methods › Signal quality classification ↔ signal_quality_classifier/classifier/random_forest_trainer.py, lines 39–56 · score 0.52 · Random Forest classifier, pipeline, quality, signal
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 171 lines · 7 KB · no license · 3 matches
- import pandas as pd
- from signal_quality_classifier.training_data.feature_calculator import calculate_statistics_of_segment
- import joblib
- model = joblib.load('../classifier/random_forest_pipeline.pkl')
- label_encoder = joblib.load('../classifier/label_encoder.pkl')
- def classify_signal_segments(df, segment_duration, fs=20000):
- """
- Analyzes signal quality by segmenting data and classifying each segment.
- Args:
- df (pandas.DataFrame): Signal data with 'Time' and '2: preprocessed' columns
- segment_duration (float): Length of each segment in seconds
- fs (int): Sampling frequency in Hz (default: 20000)
- Returns:
- tuple: (segments_list, optimal_segment)
- - segments_list: List of [label, (start_time, end_time)] for each classified segment
- - optimal_segment: (start_time, end_time) of the highest quality neuronal activity segment
- Raises:
- ValueError: If required columns are missing or signal is too short
- """
- validate_dataframe_columns(df, ['Time', '2: preprocessed'])
- samples_per_segment, num_segments = calculate_segments(df, segment_duration, fs)
- features_df, time_ranges = extract_features(df, samples_per_segment, num_segments)
- y_pred = classify_segments(features_df)
- segments_list = group_segments_by_label(y_pred, time_ranges)
- longest_segment = find_longest_segment(segments_list, segment_duration)
- return segments_list, longest_segment
- def validate_dataframe_columns(df, required_columns):
- if not all(col in df.columns for col in required_columns):
- raise ValueError(f'DataFrame must contain columns: {required_columns}')
- def calculate_segments(df, segment_duration, fs=20000):
- """
- Calculates segmentation parameters based on signal length and desired segment duration.
- Args:
- df (pandas.DataFrame): Signal data
- segment_duration (float): Desired segment length in seconds
- fs (int): Sampling frequency in Hz (default: 20000)
- Returns:
- tuple: (samples_per_segment, num_segments)
- Raises:
- ValueError: If signal is shorter than one segment
- """
- samples_per_segment = int(segment_duration * fs)
- total_samples = len(df)
- num_segments = int(total_samples / samples_per_segment) + (total_samples % samples_per_segment > 0)
- if num_segments == 0:
- raise ValueError('Signal length is less than the segment length.')
- return samples_per_segment, num_segments
- def extract_features(df, samples_per_segment, num_segments):
- """
- Extracts statistical features from each signal segment for classification.
- Args:
- df (pandas.DataFrame): Signal data
- samples_per_segment (int): Number of samples per segment
- num_segments (int): Total number of segments
- Returns:
- tuple: (features_df, time_ranges)
- - features_df: DataFrame with computed features for each segment
- - time_ranges: List of (start_time, end_time) for each segment
- """
- features_df = pd.DataFrame()
- time_ranges = []
- for i in range(num_segments):
- start_idx = i * samples_per_segment
- end_idx = start_idx + samples_per_segment
- segment = df.iloc[start_idx:end_idx]
- start_time, end_time = segment['Time'].iloc[0], segment['Time'].iloc[-1]
- time_ranges.append((start_time, end_time))
- preprocessed_segment = segment['2: preprocessed']
- print(f"Calculating statistics {i+1}/{num_segments}")
- features_df = calculate_statistics_of_segment(
- features_df, file_path="segment_file", label="segment_label", segment=preprocessed_segment
- )
- features_df = features_df.drop(columns=[col for col in ['file_path', 'label'] if col in features_df.columns])
- return features_df, time_ranges
- def classify_segments(features_df):
- """
- Classifies signal segments using the pre-trained Random Forest model.
- Args:
- features_df (pandas.DataFrame): Features extracted from signal segments
- Returns:
- numpy.array: Predicted class labels for each segment
- """
- X = features_df
- y_pred_numerical = model.predict(X)
- print("Prediction complete")
- return label_encoder.inverse_transform(y_pred_numerical)
- def group_segments_by_label(y_pred, time_ranges):
- """
- Groups consecutive segments with the same classification label into continuous time ranges.
- Args:
- y_pred (numpy.array): Predicted labels for each segment
- time_ranges (list): Time ranges for each segment
- Returns:
- list: List of [label, (start_time, end_time)] for each classified segment group
- """
- segments_list = []
- current_label = y_pred[0]
- current_start_time = time_ranges[0][0]
- current_end_time = time_ranges[0][1]
- for i in range(1, len(y_pred)):
- label = y_pred[i]
- start_time, end_time = time_ranges[i]
- if label == current_label:
- current_end_time = end_time
- else:
- segments_list.append([current_label, (current_start_time, current_end_time)])
- current_label, current_start_time, current_end_time = label, start_time, end_time
- segments_list.append([current_label, (current_start_time, current_end_time)])
- return segments_list
- def find_longest_segment(segments_list, segment_duration):
- """
- Finds the longest high-quality segment suitable for analysis.
- Priority rules:
- 1. Longest 'Neuronal activity' segment ≥ 2 seconds
- 2. If none found, longest non-artifact segment ≥ 2 seconds
- 3. If still none, returns None
- Args:
- segments_list: List of [label, (start_time, end_time)] classified segments
- segment_duration: Duration of each segment in seconds
- Returns:
- tuple or None: (start_time, end_time) of optimal segment or None if no suitable segment
- """
- longest_brain_signal_segment = None
- longest_non_artifact_segment = None
- current_start, current_end = 0, 0
- for label, (start, end) in segments_list:
- duration = end - start
- if label == 'Neuronal activity' and duration >= 3 * segment_duration:
- if longest_brain_signal_segment is None or duration > (longest_brain_signal_segment[1] - longest_brain_signal_segment[0]):
- longest_brain_signal_segment = (start, end)
- elif label != 'Artifact':
- current_end = end
- duration = current_end - current_start
- if longest_non_artifact_segment is None or duration > (longest_non_artifact_segment[1] - longest_non_artifact_segment[0]):
- longest_non_artifact_segment = (current_start, current_end)
- else:
- current_start = end
- if longest_non_artifact_segment and (longest_non_artifact_segment[1] - longest_non_artifact_segment[0]) < 2:
- longest_non_artifact_segment = None
- return longest_brain_signal_segment if longest_brain_signal_segment else longest_non_artifact_segment
best_segment_extractor.py at commit e7b2acf, no license · at the source
Overview
- Gdansk University of Technology, Faculty of Electronics, Telecommunications and Informatics,Gdańsk, 80-233 Poland
- GUMED, Gdańsk, Poland
Abstract
Precise intraoperative localisation of subcortical brain structures remains a critical challenge in deep brain stimulation, yet openly available microelectrode recording datasets are scarce. We present a dataset of 6,646 processed MER recordings from 132 patients with neurological disorders, including Parkinson’s disease, dystonia, Huntington’s disease, epilepsy and others, acquired during DBS procedures. Signals were band-pass filtered and cleaned using an automated machine learning-based artifact rejection pipeline; annotation quality was confirmed by independent review. In addition an experienced electrophysiologist annotated representative examples of three basal ganglia structures encountered along the electrode trajectories: striatum/
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 8 matches between paragraphs and lines of code.
kasiaOsowska/Deep-Brain-Stimulation-Microelectrode-Recordings
e7b2acfc4f1e649dffd2752c9827be54a9aac30d, 10 June 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
22 files
- audio_converter/
convert_csv_to_wav.py , Python, 39 lines - brain_layer_classifier/
Dataset.py , Python, 109 lines - brain_layer_classifier/
__init__.py , Python, 1 line - brain_layer_classifier/
feature_definitions.py , Python, 274 lines - brain_layer_classifier/
model_trainer.py , Python, 68 lines, 1 match - brain_layer_classifier/
model_trainer_manual_fea , Python, 75 lines, 1 matchtures.py - parser/
data_transformer.py , Python, 134 lines - parser/
utils.py , Python, 71 lines - signal_quality_classifie
r/ , Python, 1 line__init__.py - signal_quality_classifie
r/ , Python, 1 lineanalysis/ __init__.py - signal_quality_classifie
r/ , Python, 204 linesanalysis/ classification_viewer.py - signal_quality_classifie
r/ , Python, 1 lineclassifier/ __init__.py - signal_quality_classifie
r/ , Python, 171 lines, 2 matchesclassifier/ random_forest_trainer.py - signal_quality_classifie
r/ , Python, 1 linecleaning/ __init__.py - signal_quality_classifie
r/ , Python, 171 lines, 3 matchescleaning/ best_segment_extractor.p y - signal_quality_classifie
r/ , Python, 71 linescleaning/ signal_cleaner.py - signal_quality_classifie
r/ , Python, 98 linestraining_data/ Dataset.py - signal_quality_classifie
r/ , Python, 1 linetraining_data/ __init__.py - signal_quality_classifie
r/ , Python, 63 linestraining_data/ feature_calculator.py - signal_quality_classifie
r/ , Python, 218 lines, 1 matchtraining_data/ feature_definitions.py - signal_quality_classifie
r/ , Python, 39 linestraining_data/ training_data_generator. py - README.md, Text, 126 lines
Code availability
The source code used for data processing and analysis has been publicly released via MOST Wiedzy8. (within the ZIP archive under the codes directory) and on GitHub: https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 21 scripts, each with its path and the digest of its content;
- 8 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Data availability
The complete dataset, including microelectrode recordings, brain structure annotations, patient metadata, and codes is publicly available via MOST Wiedzy8 at 10.34808/
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 3 authors, 2 keywords, 3 MeSH terms, 7 references.
Cite
This paper
Osowska, K., Szymański, J., & Libionka, W. (2026). A Dataset of Microelectrode Recordings from Deep Brain Stimulation Procedures. Scientific data, 13(1), 870. https://
BibTeX
@article{osowska2026data
author = {Osowska, Katarzyna and Szymański, Julian and Libionka, Witold},
title = {{A Dataset of Microelectrode Recordings from Deep Brain Stimulation Procedures}},
journal = {Scientific data},
year = {2026},
month = jun,
volume = {13},
number = {1},
pages = {870},
publisher = {Nature Publishing Group},
issn = {2052-4463},
doi = {10.1038/
url = {https://
pmid = {42270599},
pmcid = {PMC13254314}
}
RIS
TY - JOUR
AU - Osowska, Katarzyna
AU - Szymański, Julian
AU - Libionka, Witold
TI - A Dataset of Microelectrode Recordings from Deep Brain Stimulation Procedures
T2 - Scientific data
J2 - Sci Data
PY - 2026
DA - 2026/
VL - 13
IS - 1
SP - 870
SN - 2052-4463
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "A Dataset of Microelectrode Recordings from Deep Brain Stimulation Procedures",
"container-title": "Scientific data",
"author": [
{
"family": "Osowska",
"given": "Katarzyna"
},
{
"family": "Szymański",
"given": "Julian"
},
{
"family": "Libionka",
"given": "Witold"
}
],
"container-title-short":
"volume": "13",
"issue": "1",
"page": "870",
"DOI": "10.1038/
"PMID": "42270599",
"PMCID": "PMC13254314",
"ISSN": "2052-4463",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
10
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1186/s13059-026-04125-8 [code]
- MLMarker: a machine learning framework for tissue inference and biomarker discovery.Journal: Genome biologyIn common: SHAP, scikit-learn, pandas, 3 other tools, methods / tools
- [2] doi:10.1038/s41598-026-52330-z [code]
- SHAP analysis of an improved EEG-based mental workload classification framework: utilizing data augmentation and explainable AI.Journal: Scientific reportsIn common: SHAP, scikit-learn, pandas, 3 other tools, methods / tools
- [3] doi:10.1016/j.nicl.2026.104001 [code]
- Effect of vascular lesion preprocessing on Brain Intensity AbNormality Classification Algorithm (BIANCA) white matter hyperintensity segmentation.Journal: NeuroImage. ClinicalIn common: SHAP, scikit-learn, pandas, 3 other tools, methods / tools
- [4] doi:10.3389/fsysb.2026.1873899 [code]
- A systems microbiology framework for reproducible multi-dataset omics integration with application to long COVID.Journal: Frontiers in systems biologyIn common: SHAP, scikit-learn, pandas, 3 other tools, methods / tools
- [5] doi:10.1126/sciadv.aed3650 [code]
- Truthful visualizations for mass spectrometry imaging enable high-spatial-resolution interactive &
lt;i& gt;m/ z& lt;/ i& gt; mapping and exploration. Journal: Science advancesIn common: SHAP, scikit-learn, pandas, 3 other tools, methods / tools - [6] doi:10.1039/d6ra03343a [code]
- A benchmark dataset and interpretable deep learning framework for drug-induced developmental neurotoxicity prediction.Journal: RSC advancesIn common: SHAP, scikit-learn, pandas, 3 other tools, methods / tools
- [7] doi:10.1038/s42003-026-10957-8 [code]
- Brain defence by the extracellular matrix protein Cochlin.Journal: Communications biologyIn common: SHAP, scikit-learn, pandas, 3 other tools
- [8] doi:10.1002/advs.202600020 [code]
- Early Retinal UCHL1 Dysregulation Coupled With Synaptic Loss Reflects Alzheimer's Disease Severity.Journal: Advanced science (Weinheim, Baden-Wurttemberg, Germany)In common: SHAP, scikit-learn, pandas, 3 other tools
- [9] doi:10.1212/wnl.0000000000218472 [code]
- Lesion-Level Subtypes of White Matter Hyperintensity Evolution Beyond Spatial Location.Journal: NeurologyIn common: SHAP, scikit-learn, pandas, 3 other tools
- [10] doi:10.3390/s26175327 [code]
- Subject Identity Confounds qEEG Emotion Recognition on DEAP and DREAMER.Journal: Sensors (Basel, Switzerland)In common: SHAP, scikit-learn, pandas, 3 other tools
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 21 scripts, and 8 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:ffdd77e58347b7ae…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
