<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article xml:lang="EN" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" article-type="research-article">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Hum. Neurosci.</journal-id>
<journal-title>Frontiers in Human Neuroscience</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Hum. Neurosci.</abbrev-journal-title>
<issn pub-type="epub">1662-5161</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.3389/fnhum.2023.1111590</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Neuroscience</subject>
<subj-group>
<subject>Original Research</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title>Hyper-parameter tuning and feature extraction for asynchronous action detection from sub-thalamic nucleus local field potentials</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author">
<name><surname>Martineau</surname> <given-names>Thomas</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/2087043/overview"/>
</contrib>
<contrib contrib-type="author">
<name><surname>He</surname> <given-names>Shenghong</given-names></name>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<xref ref-type="aff" rid="aff3"><sup>3</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/1713453/overview"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Vaidyanathan</surname> <given-names>Ravi</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff4"><sup>4</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/360927/overview"/>
</contrib>
<contrib contrib-type="author" corresp="yes">
<name><surname>Tan</surname> <given-names>Huiling</given-names></name>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<xref ref-type="aff" rid="aff3"><sup>3</sup></xref>
<xref ref-type="corresp" rid="c001"><sup>&#x002A;</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/376848/overview"/>
</contrib>
</contrib-group>
<aff id="aff1"><sup>1</sup><institution>Biomechatronics Group, Department of Mechanical Engineering, Imperial College London</institution>, <addr-line>London</addr-line>, <country>United Kingdom</country></aff>
<aff id="aff2"><sup>2</sup><institution>Medical Research Council Brain Network Dynamics Unit, University of Oxford</institution>, <addr-line>Oxford</addr-line>, <country>United Kingdom</country></aff>
<aff id="aff3"><sup>3</sup><institution>Nuffield Department of Clinical Neurosciences, University of Oxford</institution>, <addr-line>Oxford</addr-line>, <country>United Kingdom</country></aff>
<aff id="aff4"><sup>4</sup><institution>UK Dementia Research Institute-Care Research and Technology, Imperial College London</institution>, <addr-line>London</addr-line>, <country>United Kingdom</country></aff>
<author-notes>
<fn fn-type="edited-by"><p>Edited by: Jianjun Meng, Shanghai Jiao Tong University, China</p></fn>
<fn fn-type="edited-by"><p>Reviewed by: Huan Gao, Carnegie Mellon University, United States; Wolf-Julian Neumann, Charit&#x00E9; &#x2013; Universit&#x00E4;tsmedizin Berlin, Germany; Timon Merk, Charit&#x00E9; &#x2013; Universit&#x00E4;tsmedizin Berlin, Germany, in collaboration with reviewer W-JN</p></fn>
<corresp id="c001">&#x002A;Correspondence: Huiling Tan, <email>huiling.tan@ndcn.ox.ac.uk</email></corresp>
</author-notes>
<pub-date pub-type="epub">
<day>24</day>
<month>05</month>
<year>2023</year>
</pub-date>
<pub-date pub-type="collection">
<year>2023</year>
</pub-date>
<volume>17</volume>
<elocation-id>1111590</elocation-id>
<history>
<date date-type="received">
<day>29</day>
<month>11</month>
<year>2022</year>
</date>
<date date-type="accepted">
<day>04</day>
<month>05</month>
<year>2023</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#x00A9; 2023 Martineau, He, Vaidyanathan and Tan.</copyright-statement>
<copyright-year>2023</copyright-year>
<copyright-holder>Martineau, He, Vaidyanathan and Tan</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/"><p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</p></license>
</permissions>
<abstract>
<sec>
<title>Introduction</title>
<p>Decoding brain states from subcortical local field potentials (LFPs) indicative of activities such as voluntary movement, tremor, or sleep stages, holds significant potential in treating neurodegenerative disorders and offers new paradigms in brain-computer interface (BCI). Identified states can serve as control signals in coupled human-machine systems, e.g., to regulate deep brain stimulation (DBS) therapy or control prosthetic limbs. However, the behavior, performance, and efficiency of LFP decoders depend on an array of design and calibration settings encapsulated into a single set of hyper-parameters. Although methods exist to tune hyper-parameters automatically, decoders are typically found through exhaustive trial-and-error, manual search, and intuitive experience.</p>
</sec>
<sec>
<title>Methods</title>
<p>This study introduces a Bayesian optimization (BO) approach to hyper-parameter tuning, applicable through feature extraction, channel selection, classification, and stage transition stages of the entire decoding pipeline. The optimization method is compared with five real-time feature extraction methods paired with four classifiers to decode voluntary movement asynchronously based on LFPs recorded with DBS electrodes implanted in the subthalamic nucleus of Parkinson&#x2019;s disease patients.</p>
</sec>
<sec>
<title>Results</title>
<p>Detection performance, measured as the geometric mean between classifier specificity and sensitivity, is automatically optimized. BO demonstrates improved decoding performance from initial parameter setting across all methods. The best decoders achieve a maximum performance of 0.74 &#x00B1; 0.06 (mean &#x00B1; SD across all participants) sensitivity-specificity geometric mean. In addition, parameter relevance is determined using the BO surrogate models.</p>
</sec>
<sec>
<title>Discussion</title>
<p>Hyper-parameters tend to be sub-optimally fixed across different users rather than individually adjusted or even specifically set for a decoding task. The relevance of each parameter to the optimization problem and comparisons between algorithms can also be difficult to track with the evolution of the decoding problem. We believe that the proposed decoding pipeline and BO approach is a promising solution to such challenges surrounding hyper-parameter tuning and that the study&#x2019;s findings can inform future design iterations of neural decoders for adaptive DBS and BCI.</p>
</sec>
</abstract>
<kwd-group>
<kwd>Bayesian optimization (BO)</kwd>
<kwd>deep brain stimulation (DBS)</kwd>
<kwd>time-frequency analysis</kwd>
<kwd>local field potentials (LFPs)</kwd>
<kwd>brain-computer interface (BCI)</kwd>
</kwd-group>
<counts>
<fig-count count="10"/>
<table-count count="2"/>
<equation-count count="10"/>
<ref-count count="66"/>
<page-count count="17"/>
<word-count count="12008"/>
</counts>
<custom-meta-wrap>
<custom-meta>
<meta-name>section-at-acceptance</meta-name>
<meta-value>Brain-Computer Interfaces</meta-value>
</custom-meta>
</custom-meta-wrap>
</article-meta>
</front>
<body>
<sec id="S1" sec-type="intro">
<title>1. Introduction</title>
<p>The successful adoption of deep brain stimulation (DBS) in the treatment of neurological disorders has prompted interest in subcortical brain regions as alternative invasive recording sites for brain-computer interface (BCI). Pathways through the basal ganglia and thalamus are heavily involved in the preparation and regularization of movement. These motor-control mechanisms are, in part, described by an asymmetry between anti-kinetic beta (12&#x2013;32 Hz) and pro-kinetic gamma (32&#x2013;90 Hz) waves measured in local field potentials (LFPs) (<xref ref-type="bibr" rid="B10">Cassidy et al., 2002</xref>; <xref ref-type="bibr" rid="B7">Brown, 2003</xref>; <xref ref-type="bibr" rid="B2">Anzak et al., 2012</xref>; <xref ref-type="bibr" rid="B54">Tan et al., 2013</xref>, <xref ref-type="bibr" rid="B55">2016</xref>). These waves are useful biomarkers for neural decoding. Stimulation triggered during hyper-synchronous beta rhythms of LFPs in the subthalamic nucleus (STN) can help alleviate Parkinsonian rigidity and bradykinesia symptoms (<xref ref-type="bibr" rid="B32">Little et al., 2013</xref>). Since, other pathological and physiological states have been identified from subcortical LFPs, including tremor (<xref ref-type="bibr" rid="B3">Bakstein et al., 2012</xref>; <xref ref-type="bibr" rid="B9">Camara et al., 2015</xref>; <xref ref-type="bibr" rid="B28">Hirschmann et al., 2017</xref>; <xref ref-type="bibr" rid="B52">Tan et al., 2019</xref>; <xref ref-type="bibr" rid="B62">Yao et al., 2020</xref>; <xref ref-type="bibr" rid="B66">Zhu et al., 2020</xref>; <xref ref-type="bibr" rid="B24">He et al., 2021</xref>), dopamine medication effects (<xref ref-type="bibr" rid="B46">Sand et al., 2021</xref>), pain (<xref ref-type="bibr" rid="B65">Zhang et al., 2013</xref>; <xref ref-type="bibr" rid="B33">Luo et al., 2018</xref>), sleep stages (<xref ref-type="bibr" rid="B11">Chen et al., 2019</xref>), finger pressing (<xref ref-type="bibr" rid="B35">Mamun et al., 2015</xref>; <xref ref-type="bibr" rid="B17">Golshan et al., 2018</xref>, <xref ref-type="bibr" rid="B16">2020</xref>; <xref ref-type="bibr" rid="B39">Niketeghad et al., 2018</xref>), reaching actions (<xref ref-type="bibr" rid="B17">Golshan et al., 2018</xref>, <xref ref-type="bibr" rid="B16">2020</xref>), left- or right-hand selection (<xref ref-type="bibr" rid="B35">Mamun et al., 2015</xref>), speech (<xref ref-type="bibr" rid="B17">Golshan et al., 2018</xref>, <xref ref-type="bibr" rid="B16">2020</xref>), behavioral tasks (<xref ref-type="bibr" rid="B63">Zaker et al., 2016</xref>; <xref ref-type="bibr" rid="B17">Golshan et al., 2018</xref>, <xref ref-type="bibr" rid="B16">2020</xref>), isometric force (<xref ref-type="bibr" rid="B48">Shah et al., 2016</xref>, <xref ref-type="bibr" rid="B49">2018</xref>; <xref ref-type="bibr" rid="B55">Tan et al., 2016</xref>), body orientation (<xref ref-type="bibr" rid="B34">Mace et al., 2014</xref>), and gait stages (<xref ref-type="bibr" rid="B53">Tan et al., 2018</xref>). Deep brain LFPs decoding supports adaptive DBS treatment (<xref ref-type="bibr" rid="B24">He et al., 2021</xref>) and could foster the development of new BCI applications, especially aimed at DBS patients. These can, for instance, aim at neurofeedback therapy through gamification (<xref ref-type="bibr" rid="B25">He et al., 2019</xref>) or drive wearable devices to assist patients with impaired mobility (<xref ref-type="bibr" rid="B5">Benabid et al., 2019</xref>).</p>
<p>This article investigates a hyper-parameter automated tuning approach for STN-LFPs decoders. A hyper-parameter is a parameter space that cannot be directly found through a fitting algorithm (the most common being regularization constants). For simplicity, these will be referred to simply as a parameter from thenceforward. For decoding based real-time BCI or adaptive DBS, the pipeline tends to be separated into several stages, such as extracting relevant features, selecting channels, classifying, and stage transition. The impact of individual parameters in different stages of the processing pipeline has typically been gauged independently from one another (<xref ref-type="bibr" rid="B49">Shah et al., 2018</xref>; <xref ref-type="bibr" rid="B62">Yao et al., 2020</xref>). As algorithms evolve toward practical applications, increased complexity almost always results in larger parameter spaces (<xref ref-type="bibr" rid="B34">Mace et al., 2014</xref>). Manual tuning can become tedious when assuming no prior knowledge of the relevance of each parameter. Therefore, parameters are often sub-optimally selected based on preliminary assessments and maintained constant across all testing participants. When assuming limited computational resources, grid searching becomes impractical in large search hyper-volumes (<xref ref-type="bibr" rid="B6">Bergstra and Bengio, 2012</xref>). Gradient-based optimization constrains the problem to the differentiable functions and is not well suited for small-size datasets (<xref ref-type="bibr" rid="B36">Martineau et al., 2020</xref>). Other methods, such as genetic algorithms, have also been proposed. However, this more complex optimization approach necessitates expert knowledge in selecting the necessary genetic operators and correctly interpreting the optimization process (<xref ref-type="bibr" rid="B34">Mace et al., 2014</xref>), which may discourage its adoption.</p>
<p>In this study, Bayesian optimization (BO) was initially chosen for its ease of implementation. It employs predictive Bayesian modeling to iteratively sample the parameter space of a &#x201C;black-box&#x201D; objective function (<xref ref-type="bibr" rid="B50">Shahriari et al., 2016</xref>). Unlike random search (RD), BO uses past samples to make the best-informed sampling decision and guarantees better outcomes within a limited sampling budget (<xref ref-type="bibr" rid="B50">Shahriari et al., 2016</xref>). In BCI research, BO has been principally dedicated to the tuning parameters related to the machine learning stages (<xref ref-type="bibr" rid="B1">Ahmadi et al., 2019</xref>; <xref ref-type="bibr" rid="B37">Nandy et al., 2019</xref>). However, <xref ref-type="bibr" rid="B4">Bashashati et al. (2016)</xref> have shown that BO can be used to fine-tune feature extraction and spatial filtering parameters. The foreseen advantages of BO are threefold. First, it could completely automate and unify the tuning process. Secondly, it could improve decoding performance over what is achieved with a set of known parameters (drawn from what is typically used in other past studies) fixed for different users. Thirdly, as a model-driven approach, BO intrinsically builds a representation of the tuning process mapping parameters to the optimization objective. Parameter importance can thus be determined, and the BO model can also be iteratively updated for sequential tuning (<xref ref-type="bibr" rid="B20">Grado et al., 2018</xref>). As pointed out by <xref ref-type="bibr" rid="B20">Grado et al. (2018)</xref>, a BO algorithm would not be deployed alongside the decoder algorithm on a device firmware (e.g., a DBS micro-controller unit). Instead, it would operate remotely and intermittently suggest parameter changes to said device based on transmitted LFP data, thus providing a secondary outer and long-time-scale adjustment loop tuning.</p>
<p>Moreover, asynchronous decoding detects a state change based on temporal events present within a small analysis window extracted from a continuous data stream (<xref ref-type="bibr" rid="B38">Nicolas-Alonso and Gomez-Gil, 2012</xref>). Although it is required for many practical applications, such as adaptive DBS, asynchronous decoding from STN-LFPs remains challenging, especially for the detection of sustained actions in time (<xref ref-type="bibr" rid="B34">Mace et al., 2014</xref>; <xref ref-type="bibr" rid="B63">Zaker et al., 2016</xref>; <xref ref-type="bibr" rid="B39">Niketeghad et al., 2018</xref>; <xref ref-type="bibr" rid="B36">Martineau et al., 2020</xref>). Reasons include poor signal-to-noise ratio and non-stationary behaviors of the feature signals (<xref ref-type="bibr" rid="B39">Niketeghad et al., 2018</xref>; <xref ref-type="bibr" rid="B62">Yao et al., 2020</xref>), high focality of the signal source in space across the electrode contacts (<xref ref-type="bibr" rid="B2">Anzak et al., 2012</xref>; <xref ref-type="bibr" rid="B54">Tan et al., 2013</xref>; <xref ref-type="bibr" rid="B64">Zhang et al., 2018</xref>), and significant inter-subject and inter-trial variances (<xref ref-type="bibr" rid="B54">Tan et al., 2013</xref>; <xref ref-type="bibr" rid="B39">Niketeghad et al., 2018</xref>). Therefore, several parameters must be set for asynchronous decoding, including feature extraction window length, selected recording channels, or the number of past feature samples considered for classification. An action [isometrical power gripping actions, as defined in <xref ref-type="bibr" rid="B36">Martineau et al. (2020)</xref>] detection task was chosen in this study to assess the feasibility of STN-LFP asynchronous decoding further.</p>
<p>Finally, although the offline correlation of movement with LFPs can be significant, in most previous studies, those correlations are based on average across multiple trials. As emphasized in <xref ref-type="bibr" rid="B34">Mace et al. (2014)</xref>, <xref ref-type="bibr" rid="B39">Niketeghad et al. (2018)</xref>, and <xref ref-type="bibr" rid="B49">Shah et al. (2018)</xref>, the restrictions imposed by a real-time system (those being limited computational resources and memory allocation, causal operation on the data) are intrinsically linked to those of asynchronous decoding and often omitted, notably in the feature extraction stage. Estimated performances made offline for investigative purposes or parameter tuning need to represent online performance. The last requirement was thus to ensure that the decoder could be deployed in real-time, i.e., be refreshed online using streaming data. Many time-frequency decomposition techniques have been proposed to extract information about neural oscillations (<xref ref-type="bibr" rid="B38">Nicolas-Alonso and Gomez-Gil, 2012</xref>). Each technique relies on different interpretations of the signal (e.g., signal partitioning in both the time and frequency domain) and hence on different parameterizations. The influence of these parameters could be assessed here using BO. In total, five different real-time extraction methods were tested and compared. Causality in the extraction stage and throughout the pipeline was maintained, i.e., every operation used the current input state or past states stored in memory.</p>
</sec>
<sec id="S2" sec-type="materials|methods">
<title>2. Materials and methods</title>
<p>The overall decoder architecture is shown in <xref ref-type="fig" rid="F1">Figure 1</xref>. The STN-LFPs signals were first recorded and pre-processed. Feature extraction was performed, followed by channel selection, feature preparation, and state estimation. <xref ref-type="fig" rid="F2">Figure 2</xref> presents the BO-based tuning process, and it repeatedly fitted and evaluated the decoder pipeline to select optimal parameters. The decoders and the BO procedure were implemented in python using the SciPy (<xref ref-type="bibr" rid="B59">Virtanen et al., 2019</xref>), NumPy (<xref ref-type="bibr" rid="B23">Harris et al., 2020</xref>), Scikit-learn (<xref ref-type="bibr" rid="B40">Pedregosa et al., 2011</xref>), Imbalanced-learn (<xref ref-type="bibr" rid="B31">Lema&#x00EE;tre et al., 2017</xref>), and Scikit-optimization (<xref ref-type="bibr" rid="B26">Head et al., 2021</xref>) libraries.</p>
<fig id="F1" position="float">
<label>FIGURE 1</label>
<caption><p>Flow diagram summarizing the sequence of processes for decoding and the different parameters assigned to them. Pre-processing was done prior to decoder pipeline fitting and tuning. A decoder pipeline had three main stages: a feature extraction (using either the ARMA, DWT, HJ, IIR, RWT, STFT method), a feature preparation stage including channel selection based on mutual information (MI) ranking, and a classifier (using either the NB, LR, LDA, SVM-PCA) stage including thresholding. Parameters in each of these three stages were tuned using BO.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fnhum-17-1111590-g001.tif"/>
</fig>
<fig id="F2" position="float">
<label>FIGURE 2</label>
<caption><p>Flow diagram summarizing the Bayesian optimization and decoder fitting procedures, with associated evaluation criteria. Data is prepared in a pair (<italic>x</italic>,<italic>y</italic>) of neural signal and detection target and passed on to the optimizer. Ten percent of the recording is set aside for testing. The optimizer iteratively fits the pipeline presented in <xref ref-type="fig" rid="F1">Figure 1</xref> to yield a score <inline-formula><mml:math id="INEQ7"><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover></mml:math></inline-formula>. The first parameter vector &#x03C1; evaluated is the default vector &#x03C1;<sub>0</sub>. After what the optimizer fits a surrogate model mapping &#x03C1; to <inline-formula><mml:math id="INEQ9"><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover></mml:math></inline-formula>. An acquisition function uses the surrogate model to predict the next &#x03C1;. After a fixed number of iterations, the tuned parameters, optimal score, and improvement on default performance are recorded. Parameter importance is obtained through a sensitivity analysis of the surrogate model.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fnhum-17-1111590-g002.tif"/>
</fig>
<sec id="S2.SS1">
<title>2.1. DBS recording dataset</title>
<p>Recordings collected from six test participants, previously reported in <xref ref-type="bibr" rid="B55">Tan et al. (2016)</xref> and <xref ref-type="bibr" rid="B49">Shah et al. (2018)</xref>, were used in this study. Three participants were tested using their left and right hands, adding up to nine individuals&#x2019; datasets (<xref ref-type="table" rid="T1">Table 1</xref>). For practicality, recording across different hemispheres will be assumed to be independent, granted that factors, such as electrode type, physiology or medication may cause some dependencies. The participants were patients with Parkinson&#x2019;s disease undergoing DBS surgery targeting the STN. Each gave informed consent to participate in the study, which was approved by the local ethics committee board. The participants were asked to apply a given amount of grip force for a given period following the presentation of a visual or auditory queue. Precise details on the data recording procedure can be found in <xref ref-type="bibr" rid="B54">Tan et al. (2013</xref>, <xref ref-type="bibr" rid="B55">2016)</xref>. <xref ref-type="table" rid="T1">Table 1</xref> presents the number of trials and channels recorded. On average, a recording was 402 &#x00B1; 105 s long and contained 40 &#x00B1; 9 trials. Each grip was held for 4.1 &#x00B1; 1.4 s. The ratio of grip against rest was 31 &#x00B1; 7%, and the average holding force was 47 &#x00B1; 27% of the maximum voluntary contraction. In each dataset, multiple channels of LFPs were recorded from lateral and contra-lateral electrodes (<xref ref-type="table" rid="T1">Table 1</xref>). The LFP signals were pre-processed following the same method outlined in <xref ref-type="bibr" rid="B36">Martineau et al. (2020)</xref>. In summary, the prep-processing steps include detrending the recordings using a low-pass filter, removing main artifacts using notch filters, scaling the signals based on their standard deviation and resampling at the desired frequency. The dataset obtained was the following: an LFPs array <italic>x</italic> with time and electrode channel dimensions (for both hemispheres) such that <italic>x</italic> &#x2208; &#x211D;<sup><italic>N</italic><sub><italic>k</italic></sub>&#x00D7;<italic>N</italic><sub><italic>ch</italic></sub></sup>, where <italic>N</italic><sub><italic>k</italic></sub> is the total number of samples and <italic>N</italic><sub><italic>ch</italic></sub>, the total number of channels. <italic>x</italic>was re-sampled at a rate of 512 Hz, which was defined as the decoder input sampling frequency <italic>f</italic><sub><italic>i</italic></sub>. The decoder output <inline-formula><mml:math id="INEQ3"><mml:mover accent="true"><mml:mi>y</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover></mml:math></inline-formula> matched the detection target <italic>y</italic> at a rate of 16 Hz, defined as the decoder output sampling frequency <italic>f</italic><sub><italic>o</italic></sub>. Decoders typically operate in the range of 10&#x2013;20 Hz (<xref ref-type="bibr" rid="B49">Shah et al., 2018</xref>; <xref ref-type="bibr" rid="B24">He et al., 2021</xref>). A base 2 number was chosen to facilitate downsampling, especially for implementing the discrete wavelet transform-based feature extractor. As shown in <xref ref-type="fig" rid="F3">Figure 3</xref>, a sampling step-down <italic>R</italic> = <italic>f</italic><sub><italic>i</italic></sub>/<italic>f</italic><sub><italic>o</italic></sub> was performed such that <inline-formula><mml:math id="INEQ5"><mml:mrow><mml:mrow><mml:mrow><mml:mover accent="true"><mml:mi>y</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover><mml:mo>&#x2062;</mml:mo><mml:mrow><mml:mo>[</mml:mo><mml:mi>k</mml:mi><mml:mo>]</mml:mo></mml:mrow></mml:mrow><mml:mo>,</mml:mo><mml:mrow><mml:mi>y</mml:mi><mml:mo>&#x2062;</mml:mo><mml:mrow><mml:mo>[</mml:mo><mml:mi>k</mml:mi><mml:mo>]</mml:mo></mml:mrow></mml:mrow></mml:mrow><mml:mo>&#x2208;</mml:mo><mml:mrow><mml:mrow><mml:mo>{</mml:mo><mml:mn>0</mml:mn><mml:mo>,</mml:mo><mml:mn>1</mml:mn><mml:mo rspace="7.5pt">}</mml:mo></mml:mrow><mml:mo>&#x2062;</mml:mo><mml:mrow><mml:mo rspace="7.5pt">&#x2200;</mml:mo><mml:mi>k</mml:mi></mml:mrow></mml:mrow><mml:mo>&#x2208;</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:mn>0</mml:mn><mml:mo>,</mml:mo><mml:mn>&#x2005;1</mml:mn><mml:mo>,</mml:mo><mml:mrow><mml:mrow><mml:mi mathvariant="normal">&#x2026;</mml:mi><mml:mo>&#x2062;</mml:mo><mml:mfrac><mml:msub><mml:mi>N</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mi>R</mml:mi></mml:mfrac></mml:mrow><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mo>}</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula> with 0 marking a rest state and 1 an action state. A target lead of 125 ms was also introduced (<xref ref-type="bibr" rid="B5">Benabid et al., 2019</xref>). It is common practice to predict the target a few decoder update steps (in this case, two update steps) in advance to compensate for potential latencies introduced by processing, communication or even stimulator ramp-up (<xref ref-type="bibr" rid="B56">Tarvainen et al., 2004</xref>; <xref ref-type="bibr" rid="B21">Gruenwald et al., 2017</xref>; <xref ref-type="bibr" rid="B5">Benabid et al., 2019</xref>). Finally, 10% of the length of each recording was set aside for testing after tuning.</p>
<table-wrap position="float" id="T1">
<label>TABLE 1</label>
<caption><p>Participant details, including DBS electrode channels available for recording and laterality.</p></caption>
<table cellspacing="5" cellpadding="5" frame="box" rules="all">
<thead>
<tr>
<td valign="top" align="left" style="color:#ffffff;background-color: #7f8080;">Participant ID</td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;">PD01R</td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;">PD02L</td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;">PD02R</td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;">PD03L</td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;">PD04L</td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;">PD05L</td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;">PD05R</td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;">PD06L</td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;">PD06R</td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;">Mean &#x00B1; SD</td>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left">Contralateral channels</td>
<td valign="top" align="center">4</td>
<td valign="top" align="center">4</td>
<td valign="top" align="center">3</td>
<td valign="top" align="center">4</td>
<td valign="top" align="center">4</td>
<td valign="top" align="center">4</td>
<td valign="top" align="center">4</td>
<td valign="top" align="center">4</td>
<td valign="top" align="center">2</td>
<td valign="top" align="center">4</td>
</tr>
<tr>
<td valign="top" align="left">Ipsilateral channels</td>
<td valign="top" align="center">4</td>
<td valign="top" align="center">3</td>
<td valign="top" align="center">4</td>
<td valign="top" align="center">0</td>
<td valign="top" align="center">4</td>
<td valign="top" align="center">4</td>
<td valign="top" align="center">4</td>
<td valign="top" align="center">2</td>
<td valign="top" align="center">4</td>
<td valign="top" align="center">3</td>
</tr>
<tr>
<td valign="top" align="left">Number of trials</td>
<td valign="top" align="center">26</td>
<td valign="top" align="center">22</td>
<td valign="top" align="center">24</td>
<td valign="top" align="center">21</td>
<td valign="top" align="center">20</td>
<td valign="top" align="center">34</td>
<td valign="top" align="center">34</td>
<td valign="top" align="center">49</td>
<td valign="top" align="center">40</td>
<td valign="top" align="center">30 &#x00B1; 9</td>
</tr>
<tr>
<td valign="top" align="left">Recording duration (s)</td>
<td valign="top" align="center">383</td>
<td valign="top" align="center">337</td>
<td valign="top" align="center">335</td>
<td valign="top" align="center">240</td>
<td valign="top" align="center">257</td>
<td valign="top" align="center">512</td>
<td valign="top" align="center">453</td>
<td valign="top" align="center">553</td>
<td valign="top" align="center">530</td>
<td valign="top" align="center">402 &#x00B1; 105</td>
</tr>
<tr>
<td valign="top" align="left">Grip duration (mean &#x00B1; SD, s)</td>
<td valign="top" align="center">2.95 &#x00B1; 0.64</td>
<td valign="top" align="center">5.37 &#x00B1; 0.19</td>
<td valign="top" align="center">5.28 &#x00B1; 0.67</td>
<td valign="top" align="center">5.95 &#x00B1; 1.54</td>
<td valign="top" align="center">3.25 &#x00B1; 0.16</td>
<td valign="top" align="center">5.10 &#x00B1; 1.33</td>
<td valign="top" align="center">3.61 &#x00B1; 0.91</td>
<td valign="top" align="center">3.30 &#x00B1; 1.72</td>
<td valign="top" align="center">3.79 &#x00B1; 1.34</td>
<td valign="top" align="center">4.1 &#x00B1; 1.4</td>
</tr>
<tr>
<td valign="top" align="left">Ratio of grip to rest (%)</td>
<td valign="top" align="center">20</td>
<td valign="top" align="center">35</td>
<td valign="top" align="center">33</td>
<td valign="top" align="center">49</td>
<td valign="top" align="center">25</td>
<td valign="top" align="center">34</td>
<td valign="top" align="center">27</td>
<td valign="top" align="center">29</td>
<td valign="top" align="center">30</td>
<td valign="top" align="center">31 &#x00B1; 7</td>
</tr>
<tr>
<td valign="top" align="left">Grip level ratio (mean &#x00B1; SD, %)</td>
<td valign="top" align="center">33 &#x00B1; 19</td>
<td valign="top" align="center">0.82 &#x00B1; 12</td>
<td valign="top" align="center">68 &#x00B1; 15</td>
<td valign="top" align="center">69 &#x00B1; 17</td>
<td valign="top" align="center">55 &#x00B1; 28</td>
<td valign="top" align="center">37 &#x00B1; 26</td>
<td valign="top" align="center">29 &#x00B1; 21</td>
<td valign="top" align="center">39 &#x00B1; 24</td>
<td valign="top" align="center">44 &#x00B1; 28</td>
<td valign="top" align="center">47 &#x00B1; 27</td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<fn><p>PD denominates Parkinson&#x2019;s disease, L indicates that participant used their left hand to execute an isometric grip action. R indicates their right hand. A trial consists of a single isometric grip action including onset, holding, and relaxation stages. Grip duration is the time from the beginning of the action to its end averaged across trials. Grip ratio indicates the class balance of action vs. rest time points for every dataset. Grip level ratio is the trial peak force relative to the maximum force exerted in the recording averaged across trials.</p></fn>
</table-wrap-foot>
</table-wrap>
<fig id="F3" position="float">
<label>FIGURE 3</label>
<caption><p>Flow diagram illustrating the feature extraction and detection processes in time, using, in this instance, 250 ms long extraction and feature epoch windows. The target label <italic>y</italic> is first shifted forward by a lead time of 125 ms. The classifier is thus trained to make prediction two update steps ahead. Features are extracted from <italic>x</italic> using a first moving window. They then accumulate in a feature vector <italic>X</italic> using a second moving window The classifier produces a probability signal <italic>p</italic>. The predicted state <inline-formula><mml:math id="INEQ21"><mml:mover accent="true"><mml:mi>y</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover></mml:math></inline-formula> alters when <italic>p</italic> triggers the double threshold scheme.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fnhum-17-1111590-g003.tif"/>
</fig>
</sec>
<sec id="S2.SS2">
<title>2.2. Feature extraction</title>
<p>Five different frequency-domain and real-time extraction methods, including a bank of infinite impulse response (IIR) band-pass filters, a short-time Fourier transform (STFT), a recursive wavelet transform (RWT), a parameterized discrete wavelet transform (DWT), an adaptive auto-regressive moving average (ARMA) filter, based method, were implemented.</p>
<p>Filter banks have been proposed as a computationally efficient solution to extract standard electrophysiological sub-bands (<xref ref-type="bibr" rid="B66">Zhu et al., 2020</xref>). The method proposed by <xref ref-type="bibr" rid="B21">Gruenwald et al. (2017)</xref> was followed to construct a bank of fourth-order IIR Butterworth filters. The frequency band were defined as &#x03B8; (1&#x2013;8 Hz), &#x03B1; (8&#x2013;12 Hz), &#x03B2; (12&#x2013;32 Hz), &#x03B3;<sub>1</sub> (32&#x2013;50 Hz), &#x03B3;<sub>2</sub> (50&#x2013;100 Hz), &#x03B3;<sub>3</sub> (100&#x2013;256 Hz), leading to a total of <italic>N</italic><sub><italic>b</italic></sub> frequency bands. The power of each sub-band <inline-formula><mml:math id="INEQ13"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>p</mml:mi></mml:msub><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mi>&#x211D;</mml:mi><mml:mrow><mml:mpadded width="+3.3pt"><mml:mfrac><mml:msub><mml:mi>N</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mi>R</mml:mi></mml:mfrac></mml:mpadded><mml:mo rspace="5.8pt">&#x00D7;</mml:mo><mml:mpadded width="+3.3pt"><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mo>&#x2062;</mml:mo><mml:mi>h</mml:mi></mml:mrow></mml:msub></mml:mpadded><mml:mo rspace="5.8pt">&#x00D7;</mml:mo><mml:msub><mml:mi>N</mml:mi><mml:mi>b</mml:mi></mml:msub></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> was estimated from the signal by measuring the variance of the sub-signals on a window length <italic>L</italic> and strides <italic>R</italic>. <italic>L</italic> was defined as a multiple of <italic>R</italic> such that:</p>
<disp-formula id="S2.E1">
<label>(1)</label>
<mml:math id="M1">
<mml:mrow>
<mml:mpadded width="+3.3pt">
<mml:mi>L</mml:mi>
</mml:mpadded>
<mml:mo rspace="5.8pt">=</mml:mo>
<mml:mrow>
<mml:mi>R</mml:mi>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>n</mml:mi>
<mml:mi>o</mml:mi>
</mml:msub>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:mrow>
</mml:math>
</disp-formula>
<p>where <italic>n</italic><sub><italic>o</italic></sub> is the window overlap number. A maximum <italic>L</italic> of 250 ms was allowed as in <xref ref-type="bibr" rid="B14">Flint et al. (2012)</xref>, such that <italic>n</italic><sub><italic>o</italic></sub> &#x2208; &#x27E6;0; 3&#x27E7;.</p>
<p>Secondly, the STFT is a reference time-frequency estimation method used in previous STN-LFP decoding studies (<xref ref-type="bibr" rid="B3">Bakstein et al., 2012</xref>; <xref ref-type="bibr" rid="B28">Hirschmann et al., 2017</xref>; <xref ref-type="bibr" rid="B49">Shah et al., 2018</xref>). The same epoching parameterization was used and the Kaiser window was chosen to parameterize the window shape through a single parameter &#x03B2;<sub><italic>K</italic></sub> &#x2208; [0;15]. The STFT yielded a complete time-frequency transformation <inline-formula><mml:math id="INEQ16"><mml:mrow><mml:mi mathvariant="normal">&#x03C7;</mml:mi><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mi>&#x2102;</mml:mi><mml:mrow><mml:mpadded width="+3.3pt"><mml:mfrac><mml:msub><mml:mi>N</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mi>R</mml:mi></mml:mfrac></mml:mpadded><mml:mo rspace="5.8pt">&#x00D7;</mml:mo><mml:mpadded width="+3.3pt"><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mo>&#x2062;</mml:mo><mml:mi>h</mml:mi></mml:mrow></mml:msub></mml:mpadded><mml:mo rspace="5.8pt">&#x00D7;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mfrac><mml:mi>L</mml:mi><mml:mn>2</mml:mn></mml:mfrac><mml:mo>+</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> of <italic>x</italic>. The same <italic>N</italic><sub><italic>b</italic></sub> sub-bands were extracted by averaging the correct frequency bins following the power operator &#x03C7;[<italic>k</italic>,<italic>l</italic>,<italic>n</italic>]&#x03C7;&#x002A;[<italic>k</italic>,<italic>l</italic>,<italic>n</italic>] to obtain <italic>x</italic><sub><italic>p</italic></sub>. A drawback of the STFT is that the resolution of the transform is directly dependent on <italic>L</italic>. With a small number of or no overlaps, narrower lower bands are thus not properly represented (in particular &#x03B1;) and not included as features.</p>
<p>This problem is typically addressed by opting for the continuous wavelet transform (CWT) instead. In addition to better capturing non-stationary signal behaviors, the CWT allows for multi-resolution signal analysis. The Morlet wavelet in particular is predominantly used in the field and thus is also regularly employed in decoder architectures (<xref ref-type="bibr" rid="B4">Bashashati et al., 2016</xref>; <xref ref-type="bibr" rid="B52">Tan et al., 2019</xref>; <xref ref-type="bibr" rid="B16">Golshan et al., 2020</xref>). To reduce the computational cost and latency of the CWT, <xref ref-type="bibr" rid="B42">Ren and Kezunovic (2010)</xref> proposed a complex sinusoid wavelet function, &#x03C8;, shaped with an asymmetric fifth-order polynomial envelope:</p>
<disp-formula id="S2.E2">
<label>(2)</label>
<mml:math id="M2">
<mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x03C8;</mml:mi>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo rspace="5.8pt">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo rspace="5.8pt">=</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:mo>-</mml:mo>
<mml:mrow>
<mml:mfrac>
<mml:mn>8</mml:mn>
<mml:mrow>
<mml:mn>9</mml:mn>
<mml:mo>&#x2062;</mml:mo>
<mml:msqrt>
<mml:mn>3</mml:mn>
</mml:msqrt>
</mml:mrow>
</mml:mfrac>
<mml:mo>&#x2062;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi mathvariant="normal">&#x03C0;</mml:mi>
<mml:mo>&#x2062;</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mn>3</mml:mn>
</mml:msup>
</mml:mrow>
</mml:mrow>
<mml:mo>-</mml:mo>
<mml:mrow>
<mml:mfrac>
<mml:mn>8</mml:mn>
<mml:mn>27</mml:mn>
</mml:mfrac>
<mml:mo>&#x2062;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi mathvariant="normal">&#x03C0;</mml:mi>
<mml:mo>&#x2062;</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mn>4</mml:mn>
</mml:msup>
</mml:mrow>
<mml:mo>-</mml:mo>
<mml:mrow>
<mml:mfrac>
<mml:mn>32</mml:mn>
<mml:mrow>
<mml:mn>135</mml:mn>
<mml:mo>&#x2062;</mml:mo>
<mml:msqrt>
<mml:mn>3</mml:mn>
</mml:msqrt>
</mml:mrow>
</mml:mfrac>
<mml:mo>&#x2062;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi mathvariant="normal">&#x03C0;</mml:mi>
<mml:mo>&#x2062;</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mn>5</mml:mn>
</mml:msup>
</mml:mrow>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>&#x2062;</mml:mo>
<mml:msup>
<mml:mi>e</mml:mi>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mo>&#x2062;</mml:mo>
<mml:mi mathvariant="normal">&#x03C0;</mml:mi>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mfrac>
<mml:mn>1</mml:mn>
<mml:msqrt>
<mml:mn>3</mml:mn>
</mml:msqrt>
</mml:mfrac>
<mml:mo>+</mml:mo>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>&#x2062;</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mrow>
</mml:math>
</disp-formula>
<p><xref ref-type="bibr" rid="B42">Ren and Kezunovic (2010)</xref> demonstrated that the CWT with &#x03C8; can be recursively expressed. This RWT approach was implemented as a complex IIR filter bank. Each filter projected the signal on a wavelet basis. Four wavelets were used per octave between 1 and 256 Hz, or a total of 32 filters, yielding a time-frequency transformation &#x03C7; &#x2208; &#x2102;<sup><italic>N</italic><sub><italic>k</italic></sub>&#x00D7;<italic>N</italic><sub><italic>ch</italic></sub>&#x00D7;32</sup>. The power array <inline-formula><mml:math id="INEQ19"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>p</mml:mi></mml:msub><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mi>&#x211D;</mml:mi><mml:mrow><mml:mpadded width="+3.3pt"><mml:mfrac><mml:msub><mml:mi>N</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mi>R</mml:mi></mml:mfrac></mml:mpadded><mml:mo rspace="5.8pt">&#x00D7;</mml:mo><mml:mpadded width="+3.3pt"><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mo>&#x2062;</mml:mo><mml:mi>h</mml:mi></mml:mrow></mml:msub></mml:mpadded><mml:mo rspace="5.8pt">&#x00D7;</mml:mo><mml:msub><mml:mi>N</mml:mi><mml:mi>b</mml:mi></mml:msub></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> was obtained after a power operation and application of epoch averages on &#x03C7;.</p>
<p>Moreover, the more common alternative to the CWT is the DWT (<xref ref-type="bibr" rid="B3">Bakstein et al., 2012</xref>; <xref ref-type="bibr" rid="B35">Mamun et al., 2015</xref>; <xref ref-type="bibr" rid="B33">Luo et al., 2018</xref>). The DWT is implemented using small and efficient filter bank which samples discrete points in the CWT. The main design difficulty associated with the DWT is the choice of a mother wavelet &#x03C8; (<xref ref-type="bibr" rid="B35">Mamun et al., 2015</xref>; <xref ref-type="bibr" rid="B33">Luo et al., 2018</xref>). <xref ref-type="bibr" rid="B13">Farina et al. (2007)</xref> proposed using the parameterized lattice realization of the quadrature mirror filter to shape the mother wavelet to neural signals which in turn helped increase decoding performance. Each node in the DWT decomposition tree was constructed using a three-tap filter. The quadrature mirror filter split a signal <italic>x</italic> into low <italic>x</italic><sub><italic>g</italic></sub> and high <italic>x</italic><sub><italic>h</italic></sub> components through two rotations <inline-formula><mml:math id="INEQ22"><mml:mrow><mml:mrow><mml:msub><mml:mi mathvariant="normal">&#x03B8;</mml:mi><mml:mn>1</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="normal">&#x03B8;</mml:mi><mml:mn>2</mml:mn></mml:msub></mml:mrow><mml:mo>&#x2208;</mml:mo><mml:mrow><mml:mo>]</mml:mo><mml:mfrac><mml:mi mathvariant="normal">&#x03C0;</mml:mi><mml:mn>2</mml:mn></mml:mfrac><mml:mo>;</mml:mo><mml:mrow><mml:mo>-</mml:mo><mml:mfrac><mml:mi mathvariant="normal">&#x03C0;</mml:mi><mml:mn>2</mml:mn></mml:mfrac></mml:mrow><mml:mo>[</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula> (<xref ref-type="bibr" rid="B58">Vaidyanathan, 1993</xref>; <xref ref-type="bibr" rid="B13">Farina et al., 2007</xref>). To match <italic>f</italic><sub><italic>o</italic></sub>, <italic>N</italic><sub><italic>l</italic></sub> = <italic>log</italic><sub>2</sub>&#x2061;(<italic>R</italic>) levels were required. The decomposition tree recursively filtered <italic>x</italic><sub><italic>g</italic></sub> at each level <italic>l</italic>, resulting in a set of wavelet coefficients <inline-formula><mml:math id="INEQ24"><mml:mrow><mml:mpadded width="+3.3pt"><mml:msub><mml:mi>S</mml:mi><mml:mi>c</mml:mi></mml:msub></mml:mpadded><mml:mo rspace="5.8pt">=</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:msubsup><mml:mi>x</mml:mi><mml:mi>h</mml:mi><mml:mn>1</mml:mn></mml:msubsup><mml:mo>,</mml:mo><mml:msubsup><mml:mi>x</mml:mi><mml:mi>h</mml:mi><mml:mn>2</mml:mn></mml:msubsup><mml:mo>,</mml:mo><mml:mrow><mml:mi mathvariant="normal">&#x2026;</mml:mi><mml:mo>&#x2062;</mml:mo><mml:msubsup><mml:mi>x</mml:mi><mml:mi>h</mml:mi><mml:mi>l</mml:mi></mml:msubsup></mml:mrow><mml:mo>,</mml:mo><mml:mrow><mml:mi mathvariant="normal">&#x2026;</mml:mi><mml:mo>&#x2062;</mml:mo><mml:msubsup><mml:mi>x</mml:mi><mml:mi>h</mml:mi><mml:msub><mml:mi>N</mml:mi><mml:mi>l</mml:mi></mml:msub></mml:msubsup></mml:mrow><mml:mo>,</mml:mo><mml:mpadded width="+5pt"><mml:msubsup><mml:mi>x</mml:mi><mml:mi>g</mml:mi><mml:msub><mml:mi>N</mml:mi><mml:mi>l</mml:mi></mml:msub></mml:msubsup></mml:mpadded><mml:mo>}</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula>. The power array <inline-formula><mml:math id="INEQ25"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>p</mml:mi></mml:msub><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mi>&#x211D;</mml:mi><mml:mrow><mml:mpadded width="+3.3pt"><mml:mfrac><mml:msub><mml:mi>N</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mi>R</mml:mi></mml:mfrac></mml:mpadded><mml:mo rspace="5.8pt">&#x00D7;</mml:mo><mml:mpadded width="+3.3pt"><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mo>&#x2062;</mml:mo><mml:mi>h</mml:mi></mml:mrow></mml:msub></mml:mpadded><mml:mo rspace="5.8pt">&#x00D7;</mml:mo><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mi>l</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> was assembled by epoching each coefficient of <italic>S</italic><sub><italic>c</italic></sub> with a matching stride <inline-formula><mml:math id="INEQ26"><mml:mrow><mml:mpadded width="+3.3pt"><mml:msub><mml:mi>R</mml:mi><mml:mi>l</mml:mi></mml:msub></mml:mpadded><mml:mo rspace="5.8pt">=</mml:mo><mml:mfrac><mml:mi>R</mml:mi><mml:msup><mml:mn>2</mml:mn><mml:mi>l</mml:mi></mml:msup></mml:mfrac></mml:mrow></mml:math></inline-formula>, length <italic>L</italic><sub><italic>l</italic></sub>, and computing the sum of squares.</p>
<p>Last, a parametric modeling and spectral estimation methods have been regularly used in STN-LFP (<xref ref-type="bibr" rid="B15">Foffani et al., 2005</xref>; <xref ref-type="bibr" rid="B35">Mamun et al., 2015</xref>; <xref ref-type="bibr" rid="B49">Shah et al., 2018</xref>) and other neural decoders (<xref ref-type="bibr" rid="B12">Chisci et al., 2010</xref>). The recursive-least-square ARMA scheme proposed by <xref ref-type="bibr" rid="B56">Tarvainen et al. (2004)</xref> was here investigated. The algorithm extracted the ARMA coefficients <italic>x</italic><sub><italic>c</italic></sub> &#x2208; &#x211D;<sup><italic>N</italic><sub><italic>k</italic></sub>&#x00D7;<italic>N</italic><sub><italic>ch</italic></sub>&#x00D7;(<italic>N</italic><sub><italic>AR</italic></sub> + <italic>N</italic><sub><italic>MA</italic></sub>)</sup> from <italic>x</italic>. <italic>N</italic><sub><italic>AR</italic></sub> &#x2208; &#x27E6;1, 12&#x27E7;,<italic>N</italic><sub><italic>MA</italic></sub> &#x2208; &#x27E6;0, 6&#x27E7; are the number of auto-regressive and moving average coefficients, respectively (<xref ref-type="bibr" rid="B56">Tarvainen et al., 2004</xref>). <italic>x</italic><sub><italic>c</italic></sub> was updated using a forgetting factor &#x03BB; &#x2208;]0,1[. Epoching served to average and downsample <italic>x</italic><sub><italic>c</italic></sub> before estimating of the power spectrum (<xref ref-type="bibr" rid="B56">Tarvainen et al., 2004</xref>). The spectrum was partitioned into <italic>N</italic><sub><italic>b</italic></sub> bands to obtain <italic>x</italic><sub><italic>p</italic></sub>.</p>
<p>In addition, the usage of Hjorth (HJ) parameters (activity, mobility, and complexity) (<xref ref-type="bibr" rid="B49">Shah et al., 2018</xref>; <xref ref-type="bibr" rid="B66">Zhu et al., 2020</xref>; <xref ref-type="bibr" rid="B24">He et al., 2021</xref>) was investigated. The signal first, <italic>x</italic><sub><italic>d</italic></sub>, and second derivatives were estimated using discrete differences. The parameters, <italic>h</italic><sub><italic>1</italic></sub>, <italic>h</italic><sub>2</sub>, and <italic>h</italic><sub><italic>3</italic></sub>, were then computed by taking the following the signal variance on epochs of length <italic>L</italic> and stride <italic>R</italic>:</p>
<disp-formula id="S2.E3">
<label>(3)</label>
<mml:math id="M3">
<mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mi>h</mml:mi>
<mml:mn>1</mml:mn>
</mml:msub>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo rspace="5.8pt" stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo rspace="5.8pt">=</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mtext>Var</mml:mtext>
<mml:mrow>
<mml:mtext>LR</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:mrow>
</mml:math>
</disp-formula>
<disp-formula id="S2.E4">
<label>(4)</label>
<mml:math id="M4">
<mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mi>h</mml:mi>
<mml:mn>2</mml:mn>
</mml:msub>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo rspace="5.8pt" stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo rspace="5.8pt">=</mml:mo>
<mml:msqrt>
<mml:mfrac>
<mml:mrow>
<mml:msub>
<mml:mtext>Var</mml:mtext>
<mml:mrow>
<mml:mtext>LR</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mtext>Var</mml:mtext>
<mml:mrow>
<mml:mtext>LR</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>d</mml:mi>
</mml:msub>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:mfrac>
</mml:msqrt>
</mml:mrow>
</mml:math>
</disp-formula>
<disp-formula id="S2.E5">
<label>(5)</label>
<mml:math id="M5">
<mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mi>h</mml:mi>
<mml:mn>3</mml:mn>
</mml:msub>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo rspace="5.8pt" stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo rspace="5.8pt">=</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msub>
<mml:mi>h</mml:mi>
<mml:mn>2</mml:mn>
</mml:msub>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>d</mml:mi>
</mml:msub>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mi>h</mml:mi>
<mml:mn>2</mml:mn>
</mml:msub>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:math>
</disp-formula>
<p>where Var<sub>LR</sub> is the epoch-variance operator. Hjorth parameters indirectly capture some characteristics of the signal spectrum through the time domain (<xref ref-type="bibr" rid="B29">Hjorth, 1970</xref>). Compared to most other time-frequency methods, HJ parameters are inexpensive to compute, making them desirable for real-time applications (<xref ref-type="bibr" rid="B66">Zhu et al., 2020</xref>; <xref ref-type="bibr" rid="B24">He et al., 2021</xref>).</p>
<p>A computational benchmark was conducted for every feature extraction method by measuring the time taken to extract features from a fix length (100 s) random signal and estimating the time taken to process a signal block of size <italic>R</italic>. Under real-time constraints, such a block is needed to update the decoder at a rate <italic>f</italic><sub><italic>o</italic></sub>. The computational time, thus, needs to be inferior to 1/<italic>f</italic><sub><italic>o</italic></sub> (or 62.5 ms). The SciPy implementation (<xref ref-type="bibr" rid="B59">Virtanen et al., 2019</xref>) of the STFT algorithm was used partly to serve as a reference, partly because it is well-optimized and uses the fast-Fourier transform algorithm. Given the relatively large size of the extraction windows, a direct filter implementation would have been inefficient. Aside from the STFT, all extractors were implemented using the NumPy library (<xref ref-type="bibr" rid="B23">Harris et al., 2020</xref>). In every extractor, every filter was recursively updated at each time step to imitate real-time conditions. When implementing the step update, the well-optimized multi-dimensional array operation capabilities of NumPy (<xref ref-type="bibr" rid="B23">Harris et al., 2020</xref>) were carefully considered.</p>
</sec>
<sec id="S2.SS3">
<title>2.3. Channel selection and feature window</title>
<p>From a real-time deployment perspective, it could be costly to carry signal acquisition on all channels, extract all features and only select a sub-set for decoding. Instead, a channel selection approach was chosen whereby channels can be de-activated if non-selected. Channels were selected based on the cumulated mutual information (MI) of their extracted features in relation to the decoded target. Given <italic>x</italic><sub><italic>p</italic></sub> and <italic>y</italic>, the average information content <inline-formula><mml:math id="INEQ65"><mml:mover accent="true"><mml:mrow><mml:mi>M</mml:mi><mml:mo>&#x2062;</mml:mo><mml:mi>I</mml:mi></mml:mrow><mml:mo>&#x00AF;</mml:mo></mml:mover></mml:math></inline-formula> of the <italic>l<sup>th</sup></italic> channel was defined as:</p>
<disp-formula id="S2.E6">
<label>(6)</label>
<mml:math id="M6">
<mml:mrow>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>M</mml:mi>
<mml:mo>&#x2062;</mml:mo>
<mml:mi>I</mml:mi>
</mml:mrow>
<mml:mo>&#x00AF;</mml:mo>
</mml:mover>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mo>[</mml:mo>
<mml:mi>l</mml:mi>
<mml:mo rspace="5.8pt">]</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo rspace="5.8pt">=</mml:mo>
<mml:mrow>
<mml:mfrac>
<mml:mn>1</mml:mn>
<mml:msub>
<mml:mi>N</mml:mi>
<mml:mi>i</mml:mi>
</mml:msub>
</mml:mfrac>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:munderover>
<mml:mo largeop="true" movablelimits="false" symmetric="true">&#x2211;</mml:mo>
<mml:mrow>
<mml:mpadded width="+3.3pt">
<mml:mi>i</mml:mi>
</mml:mpadded>
<mml:mo rspace="5.8pt">=</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mi>N</mml:mi>
<mml:mi>i</mml:mi>
</mml:msub>
<mml:mo>-</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:munderover>
<mml:mrow>
<mml:mi>M</mml:mi>
<mml:mo>&#x2062;</mml:mo>
<mml:mi>I</mml:mi>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mi>k</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>l</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
<mml:mo stretchy="false">]</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:mrow>
</mml:mrow>
</mml:mrow>
</mml:math>
</disp-formula>
<p>where <italic>MI</italic> is the mutual information operator (<xref ref-type="bibr" rid="B40">Pedregosa et al., 2011</xref>; <xref ref-type="bibr" rid="B44">Ross, 2014</xref>), <italic>N</italic><sub><italic>i</italic></sub> is the total number of features for each channel, so either <italic>N</italic><sub><italic>b</italic></sub>, <italic>N</italic><sub><italic>l</italic></sub> + 1 (if DWT is used) or 3 (if HJ is used), and <italic>l</italic> is the channel index. <inline-formula><mml:math id="INEQ68"><mml:mover accent="true"><mml:mrow><mml:mi>M</mml:mi><mml:mo>&#x2062;</mml:mo><mml:mi>I</mml:mi></mml:mrow><mml:mo>&#x00AF;</mml:mo></mml:mover></mml:math></inline-formula> was sorted in descending order. <italic>N</italic><sub><italic>c</italic></sub> &#x2208; &#x27E6;1,<italic>N</italic><sub><italic>ch</italic></sub>&#x27E7; top ranked channels were selected. Features of the selected channels were further processed by applying a logarithm transform, normalization, and further smoothing using the feature-wise Kalman filter proposed by <xref ref-type="bibr" rid="B21">Gruenwald et al. (2017)</xref> (except for the ARMA extractor, where it could be adjusted through &#x03BB;). The feature matrix <inline-formula><mml:math id="INEQ70"><mml:mrow><mml:mi>X</mml:mi><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mi>&#x211D;</mml:mi><mml:mrow><mml:mpadded width="+3.3pt"><mml:mfrac><mml:msub><mml:mi>N</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mi>R</mml:mi></mml:mfrac></mml:mpadded><mml:mo rspace="5.8pt">&#x00D7;</mml:mo><mml:msub><mml:mi>N</mml:mi><mml:mi>f</mml:mi></mml:msub></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula>, with <inline-formula><mml:math id="INEQ71"><mml:mrow><mml:mpadded width="+3.3pt"><mml:msub><mml:mi>N</mml:mi><mml:mi>f</mml:mi></mml:msub></mml:mpadded><mml:mo rspace="5.8pt">=</mml:mo><mml:mrow><mml:mmultiscripts><mml:mi>N</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mo>&#x2062;</mml:mo><mml:mi>N</mml:mi></mml:mrow><mml:none/><mml:mi>w</mml:mi><mml:none/></mml:mmultiscripts><mml:mo>&#x2062;</mml:mo><mml:msub><mml:mi>N</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mrow></mml:math></inline-formula>, was assembled by flattening all the channels and bands (or coefficients in the DWT case, or parameters in the HJ case) dimensions and concatenating <italic>N</italic><sub><italic>w</italic></sub> &#x2208; &#x27E6;0; 15&#x27E7; past time points to form a moving window of features (or a maximum length of 1 s) (<xref ref-type="bibr" rid="B14">Flint et al., 2012</xref>; <xref ref-type="bibr" rid="B49">Shah et al., 2018</xref>; <xref ref-type="bibr" rid="B52">Tan et al., 2019</xref>; <xref ref-type="bibr" rid="B24">He et al., 2021</xref>). The feature and label pair (<italic>X</italic>,<italic>y</italic>) were under-sampled according to repeated-edited-nearest-neighbors method to create a more balanced training set before classifier fitting (<xref ref-type="bibr" rid="B57">Tomek, 1976</xref>; <xref ref-type="bibr" rid="B31">Lema&#x00EE;tre et al., 2017</xref>).</p>
<p>Furthermore, the parameters <italic>n</italic><sub><italic>o</italic></sub>, <italic>N</italic><sub><italic>c</italic></sub> and <italic>N</italic><sub><italic>w</italic></sub> controlled the total decoder window &#x03C4;<sub><italic>d</italic></sub> (<xref ref-type="fig" rid="F3">Figure 3</xref>) and the total number of features <italic>N</italic><sub><italic>f</italic></sub>. These two metrics were used to evaluate the complexity of the resulting decoder. A decoder with a smaller &#x03C4;<sub><italic>d</italic></sub> established more temporally located relationships between neural features and the decoded state. Practically, decoder with longer &#x03C4;<sub><italic>d</italic></sub> required more memory to store past signal epochs for extraction and past feature epochs for state estimation. Likewise, <italic>N</italic><sub><italic>f</italic></sub> also directly influenced memory storage and, more importantly, the computational cost of updating the state estimator. Tuning <italic>N</italic><sub><italic>c</italic></sub> and <italic>N</italic><sub><italic>w</italic></sub> also acted as a form of feature selection, which could help reduce model complexity.</p>
</sec>
<sec id="S2.SS4">
<title>2.4. State estimator and objective function for detection</title>
<p>Four different classifiers retained from <xref ref-type="bibr" rid="B24">He et al. (2021)</xref> were tested to estimate <italic>y</italic> from <italic>X</italic>: (1) the Gaussian Na&#x00EF;ve Bayes (NB) classifier was chosen for its lack of tuning parameters (<xref ref-type="bibr" rid="B35">Mamun et al., 2015</xref>). The NB served as a special case to evaluated if decoder parameters (e.g., <italic>n</italic><sub><italic>o</italic></sub>, <italic>N</italic><sub><italic>c</italic></sub>, or <italic>N</italic><sub><italic>w</italic></sub>) other than fitting regularization constants could be leveraged to increase performance. (2) The linear-discriminant analysis (LDA) classifier has been shown to deliver good decoding performance (<xref ref-type="bibr" rid="B14">Flint et al., 2012</xref>; <xref ref-type="bibr" rid="B22">Gruenwald et al., 2019</xref>). A shrinkage parameter &#x03B3;<sub><italic>c</italic></sub> &#x2208; [0,1] was used to regularize the covariance estimation of <italic>X</italic>. (3) Logistic regression (LR) has successfully been applied to STN-LFPs decoding (<xref ref-type="bibr" rid="B48">Shah et al., 2016</xref>; <xref ref-type="bibr" rid="B52">Tan et al., 2019</xref>; <xref ref-type="bibr" rid="B24">He et al., 2021</xref>), particularly for sparse model fitting using<italic>L</italic><sub><italic>1</italic></sub>-norm regularization. The regularization was set through a parameter <italic>C</italic> &#x2208;]0,5]. Its setting acted in part as a form of feature selector. (4) Thanks to their versatile non-linear kernels, support vector machine (SVM) classifiers have been regularly employed for high-performance decoding (<xref ref-type="bibr" rid="B35">Mamun et al., 2015</xref>; <xref ref-type="bibr" rid="B18">Golshan et al., 2016</xref>, <xref ref-type="bibr" rid="B17">2018</xref>; <xref ref-type="bibr" rid="B37">Nandy et al., 2019</xref>; <xref ref-type="bibr" rid="B24">He et al., 2021</xref>). The radial-basis variant was chosen. It required a regulation and kernel parameter <italic>C</italic>,&#x03B3;<sub><italic>c</italic></sub> &#x2208;]0,5] (<xref ref-type="bibr" rid="B37">Nandy et al., 2019</xref>). Given the expandable nature of the feature space (of size <italic>N</italic><sub><italic>F</italic></sub>), the computational demand of the SVM fitting algorithm and the fact that decoder fitting occurred across full-length time-series at each BO iteration, principal component analysis (PCA) dimensionality reduction had to be introduced to compress <italic>X</italic> by a factor <italic>r</italic><sub><italic>c</italic></sub> &#x2208;]0,1] (<xref ref-type="bibr" rid="B17">Golshan et al., 2018</xref>). The maximum number of selected components was as well capped at 64. Once deployed, the computational cost of operating the NB, LDA, and LR scales with <italic>N</italic><sub><italic>f</italic></sub>. For the SVM, it also scales with the number of support vectors used by the classifier. Other non-linear methods such as simple decision trees and nearest-neighbor algorithm were not considered as they were found to be less performant (<xref ref-type="bibr" rid="B24">He et al., 2021</xref>). In all, a range of incrementally more sophisticated, and arguably more complicated to tune, classifiers was chosen.</p>
<p>Moreover, to denoise the output prediction of the classifier, a pair of thresholds operated as a transition trigger. Given the classifier probability <italic>p</italic>(<italic>y</italic> = 1)[<italic>k</italic>], the predicted state <inline-formula><mml:math id="INEQ82"><mml:mrow><mml:mover accent="true"><mml:mi>y</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover><mml:mo>&#x2062;</mml:mo><mml:mrow><mml:mo stretchy="false">[</mml:mo><mml:mi>k</mml:mi><mml:mo stretchy="false">]</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula> was given by:</p>
<disp-formula id="S2.E7">
<label>(7)</label>
<mml:math id="M7">
<mml:mrow>
<mml:mrow>
<mml:mover accent="true">
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">~</mml:mo>
</mml:mover>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mo>[</mml:mo>
<mml:mi>k</mml:mi>
<mml:mo rspace="5.8pt">]</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo rspace="5.8pt">=</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mtable columnspacing="5pt" displaystyle="true">
<mml:mtr>
<mml:mtd columnalign="center">
<mml:mtable displaystyle="true" rowspacing="0pt">
<mml:mtr>
<mml:mtd columnalign="center">
<mml:mrow>
<mml:mpadded width="+5pt">
<mml:mn>1</mml:mn>
</mml:mpadded>
<mml:mo>&#x2062;</mml:mo>
<mml:mtext>if</mml:mtext>
</mml:mrow>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="center">
<mml:mrow>
<mml:mpadded width="+5pt">
<mml:mn>0</mml:mn>
</mml:mpadded>
<mml:mo>&#x2062;</mml:mo>
<mml:mtext>if</mml:mtext>
</mml:mrow>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mtd>
<mml:mtd columnalign="center">
<mml:mtable displaystyle="true" rowspacing="0pt">
<mml:mtr>
<mml:mtd columnalign="center">
<mml:mrow>
<mml:mrow>
<mml:mpadded lspace="5pt" width="+5pt">
<mml:mi>p</mml:mi>
</mml:mpadded>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mo>[</mml:mo>
<mml:mi>k</mml:mi>
<mml:mo>]</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo>&#x003E;</mml:mo>
<mml:mi>T</mml:mi>
</mml:mrow>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="center">
<mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mo>[</mml:mo>
<mml:mi>k</mml:mi>
<mml:mo rspace="5.8pt">]</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo rspace="5.8pt">&lt;</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>-</mml:mo>
<mml:msub>
<mml:mi>r</mml:mi>
<mml:mi>T</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>&#x2062;</mml:mo>
<mml:mi>T</mml:mi>
</mml:mrow>
</mml:mrow>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mtd>
<mml:mtd columnalign="center">
<mml:mtable displaystyle="true" rowspacing="0pt">
<mml:mtr>
<mml:mtd columnalign="center">
<mml:mrow>
<mml:mrow>
<mml:mpadded width="+5pt">
<mml:mtext>and</mml:mtext>
</mml:mpadded>
<mml:mo>&#x2062;</mml:mo>
<mml:mover accent="true">
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">~</mml:mo>
</mml:mover>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mo>[</mml:mo>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>-</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mo rspace="5.8pt">]</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo rspace="5.8pt">=</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="center">
<mml:mrow>
<mml:mrow>
<mml:mpadded width="+5pt">
<mml:mtext>and</mml:mtext>
</mml:mpadded>
<mml:mo>&#x2062;</mml:mo>
<mml:mover accent="true">
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">~</mml:mo>
</mml:mover>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>-</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mo rspace="5.8pt" stretchy="false">]</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo rspace="5.8pt">=</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mtd>
</mml:mtr>
</mml:mtable>
<mml:mi/>
</mml:mrow>
</mml:mrow>
</mml:math>
</disp-formula>
<p>where <italic>T</italic> &#x2208; [0,1] is the upper threshold, and <italic>r</italic><sub><italic>T</italic></sub> &#x2208; [0,1] is the position of the lower threshold relative to <italic>T</italic>. Thresholds are typically set at the optimal point of the receiver operating characteristic (ROC) curves, balancing the sensitivity and specificity of a classifier. Unfortunately, this curve cannot be drawn for a dual-threshold system. Instead, the geometric mean <italic>g</italic> between sensitivity and specificity was chosen to estimate an optimal trade-off (<xref ref-type="bibr" rid="B8">Cai et al., 2010</xref>). Given the detection true-positive rate (TPR) and false-positive rate (FPR), <italic>g</italic> was given by:</p>
<disp-formula id="S2.E8">
<label>(8)</label>
<mml:math id="M8">
<mml:mrow>
<mml:mpadded width="+3.3pt">
<mml:mi>g</mml:mi>
</mml:mpadded>
<mml:mo rspace="5.8pt">=</mml:mo>
<mml:msqrt>
<mml:mrow>
<mml:mrow>
<mml:mi>T</mml:mi>
<mml:mo>&#x2062;</mml:mo>
<mml:mi>P</mml:mi>
<mml:mo>&#x2062;</mml:mo>
<mml:mi>R</mml:mi>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo>,</mml:mo>
<mml:mover accent="true">
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">~</mml:mo>
</mml:mover>
<mml:mo rspace="5.8pt">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo rspace="5.8pt">&#x00D7;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>-</mml:mo>
<mml:mrow>
<mml:mi>F</mml:mi>
<mml:mo>&#x2062;</mml:mo>
<mml:mi>P</mml:mi>
<mml:mo>&#x2062;</mml:mo>
<mml:mi>R</mml:mi>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo>,</mml:mo>
<mml:mover accent="true">
<mml:mi>y</mml:mi>
<mml:mo stretchy="false">~</mml:mo>
</mml:mover>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:msqrt>
</mml:mrow>
</mml:math>
</disp-formula>
<p>If <italic>TPR</italic> = 0, then <italic>g</italic> = 0. Likewise, if <italic>FPR</italic> = 1, then <italic>g</italic> = 0. Consequently, <italic>g</italic> only leans toward <italic>1</italic> if both objectives are balanced, thus avoiding the extreme situation where, for instance, the state-estimator only detects true positives or negatives. On a traditional ROC diagram, <italic>g</italic> would indicate a curve point sticking furthest toward TPR = 1 and <italic>FPR</italic> = 0. An eightfold cross-validation was employed to evaluate the average detection performance <inline-formula><mml:math id="INEQ91"><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover></mml:math></inline-formula>. The number of folds was chosen to be double that of the number of cores available on the processor (Intel<sup>&#x00AE;</sup> Core i7-7700K 4.20 GHz) to accelerate the evaluation of the folds through parallelization.</p>
</sec>
<sec id="S2.SS5">
<title>2.5. Decoder parameter tuning</title>
<p><xref ref-type="fig" rid="F1">Figure 1</xref> illustrates different parameters introduced in the different processing stages and, <xref ref-type="fig" rid="F2">Figure 2</xref> the BO procedure. BO was implemented to optimize <inline-formula><mml:math id="INEQ93"><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover></mml:math></inline-formula> using the scikit-optimize library (<xref ref-type="bibr" rid="B26">Head et al., 2021</xref>). The parameters formed a bounded search space <italic>S</italic> from which a parameter vector &#x03C1; &#x2208; <italic>S</italic> was sampled. To quantify the performance increase resulting from tuning, initial quantities, reflecting values typically found in other studies, formed a default parameter vector &#x03C1;<sub>0</sub>. A 3-tap Daubechies wavelet was used for the DWT by default (<xref ref-type="bibr" rid="B43">Rieder et al., 1998</xref>). A summary of all tuned parameter, search intervals and default values is given in <xref ref-type="table" rid="T2">Table 2</xref>. Given <inline-formula><mml:math id="INEQ96"><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover></mml:math></inline-formula> as a function of <italic>x</italic>, <italic>y</italic>, and &#x03C1;, the best parameters &#x03C1;&#x002A;were defined as:</p>
<disp-formula id="S2.E9">
<label>(9)</label>
<mml:math id="M9">
<mml:mrow>
<mml:mpadded width="+3.3pt">
<mml:msup>
<mml:mi mathvariant="normal">&#x03C1;</mml:mi>
<mml:mo>&#x002A;</mml:mo>
</mml:msup>
</mml:mpadded>
<mml:mo rspace="5.8pt">=</mml:mo>
<mml:mrow>
<mml:mi>arg</mml:mi>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mpadded width="+5pt">
<mml:munder>
<mml:mo movablelimits="false">max</mml:mo>
<mml:mrow>
<mml:mpadded width="+5pt">
<mml:mi mathvariant="normal">&#x03C1;</mml:mi>
</mml:mpadded>
<mml:mo rspace="7.5pt">&#x2208;</mml:mo>
<mml:mi>S</mml:mi>
</mml:mrow>
</mml:munder>
</mml:mpadded>
<mml:mrow>
<mml:mover accent="true">
<mml:mi>g</mml:mi>
<mml:mo>&#x00AF;</mml:mo>
</mml:mover>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi mathvariant="normal">&#x03C1;</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:mrow>
</mml:mrow>
</mml:mrow>
</mml:math>
</disp-formula>
<table-wrap position="float" id="T2">
<label>TABLE 2</label>
<caption><p>Summary of search space <italic>S</italic> and default vector &#x03C1;<sub>0</sub>.</p></caption>
<table cellspacing="5" cellpadding="5" frame="box" rules="all">
<thead>
<tr>
<td valign="top" align="left" style="color:#ffffff;background-color: #7f8080;">Pipeline</td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;"><italic>n</italic><sub><italic>o</italic></sub></td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;"><italic>N</italic><sub><italic>c</italic></sub></td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;"><italic>N</italic><sub><italic>w</italic></sub></td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;"><italic>T</italic></td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;"><italic>r</italic><sub><italic>t</italic></sub></td>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left"><italic>S</italic></td>
<td valign="top" align="center">&#x27E6;0; 3&#x27E7;</td>
<td valign="top" align="center">&#x27E6;1, <italic>N</italic><sub><italic>ch</italic></sub> &#x27E7;</td>
<td valign="top" align="center">&#x27E6;0; 15&#x27E7;</td>
<td valign="top" align="center">[0, 1]</td>
<td valign="top" align="center">[0, 1]</td>
</tr>
<tr>
<td valign="top" align="left">&#x03C1;<sub><italic>o</italic></sub></td>
<td valign="top" align="center">3</td>
<td valign="top" align="center">2</td>
<td valign="top" align="center">0</td>
<td valign="top" align="center">0.5</td>
<td valign="top" align="center">0</td>
</tr>
<tr>
<td valign="top" align="left" style="color:#ffffff;background-color: #7f8080;"><bold>Extractor</bold></td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;"><bold>STFT</bold></td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;"><bold>DWT</bold></td>
<td valign="top" align="center" colspan="3" style="color:#ffffff;background-color: #7f8080;"><bold>ARMA</bold></td>
</tr>
<tr>
<td valign="top" align="left" style="color:#ffffff;background-color: #7f8080;"></td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;"><bold>&#x03B2;<sub><italic>k</italic></sub></bold></td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;"><bold>&#x03B8;<sub>1</sub>,&#x03B8;<sub>2</sub></bold></td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;"><bold>&#x03BB;</bold></td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;"><bold><italic>N</italic><sub><italic>AR</italic></sub></bold></td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;"><bold><italic>N</italic><sub><italic>MA</italic></sub></bold></td>
</tr>
<tr>
<td valign="top" align="left"><italic>S</italic></td>
<td valign="top" align="center">[0;15]</td>
<td valign="top" align="center"><inline-formula><mml:math id="INEQ46"><mml:mrow><mml:mo>]</mml:mo><mml:mfrac><mml:mi mathvariant="normal">&#x03C0;</mml:mi><mml:mn>2</mml:mn></mml:mfrac><mml:mo>;</mml:mo><mml:mrow><mml:mo>-</mml:mo><mml:mfrac><mml:mi mathvariant="normal">&#x03C0;</mml:mi><mml:mn>2</mml:mn></mml:mfrac></mml:mrow><mml:mo>[</mml:mo></mml:mrow></mml:math></inline-formula></td>
<td valign="top" align="center">]0,1[</td>
<td valign="top" align="center">&#x27E6;1, 12&#x27E7;</td>
<td valign="top" align="center">&#x27E6;0, 6&#x27E7;</td>
</tr>
<tr>
<td valign="top" align="left">&#x03C1;<sub><italic>o</italic></sub></td>
<td valign="top" align="center">5</td>
<td valign="top" align="center">(0.50,&#x2212;0.105)</td>
<td valign="top" align="center">0.99</td>
<td valign="top" align="center">6</td>
<td valign="top" align="center">2</td>
</tr>
<tr>
<td valign="top" align="left" style="color:#ffffff;background-color: #7f8080;"><bold>Classifier</bold></td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;"><bold>LR</bold></td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;"><bold>LDA</bold></td>
<td valign="top" align="center" colspan="3" style="color:#ffffff;background-color: #7f8080;"><bold>SVM</bold></td>
</tr>
<tr>
<td valign="top" align="left" style="color:#ffffff;background-color: #7f8080;"></td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;"><bold><italic>C</italic></bold></td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;"><bold>&#x03B3;<sub><italic>c</italic></sub></bold></td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;"><bold><italic>r</italic><sub><italic>c</italic></sub></bold></td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;"><bold><italic>C</italic></bold></td>
<td valign="top" align="center" style="color:#ffffff;background-color: #7f8080;"><bold>&#x03B3;<sub><italic>c</italic></sub></bold></td>
</tr>
<tr>
<td valign="top" align="left"><italic>S</italic></td>
<td valign="top" align="center">]0,5]</td>
<td valign="top" align="center">[0,1]</td>
<td valign="top" align="center">]0,1].</td>
<td valign="top" align="center">]0,5]</td>
<td valign="top" align="center">]0,1]</td>
</tr>
<tr>
<td valign="top" align="left">&#x03C1;<sub><italic>o</italic></sub></td>
<td valign="top" align="center">1</td>
<td valign="top" align="center">0</td>
<td valign="top" align="center">0.1</td>
<td valign="top" align="center">1</td>
<td valign="top" align="center">0.1</td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<fn><p>n<sub>o</sub> is the number of overlaps between feature extraction windows (with a maximum window of 250 ms). N<sub>c</sub> is the number of channels selected amongst N<sub>ch</sub> after ranking based on MI. N<sub>w</sub> controls the length of the feature window (for a maximum of 1 s). T is the upper threshold placed on the output of the classifier. r<sub>t</sub> controls the placement of the lower-threshold relative to T. &#x03B2;<sub>k</sub> is the shape factor of the STFT window function. &#x03B8;<sub>1</sub>,&#x03B8;<sub>2</sub> are the lattice parameters for the DWT. &#x03BB; is the decay rate for the ARMA filter. N<sub>AR</sub>,N<sub>MA</sub> control the coefficient settings for the ARMA filter. C are regularization constants for the LR and SVM. &#x03B3;<sub>c</sub> is respectively the shrinkage coefficient for the LDA and a kernel parameter for the SVM. r<sub>C</sub> is the PCA ratio for the SVM.</p></fn>
</table-wrap-foot>
</table-wrap>
<p>The corresponding maximum cross-validation performance was noted as <inline-formula><mml:math id="INEQ98"><mml:mrow><mml:msup><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover><mml:mo>&#x002A;</mml:mo></mml:msup><mml:mo>&#x2062;</mml:mo><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi mathvariant="normal">&#x03C1;</mml:mi><mml:mo>&#x002A;</mml:mo></mml:msup><mml:mo>,</mml:mo><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula>. The BO scheme repeatedly fitted and evaluated the pipeline at each iteration (until 90 iterations were reached). The algorithm was seeded by first evaluating &#x03C1;<sub><italic>o</italic></sub>. In a &#x201C;tell&#x201D; step, the optimizer fitted a surrogate model which mapped <italic>S</italic> to <inline-formula><mml:math id="INEQ100"><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover></mml:math></inline-formula>. In an &#x201C;ask&#x201D; step, the optimizer, following the policy of a given acquisition function, suggested a new &#x03C1; (<xref ref-type="bibr" rid="B50">Shahriari et al., 2016</xref>). A Gaussian-process with Matern Kernel (<xref ref-type="bibr" rid="B4">Bashashati et al., 2016</xref>) was chosen for the surrogate model alongside the Gaussian-process hedge acquisition function (<xref ref-type="bibr" rid="B50">Shahriari et al., 2016</xref>; <xref ref-type="bibr" rid="B26">Head et al., 2021</xref>).</p>
<p>Before optimizing every feature extractor and classifier pair, a preliminary comparison between BO and RD was conducted by optimizing the STFT-LR decoder for three participant recordings (PD01R, PD05R, and PD06L), which represent well different optimized performance levels within the population sample. The optimization procedure was, in this case, repeated five times with different random seeds to produce average convergence trends. Individual trends were obtained by noting for every <italic>i</italic>-th iteration of the maximum performance obtained on or before said iteration <inline-formula><mml:math id="INEQ101"><mml:msubsup><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover><mml:mi>i</mml:mi><mml:mo>&#x002A;</mml:mo></mml:msubsup></mml:math></inline-formula>. Average cumulated regret trends were also produced for both algorithms (<xref ref-type="bibr" rid="B50">Shahriari et al., 2016</xref>). A regret trend <italic>r</italic><sub><italic>i</italic></sub> was defined as:</p>
<disp-formula id="S2.E10">
<label>(10)</label>
<mml:math id="M10">
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mtable displaystyle="true" rowspacing="0pt">
<mml:mtr>
<mml:mtd columnalign="center">
<mml:mrow>
<mml:mrow>
<mml:mpadded width="+3.3pt">
<mml:msub>
<mml:mpadded lspace="5pt" width="+5pt">
<mml:mi>r</mml:mi>
</mml:mpadded>
<mml:mi>i</mml:mi>
</mml:msub>
</mml:mpadded>
<mml:mo rspace="5.8pt">=</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>r</mml:mi>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>-</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>+</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mover accent="true">
<mml:mi>g</mml:mi>
<mml:mo>&#x00AF;</mml:mo>
</mml:mover>
<mml:mi>i</mml:mi>
<mml:mo>&#x002A;</mml:mo>
</mml:msubsup>
<mml:mo>-</mml:mo>
<mml:msub>
<mml:mover accent="true">
<mml:mi>g</mml:mi>
<mml:mo>&#x00AF;</mml:mo>
</mml:mover>
<mml:mi>i</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo rspace="7.5pt" stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x2062;</mml:mo>
<mml:mrow>
<mml:mo rspace="7.5pt">&#x2200;</mml:mo>
<mml:mpadded width="+3.3pt">
<mml:mi>i</mml:mi>
</mml:mpadded>
</mml:mrow>
</mml:mrow>
</mml:mrow>
<mml:mo rspace="5.8pt">=</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mrow>
<mml:mi mathvariant="normal">&#x2026;</mml:mi>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>N</mml:mi>
<mml:mi>i</mml:mi>
</mml:msub>
</mml:mrow>
</mml:mrow>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="center">
<mml:mrow>
<mml:mpadded width="+3.3pt">
<mml:msub>
<mml:mi>r</mml:mi>
<mml:mi>o</mml:mi>
</mml:msub>
</mml:mpadded>
<mml:mo rspace="5.8pt">=</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:mtd>
</mml:mtr>
</mml:mtable>
<mml:mi/>
</mml:mrow>
</mml:math>
</disp-formula>
<p>where <inline-formula><mml:math id="INEQ102"><mml:msub><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> is the score obtained on the <italic>i</italic>-th iteration and <italic>N</italic><sub><italic>i</italic></sub>, the total number of iterations. An initial 60 iterations were set. <inline-formula><mml:math id="INEQ103"><mml:mrow><mml:msubsup><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover><mml:mi>i</mml:mi><mml:mo>&#x002A;</mml:mo></mml:msubsup><mml:mo>-</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> measures the quality of every decision the optimizer takes. Perfect decision-making would find a new optimum point at every step such that <inline-formula><mml:math id="INEQ104"><mml:mrow><mml:mrow><mml:msubsup><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover><mml:mi>i</mml:mi><mml:mo>&#x002A;</mml:mo></mml:msubsup><mml:mo>-</mml:mo><mml:mpadded width="+3.3pt"><mml:msub><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover><mml:mi>i</mml:mi></mml:msub></mml:mpadded></mml:mrow><mml:mo rspace="5.8pt">=</mml:mo><mml:mn>0</mml:mn></mml:mrow></mml:math></inline-formula>. Both convergence and regret trends gave insight into the progression of the optimization sequence.</p>
</sec>
<sec id="S2.SS6">
<title>2.6. Decoder evaluation and statistical analysis</title>
<p>Following the preliminary comparison, the gathered evaluation criteria summarized in <xref ref-type="fig" rid="F2">Figure 2</xref> were collected for every feature-extractor-classifier pair. The maximum cross-validation performance <inline-formula><mml:math id="INEQ105"><mml:msup><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover><mml:mo>&#x002A;</mml:mo></mml:msup></mml:math></inline-formula>, <italic>TPR</italic> and <italic>FPR</italic> and the optimal parameter vector &#x03C1;&#x002A; were recorded. The significance of the absolute improvement <inline-formula><mml:math id="INEQ107"><mml:mrow><mml:msup><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover><mml:mo>&#x002A;</mml:mo></mml:msup><mml:mo>-</mml:mo><mml:mrow><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover><mml:mo>&#x2062;</mml:mo><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi mathvariant="normal">&#x03C1;</mml:mi><mml:mn>0</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:mrow></mml:math></inline-formula> was evaluated using a Wilcoxon paired test. A Mood test was also performed between <inline-formula><mml:math id="INEQ108"><mml:msup><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover><mml:mo>&#x002A;</mml:mo></mml:msup></mml:math></inline-formula> and <inline-formula><mml:math id="INEQ109"><mml:mrow><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover><mml:mo>&#x2062;</mml:mo><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi mathvariant="normal">&#x03C1;</mml:mi><mml:mn>0</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula> to measure any reduction in inter-subject variance. Performance evaluation also included plotting the decoder output prediction on a test segment. Sensitivity analysis of the BO models was used to relate the contribution of each parameter to <inline-formula><mml:math id="INEQ110"><mml:msup><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover><mml:mo>&#x002A;</mml:mo></mml:msup></mml:math></inline-formula> using the SALib library (<xref ref-type="bibr" rid="B27">Herman and Usher, 2017</xref>). <italic>S</italic> was sampled using the Saltelli method (<xref ref-type="bibr" rid="B45">Saltelli, 2002</xref>), and the BO surrogate model was analyzed using the Sobol method (<xref ref-type="bibr" rid="B51">Sobol, 2001</xref>). The Sobol indexes measured the ratio of individual parameter input variances to surrogate model output variance (<xref ref-type="bibr" rid="B51">Sobol, 2001</xref>). Total order indexes for every parameter were recorded to capture both first-order and higher-order interactions (<xref ref-type="bibr" rid="B27">Herman and Usher, 2017</xref>). Analysis of variance (ANOVA) and <italic>post-hoc</italic> Tukey pairwise tests were applied to measure the dependence of <inline-formula><mml:math id="INEQ111"><mml:mrow><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover><mml:mo>&#x2062;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:msup><mml:mi mathvariant="normal">&#x03C1;</mml:mi><mml:mo>&#x002A;</mml:mo></mml:msup><mml:mo>,</mml:mo><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula>, <italic>TPR</italic>, <italic>FPR</italic>, improvement, &#x03C1;&#x002A;, &#x03C4;<sub><italic>d</italic></sub>, <italic>N</italic><sub><italic>f</italic></sub> and parameter sensitivity indexes on the choice of extractor and classifier. Statistical testing was conducted using the SciPy (<xref ref-type="bibr" rid="B59">Virtanen et al., 2019</xref>) and Statsmodel (<xref ref-type="bibr" rid="B47">Seabold and Perktold, 2010</xref>) toolboxes. Figures were produced using the Seaborn (<xref ref-type="bibr" rid="B61">Waskom, 2021</xref>) and Matplotlib (<xref ref-type="bibr" rid="B30">Hunter, 2007</xref>) toolboxes.</p>
</sec>
</sec>
<sec id="S3" sec-type="results">
<title>3. Results</title>
<sec id="S3.SS1">
<title>3.1. Preliminary comparison between random search and Bayesian optimization</title>
<p><xref ref-type="fig" rid="F4">Figure 4</xref> presents averaged convergence and cumulated regret trends computed for three representative participant recordings. The trends indicated that the RD scheme was very effective at uncovering good initial parameter vectors, whilst BO had a rather slower convergence rate starting from &#x03C1;<sub><italic>o</italic></sub>. Nonetheless, after a few iterations, the convergence rate and plateau of the BO algorithm overtook that of the RD scheme. The cumulated regret trends confirmed that BO mapped sufficiently well the parameter space with each iteration, thus decreasing the <inline-formula><mml:math id="INEQ115"><mml:mrow><mml:msubsup><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover><mml:mi>i</mml:mi><mml:mo>&#x002A;</mml:mo></mml:msubsup><mml:mo>-</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> through informed decision-making. As expected, since RD is memoryless, that gap remained constant, leading to a linear cumulation of decision errors.</p>
<fig id="F4" position="float">
<label>FIGURE 4</label>
<caption><p>Comparison between BO and RD searches for three different participant recordings during the tuning of a STFT-LR decoder. The lines indicate the average convergence and cumulative regret trends. The shaded areas indicate 1 SD above and below the average. The average and SD at each iteration were taken by repeating the search 5 times. Convergence trends suggested that the RD made good initial guesses but was eventually overtaken by the BO. Regret trends showed that BO could make informed decisions compared to the RD.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fnhum-17-1111590-g004.tif"/>
</fig>
<p>Thus, for the presented decoder tuning problem, BO was better at ordering good solutions (i.e., <inline-formula><mml:math id="INEQ116"><mml:msub><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> is more likely to be superior to <inline-formula><mml:math id="INEQ117"><mml:msub><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:math></inline-formula>, which is important for sequential learning) and at fine-tuning in later iterations. Consequently, for the remainder of the tuning runs, to bootstrap the BO search starting at &#x03C1;<sub><italic>o</italic></sub>, five additional random samples were drawn to seed the initial fit of the BO surrogate model. Thirty more iterations (adding to a total of <italic>N</italic><sub><italic>i</italic></sub> = 90 iterations) were added to allow for further fine-tuning.</p>
</sec>
<sec id="S3.SS2">
<title>3.2. Decoding performance</title>
<p><xref ref-type="fig" rid="F5">Figure 5</xref> reports the optimal cross-fold average <inline-formula><mml:math id="INEQ119"><mml:mrow><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover><mml:mo>&#x2062;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:msup><mml:mi mathvariant="normal">&#x03C1;</mml:mi><mml:mo>&#x002A;</mml:mo></mml:msup><mml:mo>,</mml:mo><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula>, TPR and FPR achieved after BO tuning for every extractor and classifier pair. Medians laid within 0.6&#x2013;0.75 for the <inline-formula><mml:math id="INEQ120"><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover></mml:math></inline-formula> and TPR, and within 0.20&#x2013;0.35 for the FPR. Combinations of ARMA STFT extractors with LDA and LR classifiers achieved the highest average <inline-formula><mml:math id="INEQ121"><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover></mml:math></inline-formula> performance of 0.74 &#x00B1; 0.06 (mean &#x00B1; SD). ANOVA testing on <inline-formula><mml:math id="INEQ122"><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover></mml:math></inline-formula> suggested that the choice of classifier and extractor impacted performance (<italic>p</italic> &#x003C; 0.01). <italic>Post-hoc</italic> testing showed that all classifiers and extractors performed comparatively well except for the NB (<italic>p</italic> &#x003C; 0.05) and the HJ (<italic>p</italic> &#x003C; 0.05). The TPR depended only on the selected extractor (ANOVA, <italic>p</italic> &#x003C; 0.01), with the HJ underperforming relative to the ARMA, IIR, and STFT (<italic>post-hoc</italic> tests, <italic>p</italic> &#x003C; 0.05). Conversely, the FPR depended on the choice of classifier (ANOVA, <italic>p</italic> &#x003C; 0.05), with the NB underperforming relative to the LR (<italic>post-hoc</italic> tests, <italic>p</italic> &#x003C; 0.05).</p>
<fig id="F5" position="float">
<label>FIGURE 5</label>
<caption><p>Maximal performance distribution across distributions and participants resulting from cross-validation averages after BO tuning for every extractor and classifier combination. <bold>(A)</bold> For the TPR and FPR geometric mean <inline-formula><mml:math id="INEQ92"><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover></mml:math></inline-formula>. Significant differences (&#x002A;, Tukey test, <italic>p</italic> &#x003C; 0.05) were found between decoders using the NB and those using other classifiers. Significant differences were also found between decoders using the HJ and those using other extractors. <bold>(B)</bold> For the TPR. Significant differences (&#x002A;, Tukey test, <italic>p</italic> &#x003C; 0.05) were found between decoders using the HJ and those using other extractors. <bold>(C)</bold> For the FPR. A significant difference was found between decoders using the NB and those using the LR classifier (&#x002A;, Tukey test, <italic>p</italic> &#x003C; 0.05).</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fnhum-17-1111590-g005.tif"/>
</fig>
<p><xref ref-type="fig" rid="F6">Figure 6</xref> reports the improvement in the overall decoding performance with the BO-based parameter optimization compared to that with default often used parameters fixed across all participants [<inline-formula><mml:math id="INEQ123"><mml:mrow><mml:mrow><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover><mml:mo>&#x2062;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:msup><mml:mi mathvariant="normal">&#x03C1;</mml:mi><mml:mo>&#x002A;</mml:mo></mml:msup><mml:mo>,</mml:mo><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mo>-</mml:mo><mml:mrow><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover><mml:mo>&#x2062;</mml:mo><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi mathvariant="normal">&#x03C1;</mml:mi><mml:mn>0</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:mrow></mml:math></inline-formula>]. Paired testing showed that this gap was significant in every case (Wilcoxon, <italic>p</italic> &#x003C; 0.05). ANOVA testing showed that the improvement gap depended again on the classifier and extractor pair (<italic>p</italic> &#x003C; 0.01). <italic>Post-hoc</italic> testing indicated that improvement margins were tighter for the LR and LDA classifiers (<italic>p</italic> &#x003C; 0.05). Default parameter solutions for the SVM-PCA and NB led to poorer decoding solutions. Lastly, no significant reduction in inter-subject variance was measured between default and optimized parameter performance (Mood, <italic>p</italic> &#x003E; 0.05).</p>
<fig id="F6" position="float">
<label>FIGURE 6</label>
<caption><p>Distribution of performance improvement across participants when using BO tuned parameters over default parameters for every extractor and classifier combination. Significant differences (&#x002A;, Tukey test, <italic>p</italic> &#x003C; 0.05) were found between decoders using the NB, SVM-PCA on the one hand and those using the LDA, LR classifier on the other. Significant differences (&#x002A;, Tukey test, <italic>p</italic> &#x003C; 0.05) were found between decoders using the ARMA or IIR and those using other extractors.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fnhum-17-1111590-g006.tif"/>
</fig>
<p><xref ref-type="fig" rid="F7">Figure 7</xref> presents the best-decoded test performance for every user. The classifier output signal <italic>p</italic>[<italic>k</italic>] varied noticeably in terms of quality and temporal dynamics throughout the cohort. Effective detection occurred with high and sufficiently sustained <italic>p</italic> throughout the action with manageable levels of baseline noise (when <italic>y</italic>[<italic>k</italic>]=0) and action noise (when <italic>y</italic>[<italic>k</italic>]=1), such as observed in PD03L, PD04L, PD02L, and PD01R. In other instances, <italic>p</italic> adopted a more impulsive behavior, such as in PD02R or PD02L, making a full capture of the action difficult. Although the upper threshold prevented high baseline noise from triggering the detection, such as in PD03L, PD04L, or PD01R, it could not contend with very large spurious impulses outside of the action (when <italic>y</italic>[<italic>k</italic>]=0) as those found in PD04L, PD05R, PD06R, and PD06L. Conversely, spurious drops would also occur within the action (when <italic>y</italic>[<italic>k</italic>]=1) such as in PD05L, triggering the lower threshold.</p>
<fig id="F7" position="float">
<label>FIGURE 7</label>
<caption><p>Best decoded test segment (10% of each recording length) for every participant with associated test score and extractor, classifier pair. Thresholds were set in an attempt to optimize detection rate based on the dynamics (range, latency, noisiness, or sudden changes) of the decoder output probability, where possible larger deadband helped avoid spurious transitions. The decoder had the option to remove the deadband by setting <italic>r</italic><sub><italic>T</italic></sub> to 0.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fnhum-17-1111590-g007.tif"/>
</fig>
</sec>
<sec id="S3.SS3">
<title>3.3. Decoder parameterization</title>
<p>Optimal parameter distributions were tested using ANOVA. The test results suggested that the thresholds (<italic>T</italic> and r<sub><italic>T</italic></sub>) did not depend on either the classifier or the extractor (<italic>p</italic> &#x003E; 0.01) but rather on the intrinsic signal properties of individual recordings. The number of channels (<italic>N</italic><sub><italic>c</italic></sub>) depended on the choice of classifier (ANOVA, <italic>p</italic> &#x003C; 0.01) but not of the extractor. <italic>Post-hoc</italic> testing suggested that fewer channels were selected using the NB classifier rather than the LR or LDA (<italic>p</italic> &#x003C; 0.05). The number of overlaps between windows (<italic>n</italic><sub><italic>o</italic></sub>) was dependent on both estimator and extractor choices (ANOVA, <italic>p</italic> &#x003C; 0.01). The STFT adopted a significantly larger extraction window length (<italic>L</italic>) than the ARMA, IIR, and HJ extractors; the LR, than the LDA and NB classifiers (<italic>post-hoc</italic> tests, <italic>p</italic> &#x003C; 0.05). Likewise, the choice of feature window length (<italic>N</italic><sub><italic>w</italic></sub>) depended on the extractor (ANOVA, <italic>p</italic> &#x003C; 0.01) but not on the classifier selection. Notably, the STFT, IIR, and HJ required significantly larger <italic>N</italic><sub><italic>w</italic></sub> than the ARMA extractor (<italic>post-hoc</italic> tests, <italic>p</italic> &#x003C; 0.05). <xref ref-type="fig" rid="F8">Figure 8</xref> presents distributions for the decoder analysis window (&#x03C4;<sub><italic>d</italic></sub>) and the total number of features employed for decoding (<italic>N</italic><sub><italic>F</italic></sub>, section 2.3). &#x03C4;<sub><italic>d</italic></sub> and <italic>N</italic><sub><italic>f</italic></sub> depended on the choice of extractor and classifier (ANOVA, <italic>p</italic> &#x003C; 0.01). Because of the smaller optimum <italic>N</italic><sub><italic>w</italic></sub> and <italic>n</italic><sub><italic>o</italic></sub>, the ARMA extractor and the NB classifier required significantly smaller windows than the STFT extractor and LR classifier (<italic>post-hoc</italic> tests, <italic>p</italic> &#x003C; 0.05). Likewise, because of smaller <italic>N</italic><sub><italic>w</italic></sub>, <italic>N</italic><sub><italic>c</italic></sub> or <italic>N</italic><sub><italic>i</italic></sub>, the decoders using the ARMA and HJ extractors or the NB classifier required significantly fewer features than the STFT extractor or LR classifier (<italic>post-hoc</italic> tests, <italic>p</italic> &#x003C; 0.05). Lastly, there was no dependence between optimal extractor parameters and classifier choice and no dependence between classifier parameters and extractor choice.</p>
<fig id="F8" position="float">
<label>FIGURE 8</label>
<caption><p><bold>(A)</bold> Distributions across participants of the total decoder analysis window&#x03C4;<sub><italic>d</italic></sub> using optimal parameters. Significant reductions (&#x002A;, Tukey test, <italic>p</italic> &#x003C; 0.05) were found between decoders using the ARMA, RWT, or DWT extractors and those using the IIR, HJ, or the STFT extractors. Significant differences (&#x002A;, Tukey test, <italic>p</italic> &#x003C; 0.05) were also found between decoders using the NB or LR and those using other classifiers. <bold>(B)</bold> Distributions of the total number of features <italic>N</italic><sub><italic>f</italic></sub> used for decoding. Significant reduction (&#x002A;, Tukey test, <italic>p</italic> &#x003C; 0.05) were found between decoders using the ARMA or HJ and those using the STFT or IIR extractors. Setting aside the SVM-PCA, significant reduction (&#x002A;, Tukey test, <italic>p</italic> &#x003C; 0.05) were also found between decoders using the NB and those using the LDA or LR classifiers.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fnhum-17-1111590-g008.tif"/>
</fig>
<p>The index distributions yielded from the sensitivity analysis are presented in <xref ref-type="fig" rid="F9">Figure 9</xref> for each parameter. Considering the subset of common parameters (<italic>n</italic><sub><italic>o</italic></sub>,<italic>N</italic><sub><italic>c</italic></sub>,<italic>N</italic><sub><italic>w</italic></sub>,<italic>r</italic><sub><italic>T</italic></sub>,<italic>T</italic>), ANOVA testing suggested that the importance indexes varied depending on the parameter type and the classifier selected (<italic>p</italic> &#x003C; 0.01), but not on the extractor (<italic>p</italic> &#x003E; 0.05). <italic>Post-hoc</italic> testing showed that the upper and lower thresholds in the final decoding stage (<italic>T</italic> and <italic>r</italic><sub><italic>T</italic></sub>) were significantly more important than all other parameters (<italic>p</italic> &#x003C; 0.05). The window overlap (<italic>n</italic><sub><italic>o</italic></sub>) was significantly more important than the number of channels selected (<italic>N</italic><sub><italic>c</italic></sub>) and the window length (<italic>N</italic><sub><italic>w</italic></sub>) (<italic>p</italic> &#x003C; 0.05), despite clear preferential settings depending on the selected classifier or extractor. <italic>Post-hoc</italic> tests also showed that the NB and the LDA attributed more importance to those parameters than the LR classifier (<italic>p</italic> &#x003C; 0.05). <italic>Post-hoc</italic> tests were performed for extractor combinations with the LR classifier with all available parameters. Aside from <italic>T</italic>,<italic>r</italic><sub><italic>T</italic></sub>, the regularization constant, <italic>C</italic>, was the most important parameter (<italic>p</italic> &#x003C; 0.05), with the unique exception of the ARMA &#x03BB; parameter. In contrast, with the NB classifier, all parameters had shared similar levels of importance (<italic>p</italic> &#x003E; 0.05), except for <italic>n</italic><sub><italic>o</italic></sub>, which was more important with ARMA and IIR pairing (<italic>p</italic> &#x003C; 0.05). The remaining parameters had comparable importance with the LDA and SVM-PCA classifiers. Regularization parameters did not hold as much importance as they did with LR classifiers. Lastly, extractor-specific parameters other than &#x03BB; (the model order, <italic>N</italic><sub><italic>AR</italic></sub>,<italic>N</italic><sub><italic>MA</italic></sub>, for ARMA, the lattice parameters, &#x03B8;<sub>1</sub>,&#x03B8;<sub>2</sub> for DWT and the window shape factor, &#x03B2;<sub><italic>K</italic></sub>, for the STFT) were never significantly more important than other parameters (omitted some exceptions, <xref ref-type="fig" rid="F9">Figure 9</xref>).</p>
<fig id="F9" position="float">
<label>FIGURE 9</label>
<caption><p>Distributions of sensitivity index for every tuned parameter across participants. Index resulted from a Sobol sensitivity analysis of each BO surrogate model. <bold>(A)</bold> Index distribution for decoders using the HJ; <bold>(B)</bold> DWT; <bold>(C)</bold> IIR; <bold>(D)</bold> RWT; <bold>(E)</bold> ARMA; and <bold>(F)</bold> STFT extractors. Significant decoder reduction (&#x002A;, Tukey test, <italic>p</italic> &#x003C; 0.05) in importance were found between <italic>T</italic>,<italic>r</italic><sub><italic>T</italic></sub>,<italic>n</italic><sub><italic>o</italic></sub> and lastly <italic>N</italic><sub><italic>c</italic></sub>,<italic>N</italic><sub><italic>w</italic></sub>. In most extractor pairing, significant differences (&#x002A;, Tukey test, <italic>p</italic> &#x003C; 0.05) were found between most parameters and the regularization constant <italic>C</italic> of the LR classifier (showed in <bold>C</bold>). Significant differences (&#x002A;, Tukey test, <italic>p</italic> &#x003C; 0.05) were also found between the importance of &#x03BB; when using the LR and LDA classifier and other parameter <bold>(B)</bold>. When paired with the NB, significant differences (&#x002A;, Tukey test, <italic>p</italic> &#x003C; 0.05) were found between lattice parameter &#x03B8;<sub>1</sub>,&#x03B8;<sub>2</sub>, and other parameters <bold>(E)</bold>.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fnhum-17-1111590-g009.tif"/>
</fig>
</sec>
<sec id="S3.SS4">
<title>3.4. Computational benchmark for feature extraction</title>
<p><xref ref-type="fig" rid="F10">Figure 10</xref> presents a benchmark to evaluate the computational time taken to process features for a single decoder step for each method. All of them were sufficiently fast to operate in real-time. A large overhead was observed when features were extracted from a single channel, most likely associated with slow array manipulation in python at each time-step. More complex methods such as ARMA and DWT were more penalized than others (more linear transformation for the ARMA and multi-level processing for the DWT extractor). The DWT should be, in practice, far more efficient (<xref ref-type="bibr" rid="B13">Farina et al., 2007</xref>). Nonetheless, extraction processing time was found to scale favorably as multi-dimensional signals were introduced. More demanding processes, such as the RWT, ARMA and, to an extent, the IIR extractors, had a notable increase in computational time with every added channel. Other methods, such as the DWT and HJ were more computationally efficient. The benchmark proposed in this study is specific to the programming language, operating system and processor. Different hardware and software optimization considerations should ultimately be made based on the target deployment device and the selected method.</p>
<fig id="F10" position="float">
<label>FIGURE 10</label>
<caption><p>Computational time benchmark for every feature extraction method (using an Intel<sup>&#x00AE;</sup> Core&#x2122; i7-7700K 4.20 GHz); each method was evaluated using a 100 s long, 512 Hz (<italic>f</italic><sub><italic>i</italic></sub>), Gaussian random noise signal. <bold>(A)</bold> The extraction was repeated 30 times using default setting parameters and a single channel signal. The average time taken to complete a single computational step (process a block of <italic>R</italic> = 32 signal points) at 16 Hz (<italic>f</italic><sub><italic>o</italic></sub>) was estimated. <bold>(B)</bold> The benchmark was reproduced by incrementally adding channels to a total of 8. Each method benchmark is significantly inferior to the refreshing time (62.5 ms) between decoder output updates. All methods were custom implemented using the NumPy library, except the STFT which used a specialized function from the SciPy library. Error-bars indicate the SD taken across the 30 extractions.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fnhum-17-1111590-g010.tif"/>
</fig>
</sec>
</sec>
<sec id="S4" sec-type="discussion">
<title>4. Discussion</title>
<p>This investigation demonstrates the benefits of automatic parameter tuning using BO for STN-LFPs asynchronous decoding. The parameterization of a relatively complex decoding pipeline optimized a task-relevant objective function, and BO significantly increased task performance from default parameter settings and substituted part of the expert knowledge required for calibration. In addition, BO allowed us to systematically evaluate and compare different combinations of feature extraction and classification methods for decoding. It also helped to uncover the parameters that had the most impact on the decoding performance, such as the classifier thresholds and the window overlaps. In particular, the classifier thresholds were configured differently depending on the individual properties of the STN-LFPs signals.</p>
<sec id="S4.SS1">
<title>4.1. Performance comparison and study limitations</title>
<p>The optimum performance obtained in this study is comparable to the results of past studies that have employed similar asynchronous and real-time constraints to decode STN-LFPs (<xref ref-type="bibr" rid="B34">Mace et al., 2014</xref>; <xref ref-type="bibr" rid="B39">Niketeghad et al., 2018</xref>). The limitation remains that stable detection can vary significantly across participants. We note, however, that BO did not reduce inter-subject variance, indicating that lower-performing cases may be due to a lack of information related to the decoding target in the recorded signals. Moreover, the performance increase can be achieved from the simultaneous optimization of the extractor and classifier, indicating that default parameters may not capture a priori expertise knowledge. A clear benefit of this approach was observed principally in the NB classifier. Nonetheless, end-to-end decoder optimization may not have been the most efficient approach in the proposed architecture and decoding task context. The tuning problem could potentially be broken down into several stages, e.g., one for feature extraction (optimizing some desirable attributes of <italic>X</italic>) and another for state estimation (optimizing <inline-formula><mml:math id="INEQ141"><mml:mover accent="true"><mml:mi>g</mml:mi><mml:mo>&#x00AF;</mml:mo></mml:mover></mml:math></inline-formula>). Separating these two stages would also be more practical to implement estimators with more computational intensive fitting such as the kernel SVM (and avoid resorting to PCA to compress <italic>X</italic>).</p>
<p>Furthermore, the decoding of movement in this investigation provides a basis to apply the method to other DBS targets, state types (e.g., tremor, gait, etc.), and BCI tasks to further gauge the impact of tuning. Online testing is needed to perform decoding sequentially with stimulation in an adaptive configuration (<xref ref-type="bibr" rid="B24">He et al., 2021</xref>), continuous tuning (<xref ref-type="bibr" rid="B20">Grado et al., 2018</xref>), and for deployment, accounting for the fixed computational and memory budget of an embedded device (<xref ref-type="bibr" rid="B66">Zhu et al., 2020</xref>). Finally, findings in this study can further guide algorithm selection, and a BO approach could help ease deployment by rethinking the task objective with these budgeting constraints in mind.</p>
</sec>
<sec id="S4.SS2">
<title>4.2. Improving the tuning method</title>
<p>The optimization process involved a range of parameterization trade-offs. For instance, channel ranking or other decomposition strategies are not a strict guarantee of improved performance through a reduction in classifier overfitting (<xref ref-type="bibr" rid="B49">Shah et al., 2018</xref>). Except for the NB, the BO algorithm kept adding channels despite diminishing returns in performance gain (<xref ref-type="bibr" rid="B14">Flint et al., 2012</xref>). A multi-objective approach or optimization constraints could narrow the set of reasonable tuning solutions. Penalty for delayed detection, output chattering, or model complexity could be introduced (<xref ref-type="bibr" rid="B34">Mace et al., 2014</xref>). Parameters such as the number of channels selected (<italic>N</italic><sub><italic>c</italic></sub>) and the window length (<italic>N</italic><sub><italic>w</italic></sub>) could then become more relevant. Further practical improvements could also be made to the BO algorithm implementation by introducing robust convergence criteria (<xref ref-type="bibr" rid="B4">Bashashati et al., 2016</xref>) and more adaptive acquisition functions (<xref ref-type="bibr" rid="B20">Grado et al., 2018</xref>).</p>
</sec>
<sec id="S4.SS3">
<title>4.3. Tuning and usage of the proposed feature extractors</title>
<p>For feature extraction, parameters influencing the temporal smoothness of the feature signals, such as the number of overlaps between feature extraction windows <italic>n</italic><sub><italic>o</italic></sub> and the ARMA forgetting factor &#x03BB; were important to decoding. A second-order Kalman filter (<xref ref-type="bibr" rid="B12">Chisci et al., 2010</xref>; <xref ref-type="bibr" rid="B62">Yao et al., 2020</xref>) could be tuned using BO and applied either in the feature space for further smoothing or at the classifier output to help stabilize the state transition. Reducing the decoder output frequency <italic>f</italic><sub><italic>o</italic></sub> could also help reduce higher-frequency noise at the cost of a slower refreshing rate. An intermediate cost-function measuring signal-to-noise ratio could be employed to tune extractor parameters in the first optimization stage. Feature extractors overall delivered comparable levels of performance. With hindsight, testing other signal features that were not purely spectral-based (<xref ref-type="bibr" rid="B3">Bakstein et al., 2012</xref>; <xref ref-type="bibr" rid="B60">Wang et al., 2018</xref>) or different combinations of feature bands might have been more intriguing (<xref ref-type="bibr" rid="B55">Tan et al., 2016</xref>). The BO algorithm could have been used to select the combination of features better suited to decoding.</p>
<p>Although the extractor was not critically associated with the detection performance, this work suggests that the choice of extractor still influences extraction and feature window lengths and the number of features used for classification, elements important to the decoder design. Some extractors may thus be better suited to some decoding tasks than others. For instance, the ARMA extractor was among the more performant and instantaneous methods. It can also be helpful if connectivity features (<xref ref-type="bibr" rid="B35">Mamun et al., 2015</xref>) or instantaneous phase estimation (<xref ref-type="bibr" rid="B15">Foffani et al., 2005</xref>) are of interest. However, it comes at the cost of a specialized implementation and a more computationally intensive process. The STFT, in comparison, is a practical, efficient and versatile extractor. Since the window shape only had a limited influence on decoding, using, for instance, a recursive formulation of the exponential window (<xref ref-type="bibr" rid="B19">Grado et al., 2017</xref>) could help minimize windowing lag. Although, the performance with the RWT did not supersede that of the STFT, it has the benefit of combining a narrow-band filter in a compact IIR form with a complex phase estimator, which could be useful to isolate a single or few specific sub-band phase and power. Otherwise, the additional computational burden of a large number of relatively long complex filters associated with a full-signal decomposition does not seem justify. Smaller filter banks, such as the IIR extractor, are relevant to embedded applications (<xref ref-type="bibr" rid="B66">Zhu et al., 2020</xref>). The mutual information-based channel selection scheme could be extended to incorporate only informative power bands. Selected individual features across contacts is here more practical as only the relevant filters can be activated on a given channel greatly reducing the computational burden. Given the comparatively short &#x03C4;<sub><italic>d</italic></sub> for the DWT and its computational efficiency, BO could permit the optimization of longer wavelets which could help match the performance of other extractors. The packet transform could introduce a sparser and more adaptive signal representation (<xref ref-type="bibr" rid="B35">Mamun et al., 2015</xref>; <xref ref-type="bibr" rid="B33">Luo et al., 2018</xref>). Lastly, the HJ parameters were not sufficiently informative and should only be used as complementary features for movement decoding (<xref ref-type="bibr" rid="B49">Shah et al., 2018</xref>).</p>
</sec>
<sec id="S4.SS4">
<title>4.4. Tuning and selecting state estimators for decoding</title>
<p>The double-thresholds system played an important role in providing stable state transitions. It was observed that the upper threshold was generally set above spurious events to prevent false-positive triggering. A higher triggering level delayed detection, especially if the transient response of the feature extractor and classifier combination was slow. A lower second threshold, close to the baseline activity of the classifier output, was preferable. It aligned the detection and the action ending better and prevented a spurious transition if the classifier output suddenly dipped during an action. BO could thus help calibrate more complex state machines required for adaptive DBS (<xref ref-type="bibr" rid="B24">He et al., 2021</xref>).</p>
<p>Aside from the NB classifier, there was no substantial difference between the classifier types in terms of performance. However, not every classifier was best suited for the proposed detection task. Fitting the SVM-PCA classifier was more computationally demanding, given the temporal longitudinal aspect of the dataset. Adjusting <italic>f</italic><sub><italic>o</italic></sub> could help in this regard (<xref ref-type="bibr" rid="B18">Golshan et al., 2016</xref>, <xref ref-type="bibr" rid="B17">2018</xref>, <xref ref-type="bibr" rid="B16">2020</xref>). In addition, the SVM algorithm does not yield prediction probabilities. Given the importance of thresholding for state transition, those cannot be omitted and thus have to be estimated in an additional <italic>post hoc</italic> process (<xref ref-type="bibr" rid="B41">Platt, 1999</xref>). LR and the LDA classifiers may be thus preferable with the LR was more easily calibrated through regularization. Ensemble methods, using a set of classifiers rather than a single unit (in particular decision trees), have proven to outperform other machine-learning methods when deployed on small size, complex, and noisy BCI datasets (<xref ref-type="bibr" rid="B22">Gruenwald et al., 2019</xref>; <xref ref-type="bibr" rid="B66">Zhu et al., 2020</xref>) and could be easily implemented using the proposed method. The method could also be applicable to neural-network based decoders (<xref ref-type="bibr" rid="B1">Ahmadi et al., 2019</xref>; <xref ref-type="bibr" rid="B16">Golshan et al., 2020</xref>) specifically tuning of decoder specific parameters such as selected channels, thresholds or window convolution size.</p>
</sec>
</sec>
<sec id="S5" sec-type="conclusion">
<title>5. Conclusion</title>
<p>We have introduced a decoding architecture based on BO to tune different parameters in the feature extraction, channel selection, classification and state-transition stages of an asynchronous decoder to identify movement signatures from STN-LFPs signals recorded in the deep brain. This architecture allows self-tuning in a computationally efficient implementation for real-time deployment. Although asynchronous decoding from STN-LFPs remains highly subject-specific, we demonstrate that BO improves decoding performance across participants. In addition, BO provided in-depth details regarding the tuning process and the relevance of each parameter which could help inform future decoder design iterations. For asynchronous decoding, time-frequency signal extraction (regardless of the chosen approach) should render smoother feature signals, and state estimators should be robust to spurious activity change. An increased number of features or decoding channels should be budgeted relative to incremental performance gains and model complexity. Optimal individual parameters are essential, especially where substantial inter-subject variability is present, to best adapt to the characteristics of the neural signals. The method presented in this study could also be applied to decoding other bulkier movements, arousal, and pathological states to construct feedback mechanisms for adaptive DBS systems and serve other BCI applications. Future work should include further investigation of other DBS-recorded LFPs signals and further online testing.</p>
</sec>
<sec id="S6" sec-type="data-availability">
<title>Data availability statement</title>
<p>Publicly available datasets were analyzed in this study. This data can be found here: <ext-link ext-link-type="uri" xlink:href="https://data.mrc.ox.ac.uk/mrcbndu/data-sets/search">https://data.mrc.ox.ac.uk/mrcbndu/data-sets/search</ext-link>.</p>
</sec>
<sec id="S7" sec-type="ethics-statement">
<title>Ethics statement</title>
<p>The studies involving human participants were reviewed and approved by the South Central &#x2013; Oxford C Research Ethics Committee 18/SC/0006. The patients/participants provided their written informed consent to participate in this study.</p>
</sec>
<sec id="S8" sec-type="author-contributions">
<title>Author contributions</title>
<p>HT and SH gathered the data used in the computational experiment. TM designed and implemented the computational experiment, analyzed the experimental results, and wrote the manuscript. SH, HT, and RV reviewed and edited the manuscript. All authors contributed to the article and approved the submitted version.</p>
</sec>
</body>
<back>
<sec id="S9" sec-type="funding-information">
<title>Funding</title>
<p>This work was supported by the Medical Research Council (MR/P012272/1 and MC/UU/12024/1), the Rosetrees Trust, the National Institute of Health Research Oxford Biomedical Research Centre, the Engineering and Physical Sciences Research Council (EP/L016737/1), EPSRC Doctoral Training Centre for Neurotechnology at Imperial College London, and the UK Dementia Research Institute (NIHR202133). SH was supported by BRAIN Non-Clinical Post-Doctoral Fellowship (HMR04170).</p>
</sec>
<ack><p>We express our warmest gratitude to the research participants in this study.</p>
</ack>
<sec id="S10" sec-type="COI-statement">
<title>Conflict of interest</title>
<p>The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.</p>
</sec>
<sec id="S11" sec-type="disclaimer">
<title>Publisher&#x2019;s note</title>
<p>All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.</p>
</sec>
<fn-group>
<title>Abbreviations</title>
<fn fn-type="abbr">
<p>PD, Parkinson&#x2019;s disease; LFPs, local field potentials; DBS, deep brain stimulation; BCI, brain-computer interface; STN, subthalamic nucleus; BO, Bayesian optimization; RD, random search; IIR, infinite impulse response; STFT, short-time Fourier transform; CWT, continuous wavelet transform; RWT, recursive wavelet transform; DWT, discrete wavelet transform; ARMA, auto-regressive moving average; HJ, Hjorth parameters; MI, mutual information; LDA, linear-discriminant analysis; NB, Na&#x00EF;ve Bayesian; LR, logistic regression; SVM, support vector machine; PCA, principal component analysis; ROC, receiver operating characteristic; TPR, true-positive rate; FPR, false-negative rate; ANOVA, analysis of variance.</p></fn>
</fn-group>
<ref-list>
<title>References</title>
<ref id="B1"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Ahmadi</surname> <given-names>N.</given-names></name> <name><surname>Constandinou</surname> <given-names>T. G.</given-names></name> <name><surname>Bouganis</surname> <given-names>C.-S.</given-names></name></person-group> (<year>2019</year>). &#x201C;<article-title>Decoding hand kinematics from local field potentials using long short-term memory (LSTM) network</article-title>,&#x201D; in <source><italic>2019 9th international IEEE/EMBS conference on neural engineering (NER)</italic></source>, (<publisher-loc>Piscataway, NJ</publisher-loc>: <publisher-name>IEEE</publisher-name>), <fpage>415</fpage>&#x2013;<lpage>419</lpage>. <pub-id pub-id-type="doi">10.1109/NER.2019.8717045</pub-id></citation></ref>
<ref id="B2"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Anzak</surname> <given-names>A.</given-names></name> <name><surname>Tan</surname> <given-names>H.</given-names></name> <name><surname>Pogosyan</surname> <given-names>A.</given-names></name> <name><surname>Foltynie</surname> <given-names>T.</given-names></name> <name><surname>Limousin</surname> <given-names>P.</given-names></name> <name><surname>Zrinzo</surname> <given-names>L.</given-names></name><etal/></person-group> (<year>2012</year>). <article-title>Subthalamic nucleus activity optimizes maximal effort motor responses in Parkinson&#x2019;s disease.</article-title> <source><italic>Brain</italic></source> <volume>135</volume> <fpage>2766</fpage>&#x2013;<lpage>2778</lpage>. <pub-id pub-id-type="doi">10.1093/brain/aws183</pub-id> <pub-id pub-id-type="pmid">22858550</pub-id></citation></ref>
<ref id="B3"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Bakstein</surname> <given-names>E.</given-names></name> <name><surname>Burgess</surname> <given-names>J.</given-names></name> <name><surname>Warwick</surname> <given-names>K.</given-names></name> <name><surname>Ruiz</surname> <given-names>V.</given-names></name> <name><surname>Aziz</surname> <given-names>T.</given-names></name> <name><surname>Stein</surname> <given-names>J.</given-names></name></person-group> (<year>2012</year>). <article-title>Parkinsonian tremor identification with multiple local field potential feature classification.</article-title> <source><italic>J. Neurosci. Methods</italic></source> <volume>209</volume> <fpage>320</fpage>&#x2013;<lpage>330</lpage>. <pub-id pub-id-type="doi">10.1016/j.jneumeth.2012.06.027</pub-id> <pub-id pub-id-type="pmid">22771289</pub-id></citation></ref>
<ref id="B4"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Bashashati</surname> <given-names>H.</given-names></name> <name><surname>Ward</surname> <given-names>R. K.</given-names></name> <name><surname>Bashashati</surname> <given-names>A.</given-names></name></person-group> (<year>2016</year>). <article-title>User-customized brain computer interfaces using Bayesian optimization.</article-title> <source><italic>J. Neural Eng.</italic></source> <volume>13</volume>:<issue>026001</issue>. <pub-id pub-id-type="doi">10.1088/1741-2560/13/2/026001</pub-id> <pub-id pub-id-type="pmid">26824461</pub-id></citation></ref>
<ref id="B5"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Benabid</surname> <given-names>A. L.</given-names></name> <name><surname>Costecalde</surname> <given-names>T.</given-names></name> <name><surname>Eliseyev</surname> <given-names>A.</given-names></name> <name><surname>Charvet</surname> <given-names>G.</given-names></name> <name><surname>Verney</surname> <given-names>A.</given-names></name> <name><surname>Karakas</surname> <given-names>S.</given-names></name><etal/></person-group> (<year>2019</year>). <article-title>An exoskeleton controlled by an epidural wireless brain&#x2013;machine interface in a tetraplegic patient: A proof-of-concept demonstration.</article-title> <source><italic>Lancet Neurol</italic>.</source> <volume>18</volume> <fpage>1112</fpage>&#x2013;<lpage>1122</lpage>. <pub-id pub-id-type="doi">10.1016/S1474-4422(19)30321-7</pub-id> <pub-id pub-id-type="pmid">31587955</pub-id></citation></ref>
<ref id="B6"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Bergstra</surname> <given-names>J.</given-names></name> <name><surname>Bengio</surname> <given-names>Y.</given-names></name></person-group> (<year>2012</year>). <article-title>Random search for hyper-parameter optimization.</article-title> <source><italic>J. Mach. Learn. Res.</italic></source> <volume>13</volume> <fpage>281</fpage>&#x2013;<lpage>305</lpage>. <pub-id pub-id-type="doi">10.5555/2188385.2188395</pub-id></citation></ref>
<ref id="B7"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Brown</surname> <given-names>P.</given-names></name></person-group> (<year>2003</year>). <article-title>Oscillatory nature of human basal ganglia activity: Relationship to the pathophysiology of Parkinson&#x2019;s disease.</article-title> <source><italic>Mov. Disord.</italic></source> <volume>18</volume> <fpage>357</fpage>&#x2013;<lpage>363</lpage>. <pub-id pub-id-type="doi">10.1002/mds.10358</pub-id> <pub-id pub-id-type="pmid">12671940</pub-id></citation></ref>
<ref id="B8"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Cai</surname> <given-names>Y.</given-names></name> <name><surname>Chow</surname> <given-names>M.</given-names></name> <name><surname>Lu</surname> <given-names>W.</given-names></name> <name><surname>Li</surname> <given-names>L.</given-names></name></person-group> (<year>2010</year>). &#x201C;<article-title>Evaluation of distribution fault diagnosis algorithms using ROC curves</article-title>,&#x201D; in <source><italic>IEEE PES General Meeting, PES 2010</italic></source>, (<publisher-loc>Piscataway, NJ</publisher-loc>: <publisher-name>IEEE</publisher-name>), <fpage>1</fpage>&#x2013;<lpage>6</lpage>. <pub-id pub-id-type="doi">10.1109/PES.2010.5588154</pub-id></citation></ref>
<ref id="B9"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Camara</surname> <given-names>C.</given-names></name> <name><surname>Isasi</surname> <given-names>P.</given-names></name> <name><surname>Warwick</surname> <given-names>K.</given-names></name> <name><surname>Ruiz</surname> <given-names>V.</given-names></name> <name><surname>Stein</surname> <given-names>J.</given-names></name> <name><surname>Aziz</surname> <given-names>T.</given-names></name><etal/></person-group> (<year>2015</year>). <article-title>Resting tremor classification and detection in Parkinson&#x2019;s disease patients.</article-title> <source><italic>Biomed. Signal Proc. Control</italic></source> <volume>16</volume> <fpage>88</fpage>&#x2013;<lpage>97</lpage>. <pub-id pub-id-type="doi">10.1016/j.bspc.2014.09.006</pub-id></citation></ref>
<ref id="B10"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Cassidy</surname> <given-names>M.</given-names></name> <name><surname>Mazzone</surname> <given-names>P.</given-names></name> <name><surname>Oliviero</surname> <given-names>A.</given-names></name> <name><surname>Insola</surname> <given-names>A.</given-names></name> <name><surname>Tonali</surname> <given-names>P.</given-names></name> <name><surname>Lazzaro</surname> <given-names>V. D.</given-names></name><etal/></person-group> (<year>2002</year>). <article-title>Movement-related changes in synchronization in the human basal ganglia.</article-title> <source><italic>Brain</italic></source> <volume>125</volume> <fpage>1235</fpage>&#x2013;<lpage>1246</lpage>. <pub-id pub-id-type="doi">10.1093/brain/awf135</pub-id> <pub-id pub-id-type="pmid">12023312</pub-id></citation></ref>
<ref id="B11"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Chen</surname> <given-names>Y.</given-names></name> <name><surname>Gong</surname> <given-names>C.</given-names></name> <name><surname>Hao</surname> <given-names>H.</given-names></name> <name><surname>Guo</surname> <given-names>Y.</given-names></name> <name><surname>Xu</surname> <given-names>S.</given-names></name> <name><surname>Zhang</surname> <given-names>Y.</given-names></name><etal/></person-group> (<year>2019</year>). <article-title>Automatic sleep stage classification based on subthalamic local field potentials.</article-title> <source><italic>IEEE Tran. Neural Syst. Rehabil. Eng.</italic></source> <volume>27</volume> <fpage>118</fpage>&#x2013;<lpage>128</lpage>. <pub-id pub-id-type="doi">10.1109/TNSRE</pub-id></citation></ref>
<ref id="B12"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Chisci</surname> <given-names>L.</given-names></name> <name><surname>Mavino</surname> <given-names>A.</given-names></name> <name><surname>Perferi</surname> <given-names>G.</given-names></name> <name><surname>Sciandrone</surname> <given-names>M.</given-names></name> <name><surname>Anile</surname> <given-names>C.</given-names></name> <name><surname>Colicchio</surname> <given-names>G.</given-names></name><etal/></person-group> (<year>2010</year>). <article-title>Real-time epileptic seizure prediction using AR models and support vector machines.</article-title> <source><italic>IEEE Trans. Biomed. Eng.</italic></source> <volume>57</volume> <fpage>1124</fpage>&#x2013;<lpage>1132</lpage>. <pub-id pub-id-type="doi">10.1109/TBME.2009.2038990</pub-id> <pub-id pub-id-type="pmid">20172805</pub-id></citation></ref>
<ref id="B13"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Farina</surname> <given-names>D.</given-names></name> <name><surname>Nascimento</surname> <given-names>O. F.</given-names></name> <name><surname>Lucas</surname> <given-names>M.</given-names></name> <name><surname>Doncarli</surname> <given-names>C.</given-names></name></person-group> (<year>2007</year>). <article-title>Optimization of wavelets for classification of movement-related cortical potentials generated by variation of force-related parameters.</article-title> <source><italic>J. Neurosci. Methods</italic></source> <volume>162</volume> <fpage>357</fpage>&#x2013;<lpage>363</lpage>. <pub-id pub-id-type="doi">10.1016/J.JNEUMETH.2007.01.011</pub-id> <pub-id pub-id-type="pmid">17336392</pub-id></citation></ref>
<ref id="B14"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Flint</surname> <given-names>R. D.</given-names></name> <name><surname>Lindberg</surname> <given-names>E. W.</given-names></name> <name><surname>Jordan</surname> <given-names>L. R.</given-names></name> <name><surname>Miller</surname> <given-names>L. E.</given-names></name> <name><surname>Slutzky</surname> <given-names>M. W.</given-names></name></person-group> (<year>2012</year>). <article-title>Accurate decoding of reaching movements from field potentials in the absence of spikes.</article-title> <source><italic>J. Neural Eng.</italic></source> <volume>9</volume>:<issue>046006</issue>. <pub-id pub-id-type="doi">10.1088/1741-2560/9/4/046006</pub-id> <pub-id pub-id-type="pmid">22733013</pub-id></citation></ref>
<ref id="B15"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Foffani</surname> <given-names>G.</given-names></name> <name><surname>Bianchi</surname> <given-names>A.</given-names></name> <name><surname>Baselli</surname> <given-names>G.</given-names></name> <name><surname>Priori</surname> <given-names>A.</given-names></name></person-group> (<year>2005</year>). <article-title>Movement-related frequency modulation of beta oscillatory activity in the human subthalamic nucleus.</article-title> <source><italic>J. Physiol.</italic></source> <volume>568</volume> <fpage>699</fpage>&#x2013;<lpage>711</lpage>. <pub-id pub-id-type="doi">10.1113/jphysiol.2005.089722</pub-id> <pub-id pub-id-type="pmid">16123109</pub-id></citation></ref>
<ref id="B16"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Golshan</surname> <given-names>H. M.</given-names></name> <name><surname>Hebb</surname> <given-names>A. O.</given-names></name> <name><surname>Mahoor</surname> <given-names>M. H.</given-names></name></person-group> (<year>2020</year>). <article-title>LFP-Net: A deep learning framework to recognize human behavioral activities using brain STN-LFP signals.</article-title> <source><italic>J. Neurosci. Methods</italic></source> <volume>335</volume>:<issue>108621</issue>. <pub-id pub-id-type="doi">10.1016/j.jneumeth.2020.108621</pub-id> <pub-id pub-id-type="pmid">32027889</pub-id></citation></ref>
<ref id="B17"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Golshan</surname> <given-names>H. M.</given-names></name> <name><surname>Hebb</surname> <given-names>A. O.</given-names></name> <name><surname>Hanrahan</surname> <given-names>S. J.</given-names></name> <name><surname>Nedrud</surname> <given-names>J.</given-names></name> <name><surname>Mahoor</surname> <given-names>M. H.</given-names></name></person-group> (<year>2018</year>). <article-title>A hierarchical structure for human behavior classification using STN local field potentials.</article-title> <source><italic>J. Neurosci. Methods</italic></source> <volume>293</volume> <fpage>254</fpage>&#x2013;<lpage>263</lpage>. <pub-id pub-id-type="doi">10.1016/j.jneumeth.2017.10.001</pub-id> <pub-id pub-id-type="pmid">29017898</pub-id></citation></ref>
<ref id="B18"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Golshan</surname> <given-names>H. M.</given-names></name> <name><surname>Hebb</surname> <given-names>A. O.</given-names></name> <name><surname>Hanrahan</surname> <given-names>S. J.</given-names></name> <name><surname>Nedrud</surname> <given-names>J.</given-names></name> <name><surname>Mahoor</surname> <given-names>M. H.</given-names></name><etal/></person-group> (<year>2016</year>). &#x201C;<article-title>A Multiple Kernel Learning approach for human behavioral task classification using STN-LFP signal</article-title>,&#x201D; in <source><italic>2016 38th Annual international conference of the ieee engineering in medicine and biology society (EMBC)</italic></source>, (<publisher-loc>Piscataway, NJ</publisher-loc>: <publisher-name>IEEE</publisher-name>), <fpage>1030</fpage>&#x2013;<lpage>1033</lpage>. <pub-id pub-id-type="doi">10.1109/EMBC.2016.7590878</pub-id> <pub-id pub-id-type="pmid">28268500</pub-id></citation></ref>
<ref id="B19"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Grado</surname> <given-names>L. L.</given-names></name> <name><surname>Johnson</surname> <given-names>M. D.</given-names></name> <name><surname>Netoff</surname> <given-names>T. I.</given-names></name></person-group> (<year>2017</year>). <article-title>The sliding windowed infinite fourier transform.</article-title> <source><italic>IEEE Signal. Proc. Magaz.</italic></source> <volume>34</volume> <fpage>183</fpage>&#x2013;<lpage>188</lpage>. <pub-id pub-id-type="doi">10.1109/MSP.2017.2718039</pub-id></citation></ref>
<ref id="B20"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Grado</surname> <given-names>L. L.</given-names></name> <name><surname>Johnson</surname> <given-names>M. D.</given-names></name> <name><surname>Netoff</surname> <given-names>T. I.</given-names></name></person-group> (<year>2018</year>). <article-title>Bayesian adaptive dual control of deep brain stimulation in a computational model of Parkinson&#x2019;s disease.</article-title> <source><italic>PLoS Comput. Biol.</italic></source> <volume>14</volume>:<issue>e1006606</issue>. <pub-id pub-id-type="doi">10.1371/journal.pcbi.1006606</pub-id> <pub-id pub-id-type="pmid">30521519</pub-id></citation></ref>
<ref id="B21"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Gruenwald</surname> <given-names>J.</given-names></name> <name><surname>Kapeller</surname> <given-names>C.</given-names></name> <name><surname>Kamada</surname> <given-names>K.</given-names></name> <name><surname>Scharinger</surname> <given-names>J.</given-names></name> <name><surname>Guger</surname> <given-names>C.</given-names></name><etal/></person-group> (<year>2017</year>). &#x201C;<article-title>Optimal bandpower estimation and tracking via Kalman filtering for real-time Brain-Computer Interfaces</article-title>,&#x201D; in <source><italic>International IEEE/EMBS conference on neural engineering, NER</italic></source>, (<publisher-loc>Shanghai</publisher-loc>: <publisher-name>IEEE</publisher-name>), <fpage>605</fpage>&#x2013;<lpage>608</lpage>. <pub-id pub-id-type="doi">10.1109/NER.2017.8008424</pub-id></citation></ref>
<ref id="B22"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Gruenwald</surname> <given-names>J.</given-names></name> <name><surname>Znobishchev</surname> <given-names>A.</given-names></name> <name><surname>Kapeller</surname> <given-names>C.</given-names></name> <name><surname>Kamada</surname> <given-names>K.</given-names></name> <name><surname>Scharinger</surname> <given-names>J.</given-names></name> <name><surname>Guger</surname> <given-names>C.</given-names></name></person-group> (<year>2019</year>). <article-title>Time-variant linear discriminant analysis improves hand gesture and finger movement decoding for invasive brain-computer interfaces.</article-title> <source><italic>Front. Neurosci.</italic></source> <volume>13</volume>:<issue>901</issue>. <pub-id pub-id-type="doi">10.3389/fnins.2019.00901</pub-id> <pub-id pub-id-type="pmid">31616237</pub-id></citation></ref>
<ref id="B23"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Harris</surname> <given-names>C.</given-names></name> <name><surname>Millman</surname> <given-names>K.</given-names></name> <name><surname>van der</surname> <given-names>W. S.</given-names></name> <name><surname>Gommers</surname> <given-names>R.</given-names></name> <name><surname>Virtanen</surname> <given-names>P.</given-names></name><etal/></person-group> (<year>2020</year>). <article-title>Array programming with NumPy.</article-title> <source><italic>Nature</italic></source> <volume>585</volume> <fpage>357</fpage>&#x2013;<lpage>362</lpage>. <pub-id pub-id-type="doi">10.1038/s41586-020-2649-2</pub-id> <pub-id pub-id-type="pmid">32939066</pub-id></citation></ref>
<ref id="B24"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>He</surname> <given-names>S.</given-names></name> <name><surname>Baig</surname> <given-names>F.</given-names></name> <name><surname>Mostofi</surname> <given-names>A.</given-names></name> <name><surname>Pogosyan</surname> <given-names>A.</given-names></name> <name><surname>Debarros</surname> <given-names>J.</given-names></name> <name><surname>Green</surname> <given-names>A. L.</given-names></name><etal/></person-group> (<year>2021</year>). <article-title>Closed-Loop deep brain stimulation for essential tremor based on thalamic local field potentials.</article-title> <source><italic>Mov. Disord.</italic></source> <volume>36</volume> <fpage>863</fpage>&#x2013;<lpage>873</lpage>. <pub-id pub-id-type="doi">10.1002/mds.28513</pub-id> <pub-id pub-id-type="pmid">33547859</pub-id></citation></ref>
<ref id="B25"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>He</surname> <given-names>S.</given-names></name> <name><surname>Syed</surname> <given-names>E.</given-names></name> <name><surname>Torrecillos</surname> <given-names>F.</given-names></name> <name><surname>Tinkhauser</surname> <given-names>G.</given-names></name> <name><surname>Fischer</surname> <given-names>P.</given-names></name> <name><surname>Pogosyan</surname> <given-names>A.</given-names></name><etal/></person-group> (<year>2019</year>). &#x201C;<article-title>Beta Oscillation-targeted neurofeedback training based on subthalamic lfps in parkinsonian patients</article-title>,&#x201D; in <source><italic>International IEEE/EMBS conference on neural engineering, NER, 2019-March(0)</italic></source>, (<publisher-loc>San Francisco, CA</publisher-loc>: <publisher-name>IEEE</publisher-name>), <fpage>81</fpage>&#x2013;<lpage>84</lpage>. <pub-id pub-id-type="doi">10.1109/NER.2019.8717176</pub-id> <pub-id pub-id-type="pmid">31768227</pub-id></citation></ref>
<ref id="B26"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Head</surname> <given-names>T.</given-names></name> <name><surname>Kumar</surname> <given-names>M.</given-names></name> <name><surname>Nahrstaedt</surname> <given-names>H.</given-names></name> <name><surname>Louppe</surname> <given-names>G.</given-names></name> <name><surname>Shcherbatyi</surname> <given-names>I.</given-names></name><etal/></person-group> (<year>2021</year>). <source><italic>scikit-optimize/scikit-optimize.</italic></source> <publisher-loc>Honolulu</publisher-loc>: <publisher-name>Zenodo</publisher-name>. <pub-id pub-id-type="doi">10.5281/ZENODO.5565057</pub-id></citation></ref>
<ref id="B27"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Herman</surname> <given-names>J.</given-names></name> <name><surname>Usher</surname> <given-names>W.</given-names></name></person-group> (<year>2017</year>). <article-title>SALib: An open-source python library for sensitivity analysis.</article-title> <source><italic>J. Open Source Softw.</italic></source> <volume>2</volume>:<issue>97</issue>. <pub-id pub-id-type="doi">10.21105/joss.00097</pub-id></citation></ref>
<ref id="B28"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Hirschmann</surname> <given-names>J.</given-names></name> <name><surname>Schoffelen</surname> <given-names>J. M.</given-names></name> <name><surname>Schnitzler</surname> <given-names>A.</given-names></name> <name><surname>Gerven</surname> <given-names>M. A.</given-names></name></person-group> (<year>2017</year>). <article-title>Parkinsonian rest tremor can be detected accurately based on neuronal oscillations recorded from the subthalamic nucleus.</article-title> <source><italic>Clin. Neurophysiol.</italic></source> <volume>128</volume> <fpage>2029</fpage>&#x2013;<lpage>2036</lpage>. <pub-id pub-id-type="doi">10.1016/j.clinph.2017.07.419</pub-id> <pub-id pub-id-type="pmid">28841506</pub-id></citation></ref>
<ref id="B29"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Hjorth</surname> <given-names>B.</given-names></name></person-group> (<year>1970</year>). <article-title>Technical EEG analysis based on contributions on time domain properties.</article-title> <source><italic>Electroencephalogr. Clin. Neurophysiol.</italic></source> <volume>28</volume> <fpage>306</fpage>&#x2013;<lpage>310</lpage>. <pub-id pub-id-type="doi">10.1016/0013-4694(70)90143-4</pub-id> <pub-id pub-id-type="pmid">4195653</pub-id></citation></ref>
<ref id="B30"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Hunter</surname> <given-names>J.</given-names></name></person-group> (<year>2007</year>). <article-title>Matplotlib A 2D Graphics Environment.</article-title> <source><italic>Comput. Sci. Eng.</italic></source> <volume>9</volume> <fpage>90</fpage>&#x2013;<lpage>95</lpage>.</citation></ref>
<ref id="B31"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Lema&#x00EE;tre</surname> <given-names>G.</given-names></name> <name><surname>Nogueira</surname> <given-names>F.</given-names></name> <name><surname>Aridas</surname> <given-names>C. K.</given-names></name></person-group> (<year>2017</year>). <article-title>Imbalanced-learn: A python toolbox to tackle the curse of imbalanced datasets in machine learning.</article-title> <source><italic>J. Mach. Learn. Res.</italic></source> <volume>18</volume> <fpage>1</fpage>&#x2013;<lpage>5</lpage>. <pub-id pub-id-type="doi">10.5555/3122009.3122026</pub-id></citation></ref>
<ref id="B32"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Little</surname> <given-names>S.</given-names></name> <name><surname>Pogosyan</surname> <given-names>A.</given-names></name> <name><surname>Neal</surname> <given-names>S.</given-names></name> <name><surname>Zavala</surname> <given-names>B.</given-names></name> <name><surname>Zrinzo</surname> <given-names>L.</given-names></name> <name><surname>Hariz</surname> <given-names>M.</given-names></name><etal/></person-group> (<year>2013</year>). <article-title>Adaptive deep brain stimulation in advanced Parkinson disease.</article-title> <source><italic>Ann. Neurol.</italic></source> <volume>74</volume> <fpage>449</fpage>&#x2013;<lpage>457</lpage>. <pub-id pub-id-type="doi">10.1002/ana.23951</pub-id> <pub-id pub-id-type="pmid">23852650</pub-id></citation></ref>
<ref id="B33"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Luo</surname> <given-names>H.</given-names></name> <name><surname>Huang</surname> <given-names>Y.</given-names></name> <name><surname>Du</surname> <given-names>X.</given-names></name> <name><surname>Zhang</surname> <given-names>Y.</given-names></name> <name><surname>Green</surname> <given-names>A. L.</given-names></name> <name><surname>Aziz</surname> <given-names>T. Z.</given-names></name><etal/></person-group> (<year>2018</year>). <article-title>Dynamic neural state identification in deep brain local field potentials of neuropathic pain.</article-title> <source><italic>Front. Neurosci.</italic></source> <volume>12</volume>:<issue>237</issue>. <pub-id pub-id-type="doi">10.3389/fnins.2018.00237</pub-id> <pub-id pub-id-type="pmid">29695951</pub-id></citation></ref>
<ref id="B34"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Mace</surname> <given-names>M.</given-names></name> <name><surname>Yousif</surname> <given-names>N.</given-names></name> <name><surname>Naushahi</surname> <given-names>M.</given-names></name> <name><surname>Abdullah-Al-Mamun</surname> <given-names>K.</given-names></name> <name><surname>Wang</surname> <given-names>S.</given-names></name> <name><surname>Nandi</surname> <given-names>D.</given-names></name><etal/></person-group> (<year>2014</year>). <article-title>An automated approach towards detecting complex behaviours in deep brain oscillations.</article-title> <source><italic>J. Neurosci. Methods</italic></source> <volume>224</volume> <fpage>66</fpage>&#x2013;<lpage>78</lpage>. <pub-id pub-id-type="doi">10.1016/J.JNEUMETH.2013.11.019</pub-id> <pub-id pub-id-type="pmid">24370598</pub-id></citation></ref>
<ref id="B35"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Mamun</surname> <given-names>K. A.</given-names></name> <name><surname>Mace</surname> <given-names>M.</given-names></name> <name><surname>Lutman</surname> <given-names>M. E.</given-names></name> <name><surname>Stein</surname> <given-names>J.</given-names></name> <name><surname>Liu</surname> <given-names>X.</given-names></name> <name><surname>Aziz</surname> <given-names>T.</given-names></name><etal/></person-group> (<year>2015</year>). <article-title>Movement decoding using neural synchronization and inter-hemispheric connectivity from deep brain local field potentials.</article-title> <source><italic>J. Neural Eng.</italic></source> <volume>12</volume>:<issue>056011</issue>. <pub-id pub-id-type="doi">10.1088/1741-2560/12/5/056011</pub-id> <pub-id pub-id-type="pmid">26305124</pub-id></citation></ref>
<ref id="B36"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Martineau</surname> <given-names>T.</given-names></name> <name><surname>Martineau</surname> <given-names>T.</given-names></name> <name><surname>He</surname> <given-names>S.</given-names></name> <name><surname>Vaidyanathan</surname> <given-names>R.</given-names></name> <name><surname>Brown</surname> <given-names>P.</given-names></name> <name><surname>Tan</surname> <given-names>H.</given-names></name><etal/></person-group> (<year>2020</year>). &#x201C;<article-title>Optimizing time-frequency feature extraction and channel selection through gradient backpropagation to improve action decoding based on subthalamic local field potentials</article-title>,&#x201D; in <source><italic>Proceedings of the annual international conference of the ieee engineering in medicine and biology society, EMBS</italic></source>, (<publisher-loc>Montreal, QC</publisher-loc>: <publisher-name>IEEE</publisher-name>), <fpage>3023</fpage>&#x2013;<lpage>3026</lpage>. <pub-id pub-id-type="doi">10.1109/EMBC44109.2020.9175885</pub-id> <pub-id pub-id-type="pmid">33018642</pub-id></citation></ref>
<ref id="B37"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Nandy</surname> <given-names>A.</given-names></name> <name><surname>As Alahe</surname> <given-names>M.</given-names></name> <name><surname>Nasim Uddin</surname> <given-names>S. M.</given-names></name> <name><surname>Alam</surname> <given-names>S.</given-names></name> <name><surname>Al Nahid</surname> <given-names>A.</given-names></name><etal/></person-group> (<year>2019</year>). &#x201C;<article-title>Feature extraction and classification of EEG signals for seizure detection</article-title>,&#x201D; in <source><italic>in 1st International conference on robotics, electrical and signal processing techniques, ICREST 2019</italic></source>, (<publisher-loc>Dhaka</publisher-loc>: <publisher-name>IEEE</publisher-name>), <fpage>480</fpage>&#x2013;<lpage>485</lpage>. <pub-id pub-id-type="doi">10.1109/ICREST.2019.8644337</pub-id></citation></ref>
<ref id="B38"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Nicolas-Alonso</surname> <given-names>L. F.</given-names></name> <name><surname>Gomez-Gil</surname> <given-names>J.</given-names></name></person-group> (<year>2012</year>). <article-title>Brain computer interfaces, a review.</article-title> <source><italic>Sensors</italic></source> <volume>12</volume> <fpage>1211</fpage>&#x2013;<lpage>1279</lpage>. <pub-id pub-id-type="doi">10.3390/s120201211</pub-id> <pub-id pub-id-type="pmid">22438708</pub-id></citation></ref>
<ref id="B39"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Niketeghad</surname> <given-names>S.</given-names></name> <name><surname>Hebb</surname> <given-names>A. O.</given-names></name> <name><surname>Nedrud</surname> <given-names>J.</given-names></name> <name><surname>Hanrahan</surname> <given-names>S. J.</given-names></name> <name><surname>Mahoor</surname> <given-names>M. H.</given-names></name></person-group> (<year>2018</year>). <article-title>Motor task detection from human STN using interhemispheric connectivity.</article-title> <source><italic>IEEE Trans. Neural Syst. Rehabil. Eng.</italic></source> <volume>26</volume> <fpage>216</fpage>&#x2013;<lpage>223</lpage>. <pub-id pub-id-type="doi">10.1109/TNSRE.2017.2754879</pub-id> <pub-id pub-id-type="pmid">28945597</pub-id></citation></ref>
<ref id="B40"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Pedregosa</surname> <given-names>F.</given-names></name> <name><surname>Varoquaux</surname> <given-names>G.</given-names></name> <name><surname>Gramfort</surname> <given-names>A.</given-names></name> <name><surname>Michel</surname> <given-names>V.</given-names></name> <name><surname>Thirion</surname> <given-names>B.</given-names></name> <name><surname>Grisel</surname> <given-names>O.</given-names></name><etal/></person-group> (<year>2011</year>). <article-title>Scikit-learn: Machine learning in python.</article-title> <source><italic>J. Mach. Learn. Research</italic></source> <volume>12</volume> <fpage>2825</fpage>&#x2013;<lpage>2830</lpage>.</citation></ref>
<ref id="B41"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Platt</surname> <given-names>J.</given-names></name></person-group> (<year>1999</year>). <article-title>Probablistic outputs for svm and comparison to regularized likelihood methods.</article-title> <source><italic>Adv. Large Marg. Class.</italic></source> <volume>10</volume> <fpage>61</fpage>&#x2013;<lpage>74</lpage>.</citation></ref>
<ref id="B42"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Ren</surname> <given-names>J.</given-names></name> <name><surname>Kezunovic</surname> <given-names>M.</given-names></name></person-group> (<year>2010</year>). &#x201C;<article-title>Use of recursive wavelet transform for estimating power system frequency and phasors</article-title>,&#x201D; in <source><italic>2010 IEEE PES transmission and distribution conference and exposition: Smart solutions for a changing world</italic></source>, (<publisher-loc>New Orleans, LA</publisher-loc>: <publisher-name>IEEE</publisher-name>), <fpage>1</fpage>&#x2013;<lpage>6</lpage>. <pub-id pub-id-type="doi">10.1109/TDC.2010.5484474</pub-id></citation></ref>
<ref id="B43"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Rieder</surname> <given-names>P.</given-names></name> <name><surname>Gotze</surname> <given-names>J.</given-names></name> <name><surname>Nossek</surname> <given-names>J. S.</given-names></name> <name><surname>Burrus</surname> <given-names>C. S.</given-names></name></person-group> (<year>1998</year>). <article-title>Parameterization of orthogonal wavelet transforms and their implementation.</article-title> <source><italic>IEEE Trans. Circ. Syst. II Anal. Digit. Signal Proc.</italic></source> <volume>45</volume> <fpage>217</fpage>&#x2013;<lpage>226</lpage>. <pub-id pub-id-type="doi">10.1109/82.661654</pub-id></citation></ref>
<ref id="B44"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Ross</surname> <given-names>B. C.</given-names></name></person-group> (<year>2014</year>). <article-title>Mutual information between discrete and continuous data sets.</article-title> <source><italic>PLoS One</italic></source> <volume>9</volume>:<issue>e87357</issue>. <pub-id pub-id-type="doi">10.1371/journal.pone.0087357</pub-id> <pub-id pub-id-type="pmid">24586270</pub-id></citation></ref>
<ref id="B45"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Saltelli</surname> <given-names>A.</given-names></name></person-group> (<year>2002</year>). <article-title>Making best use of model evaluations to compute sensitivity indices.</article-title> <source><italic>Comput. Phys. Commun.</italic></source> <volume>145</volume> <fpage>280</fpage>&#x2013;<lpage>297</lpage>. <pub-id pub-id-type="doi">10.1016/S0010-4655(02)00280-1</pub-id></citation></ref>
<ref id="B46"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Sand</surname> <given-names>D.</given-names></name> <name><surname>Rappel</surname> <given-names>P.</given-names></name> <name><surname>Marmor</surname> <given-names>O.</given-names></name> <name><surname>Bick</surname> <given-names>A. S.</given-names></name> <name><surname>Arkadir</surname> <given-names>D.</given-names></name> <name><surname>Lu</surname> <given-names>B.</given-names></name><etal/></person-group> (<year>2021</year>). <article-title>Machine learning-based personalized subthalamic biomarkers predict ON-OFF levodopa states in Parkinson patients.</article-title> <source><italic>J. Neural Eng.</italic></source> <volume>18</volume>:<issue>abfc1d</issue>. <pub-id pub-id-type="doi">10.1088/1741-2552/abfc1d</pub-id> <pub-id pub-id-type="pmid">33906182</pub-id></citation></ref>
<ref id="B47"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Seabold</surname> <given-names>S.</given-names></name> <name><surname>Perktold</surname> <given-names>J.</given-names></name></person-group> (<year>2010</year>). &#x201C;<article-title>Statsmodels: Econometric and statistical modeling with python</article-title>,&#x201D; in <source><italic>Proceedings Of the 9th Python in Science Conference</italic></source>, (<publisher-loc>Austin, TX</publisher-loc>), <fpage>92</fpage>&#x2013;<lpage>96</lpage>.</citation></ref>
<ref id="B48"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Shah</surname> <given-names>S. A.</given-names></name> <name><surname>Tan</surname> <given-names>H.</given-names></name> <name><surname>Brown</surname> <given-names>P.</given-names></name></person-group> (<year>2016</year>). &#x201C;<article-title>Decoding force from deep brain electrodes in Parkinsonian patients</article-title>,&#x201D; in <source><italic>Proceedings of the annual international conference of the ieee engineering in medicine and biology society, EMBS</italic></source>, (<publisher-loc>Piscataway, NJ</publisher-loc>: <publisher-name>IEEE</publisher-name>), <fpage>5717</fpage>&#x2013;<lpage>5720</lpage>. <pub-id pub-id-type="doi">10.1109/EMBC.2016.7592025</pub-id> <pub-id pub-id-type="pmid">28269553</pub-id></citation></ref>
<ref id="B49"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Shah</surname> <given-names>S. A.</given-names></name> <name><surname>Tan</surname> <given-names>H.</given-names></name> <name><surname>Tinkhauser</surname> <given-names>G.</given-names></name> <name><surname>Brown</surname> <given-names>P.</given-names></name></person-group> (<year>2018</year>). <article-title>Towards real-time, continuous decoding of gripping force from deep brain local field potentials.</article-title> <source><italic>IEEE Trans. Neural Syst. Rehabil. Eng.</italic></source> <volume>26</volume> <fpage>1460</fpage>&#x2013;<lpage>1468</lpage>. <pub-id pub-id-type="doi">10.1109/TNSRE.2018.2837500</pub-id> <pub-id pub-id-type="pmid">29985155</pub-id></citation></ref>
<ref id="B50"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Shahriari</surname> <given-names>B.</given-names></name> <name><surname>Swersky</surname> <given-names>K.</given-names></name> <name><surname>Wang</surname> <given-names>Z.</given-names></name> <name><surname>Adams</surname> <given-names>R. P.</given-names></name> <name><surname>de Freitas</surname> <given-names>N.</given-names></name></person-group> (<year>2016</year>). <article-title>Taking the human out of the loop: A review of Bayesian optimization.</article-title> <source><italic>Proc. IEEE</italic></source> <volume>104</volume> <fpage>148</fpage>&#x2013;<lpage>175</lpage>. <pub-id pub-id-type="doi">10.1109/JPROC.2015.2494218</pub-id></citation></ref>
<ref id="B51"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Sobol</surname> <given-names>I. M.</given-names></name></person-group> (<year>2001</year>). <article-title>Global sensitivity indices for nonlinear mathematical models and their Monte Carlo estimates.</article-title> <source><italic>Math. Comput. Simul.</italic></source> <volume>55</volume> <fpage>271</fpage>&#x2013;<lpage>280</lpage>. <pub-id pub-id-type="doi">10.1016/S0378-4754(00)00270-6</pub-id></citation></ref>
<ref id="B52"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Tan</surname> <given-names>H.</given-names></name> <name><surname>Debarros</surname> <given-names>J.</given-names></name> <name><surname>He</surname> <given-names>S.</given-names></name> <name><surname>Pogosyan</surname> <given-names>A.</given-names></name> <name><surname>Aziz</surname> <given-names>T. Z.</given-names></name> <name><surname>Huang</surname> <given-names>Y.</given-names></name><etal/></person-group> (<year>2019</year>). <article-title>Decoding voluntary movements and postural tremor based on thalamic LFPs as a basis for closed-loop stimulation for essential tremor.</article-title> <source><italic>Brain Stimul.</italic></source> <volume>12</volume> <fpage>858</fpage>&#x2013;<lpage>867</lpage>. <pub-id pub-id-type="doi">10.1016/j.brs.2019.02.011</pub-id> <pub-id pub-id-type="pmid">30827864</pub-id></citation></ref>
<ref id="B53"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Tan</surname> <given-names>H.</given-names></name> <name><surname>Fischer</surname> <given-names>P.</given-names></name> <name><surname>Shah</surname> <given-names>S.</given-names></name> <name><surname>Vidaurre</surname> <given-names>D.</given-names></name> <name><surname>Woolrich</surname> <given-names>M.</given-names></name> <name><surname>Brown</surname> <given-names>P.</given-names></name></person-group> (<year>2018</year>). &#x201C;<article-title>Decoding movement states in stepping cycles based on subthalamic LFPs in Parkinsonian patients</article-title>,&#x201D; in <source><italic>Proceedings of the annual international conference of the IEEE engineering in medicine and biology society, EMBS</italic></source>, (<publisher-loc>Piscataway, NJ</publisher-loc>: <publisher-name>IEEE</publisher-name>), <fpage>1384</fpage>&#x2013;<lpage>1387</lpage>. <pub-id pub-id-type="doi">10.1109/EMBC.2018.8512545</pub-id> <pub-id pub-id-type="pmid">30440650</pub-id></citation></ref>
<ref id="B54"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Tan</surname> <given-names>H.</given-names></name> <name><surname>Pogosyan</surname> <given-names>A.</given-names></name> <name><surname>Anzak</surname> <given-names>A.</given-names></name> <name><surname>Ashkan</surname> <given-names>K.</given-names></name> <name><surname>Bogdanovic</surname> <given-names>M.</given-names></name> <name><surname>Green</surname> <given-names>A. L.</given-names></name><etal/></person-group> (<year>2013</year>). <article-title>Complementary roles of different oscillatory activities in the subthalamic nucleus in coding motor effort in Parkinsonism.</article-title> <source><italic>Exp. Neurol.</italic></source> <volume>248</volume> <fpage>187</fpage>&#x2013;<lpage>195</lpage>. <pub-id pub-id-type="doi">10.1016/j.expneurol.2013.06.010</pub-id> <pub-id pub-id-type="pmid">23778147</pub-id></citation></ref>
<ref id="B55"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Tan</surname> <given-names>H.</given-names></name> <name><surname>Pogosyan</surname> <given-names>A.</given-names></name> <name><surname>Ashkan</surname> <given-names>K.</given-names></name> <name><surname>Green</surname> <given-names>A. L.</given-names></name> <name><surname>Aziz</surname> <given-names>T.</given-names></name> <name><surname>Foltynie</surname> <given-names>T.</given-names></name><etal/></person-group> (<year>2016</year>). <article-title>Decoding gripping force based on local field potentials recorded from subthalamic nucleus in humans.</article-title> <source><italic>eLife</italic></source> <volume>5</volume> <fpage>484</fpage>&#x2013;<lpage>499</lpage>. <pub-id pub-id-type="doi">10.7554/eLife.19089</pub-id> <pub-id pub-id-type="pmid">27855780</pub-id></citation></ref>
<ref id="B56"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Tarvainen</surname> <given-names>M. P.</given-names></name> <name><surname>Hiltunen</surname> <given-names>J. K.</given-names></name> <name><surname>Ranta-aho</surname> <given-names>P. O.</given-names></name> <name><surname>Karjalainen</surname> <given-names>P. A.</given-names></name></person-group> (<year>2004</year>). <article-title>Estimation of nonstationary EEG with kalman smoother approach: An application to event-related synchronization (ERS).</article-title> <source><italic>IEEE Trans. Biomed. Eng.</italic></source> <volume>51</volume> <fpage>516</fpage>&#x2013;<lpage>524</lpage>. <pub-id pub-id-type="doi">10.1109/TBME.2003.821029</pub-id> <pub-id pub-id-type="pmid">15000382</pub-id></citation></ref>
<ref id="B57"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Tomek</surname> <given-names>I.</given-names></name></person-group> (<year>1976</year>). <article-title>An experiment with the nearest-neighbor rule.</article-title> <source><italic>IEEE Trans. Syst. Man Cybernet.</italic></source> <volume>6</volume> <fpage>448</fpage>&#x2013;<lpage>452</lpage>.</citation></ref>
<ref id="B58"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Vaidyanathan</surname> <given-names>P.</given-names></name></person-group> (<year>1993</year>). &#x201C;<article-title>Two Channel FIR Paraunitary QMF Banks</article-title>,&#x201D; in <source><italic>Multirate Systems and Filter Banks</italic></source>, <edition>1st Edn</edition>, <role>ed.</role> <person-group person-group-type="editor"><name><surname>Oppenheim</surname> <given-names>A. V.</given-names></name></person-group> (<publisher-loc>Hoboken, NJ</publisher-loc>: <publisher-name>Prentice Hall</publisher-name>), <fpage>298</fpage>&#x2013;<lpage>314</lpage>.</citation></ref>
<ref id="B59"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Virtanen</surname> <given-names>P.</given-names></name> <name><surname>Gommers</surname> <given-names>R.</given-names></name> <name><surname>Oliphant</surname> <given-names>T. E.</given-names></name> <name><surname>Haberland</surname> <given-names>M.</given-names></name> <name><surname>Reddy</surname> <given-names>T.</given-names></name> <name><surname>Cournapeau</surname> <given-names>D.</given-names></name><etal/></person-group> (<year>2019</year>). <article-title>SciPy 1.0&#x2013;fundamental algorithms for scientific computing in Python.</article-title> <source><italic>Nat. Methods</italic></source> <volume>17</volume> <fpage>261</fpage>&#x2013;<lpage>272</lpage>. <pub-id pub-id-type="doi">10.1038/s41592-019-0686-2</pub-id> <pub-id pub-id-type="pmid">32015543</pub-id></citation></ref>
<ref id="B60"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Wang</surname> <given-names>T.</given-names></name> <name><surname>Shoaran</surname> <given-names>M.</given-names></name> <name><surname>Emami</surname> <given-names>A.</given-names></name></person-group> (<year>2018</year>). &#x201C;<article-title>Towards adaptive deep brain stimulation: LFP-feature analysis and classification</article-title>,&#x201D; in <source><italic>IEEE International conference on acoustics, speech and signal processing (ICASSP)</italic></source>, (<publisher-loc>Piscataway, NJ</publisher-loc>: <publisher-name>IEEE</publisher-name>), <fpage>2536</fpage>&#x2013;<lpage>2540</lpage>.</citation></ref>
<ref id="B61"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Waskom</surname> <given-names>M.</given-names></name></person-group> (<year>2021</year>). <article-title>seaborn: Statistical data visualization.</article-title> <source><italic>J. Open Source Softw.</italic></source> <volume>6</volume>:<issue>3021</issue>. <pub-id pub-id-type="doi">10.21105/joss.03021</pub-id></citation></ref>
<ref id="B62"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Yao</surname> <given-names>L.</given-names></name> <name><surname>Brown</surname> <given-names>P.</given-names></name> <name><surname>Shoaran</surname> <given-names>M.</given-names></name></person-group> (<year>2020</year>). <article-title>Improved detection of Parkinsonian resting tremor with feature engineering and Kalman filtering.</article-title> <source><italic>Clin. Neurophysiol.</italic></source> <volume>131</volume> <fpage>274</fpage>&#x2013;<lpage>284</lpage>. <pub-id pub-id-type="doi">10.1016/j.clinph.2019.09.021</pub-id> <pub-id pub-id-type="pmid">31744673</pub-id></citation></ref>
<ref id="B63"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Zaker</surname> <given-names>N.</given-names></name> <name><surname>Zhang</surname> <given-names>J. J.</given-names></name> <name><surname>Hanrahan</surname> <given-names>S.</given-names></name> <name><surname>Nedrud</surname> <given-names>J.</given-names></name> <name><surname>Hebb</surname> <given-names>A. O.</given-names></name></person-group> (<year>2016</year>). &#x201C;<article-title>A new approach for automated detection of behavioral task onset for patients with Parkinson&#x2019;s disease using subthalamic nucleus local field potentials</article-title>,&#x201D; in <source><italic>Conference record - asilomar conference on signals, systems and computers</italic></source>, (<publisher-loc>Piscataway, NJ</publisher-loc>: <publisher-name>IEEE</publisher-name>), <fpage>780</fpage>&#x2013;<lpage>784</lpage>. <pub-id pub-id-type="doi">10.1109/ACSSC.2015.7421240</pub-id></citation></ref>
<ref id="B64"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Zhang</surname> <given-names>S.</given-names></name> <name><surname>Connolly</surname> <given-names>A. T.</given-names></name> <name><surname>Madden</surname> <given-names>L. R.</given-names></name> <name><surname>Vitek</surname> <given-names>J. L.</given-names></name> <name><surname>Johnson</surname> <given-names>M. D.</given-names></name></person-group> (<year>2018</year>). <article-title>High-resolution local field potentials measured with deep brain stimulation arrays.</article-title> <source><italic>J. Neural Eng.</italic></source> <volume>15</volume>:<issue>046019</issue>. <pub-id pub-id-type="doi">10.1088/1741-2552/aabdf5</pub-id> <pub-id pub-id-type="pmid">29651998</pub-id></citation></ref>
<ref id="B65"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Zhang</surname> <given-names>S.</given-names></name> <name><surname>Green</surname> <given-names>A.</given-names></name> <name><surname>Smith</surname> <given-names>P. P.</given-names></name></person-group> (<year>2013</year>). &#x201C;<article-title>An automatic classifier of pain scores in chronic pain patients from local field potentials recordings</article-title>,&#x201D; in <source><italic>International IEEE/EMBS conference on neural engineering, NER</italic></source>, (<publisher-loc>San Diego, CA</publisher-loc>: <publisher-name>IEEE</publisher-name>), <fpage>1194</fpage>&#x2013;<lpage>1197</lpage>. <pub-id pub-id-type="doi">10.1109/NER.2013.6696153</pub-id></citation></ref>
<ref id="B66"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Zhu</surname> <given-names>B.</given-names></name> <name><surname>Farivar</surname> <given-names>M.</given-names></name> <name><surname>Shoaran</surname> <given-names>M.</given-names></name></person-group> (<year>2020</year>). <article-title>ResOT: Resource-efficient oblique trees for neural signal classification.</article-title> <source><italic>IEEE Trans. Biomed. Circ. Syst.</italic></source> <volume>14</volume> <fpage>692</fpage>&#x2013;<lpage>704</lpage>. <pub-id pub-id-type="doi">10.1109/TBCAS.2020.3004544</pub-id> <pub-id pub-id-type="pmid">32746347</pub-id></citation></ref>
</ref-list>
</back>
</article>