Two controllers can make the same number of mistakes and feel very different to use. A brief pause and an unintended movement both count as errors, but they ask different things of the person trying to recover.

This paper revisited linear discriminant analysis (LDA), a common classifier for electromyography (EMG), by changing assumptions already present in its Bayesian formulation. We examined whether unequal class weights and time-varying priors could change the character of its mistakes without replacing the classifier.

The question

Imagine holding a steady wrist contraction to move a cursor. Most predictions correctly identify that movement, but occasional predictions jump to a different class. The cursor may twitch in an unintended direction. Alternatively, an uncertain classifier could briefly output no motion. Both interrupt ideal control, but only one actively moves the cursor away from its intended path.

There is also a timing clue. EMG classifiers often analyze overlapping windows, so consecutive decisions share much of their input. During a sustained contraction, it is reasonable to expect some continuity. A classifier that evaluates each window independently leaves that expectation unused.

We explored two separate modifications: cost-modified LDA (cLDA), which changes the relative weighting of classes, and prior-adjustment LDA (pLDA), which changes the expectation of the next class using recent predictions. The experiment compared each with conventional LDA; it did not evaluate a combined cLDA–pLDA controller.

The study at a glance

Participants and input
17 participants with intact limbs; eight bipolar EMG channels around the dominant forearm, sampled at 1,000 Hz.
Task
Screen prompts alternated three seconds of no motion with three seconds of an active gesture. Six active classes plus no motion were recorded across three trials.
Features
150 ms windows advanced every 50 ms. Four Hudgins time-domain features were extracted from each channel.
Evaluation
Leave-one-trial-out cross-validation, comparing overall error, active error, and instability in the decision stream.

The active classes were wrist flexion, extension, pronation, supination, chuck grip, and hand opening. Keeping transitions in the recordings was deliberate: a study restricted to the middle of clean contractions would miss much of the behaviour these modifications were designed to change.

How we approached it

Standard LDA estimates the evidence that a feature vector belongs to each class, combining that evidence with a prior probability. In a conventional balanced training setup, the priors are often equal and the largest score wins. That produces a useful baseline, but gives no special preference to a less disruptive decision when several classes look plausible.

For cLDA, we converted the classifier’s scores into probabilities and multiplied them by class-specific coefficients. The no-motion coefficient was 0.97, while each of the six active classes received 0.005. In this implementation a larger coefficient makes a class more likely to be selected: the numerical ‘cost’ coefficient should not be read as a larger penalty imposed on that class.

This weighting expanded the circumstances in which the output became no motion. It provided a way to trade some missed movements for fewer wrong active movements. It also made the trade-off explicit, instead of assuming every type of misclassification should contribute equally to the final decision.

For pLDA, the prior of the most recently predicted class grew during a run of repeated predictions. An upper bound prevented unlimited growth. When the prediction changed, stored adjustments could be unwound to help the classifier transition to the next motion. This introduced temporal continuity through the priors, without averaging a fixed number of future decisions.

Technical detail: two different ways to change a boundary

cLDA applies static multiplicative weights after the LDA scores are converted into probability space. pLDA changes the prior term used by the classifier over time. Its growth depends on the number of consecutive predictions of a class; the growth-rate and maximum-prior parameters were selected by grid search using training data.

The pLDA algorithm stores prior increments in a stack for each class. During a transition, the previous class’s prior can be reduced using its most recent increment, while the remaining probabilities are adjusted to maintain a total of one. See Methods, Sections II-C and II-D, and Equations 5–7.

Temporal continuity is useful only while it remains compatible with intentional transitions. A stronger preference for the current class can also resist a real change of intention, making both stability and switching behaviour relevant evaluation targets.

What we found

The overall error rates did not differ significantly across the three approaches (p = 0.74). The more specific measures did. cLDA had significantly lower active error than both standard LDA and pLDA. Both modified classifiers had significantly lower instability than standard LDA, and cLDA also had lower instability than pLDA in this experiment.

Reported comparisons across participants and trials
MeasureMeaningFinding
Overall errorIncorrect predictions of any classNo significant difference; p = 0.74
Active errorIncorrect predictions that output an active motionLower for cLDA than LDA or pLDA; p < 0.05
InstabilityClass switching in predictions relative to the labelled streamLower for both modifications than LDA; cLDA also lower than pLDA; p < 0.05

Source: Section III and Figure 4. These comparisons describe offline decision streams under the paper’s leave-one-trial-out protocol.

The example decision stream explained how cLDA obtained its improvement: it changed uncertain active predictions to no motion, including some predictions that standard LDA had made correctly. The method therefore redistributed errors rather than simply removing them. Whether that exchange helps a particular interface depends on the costs of an unintended movement and a missed command.

pLDA changed fewer decisions in the illustrated example. Its contribution was to demonstrate a way of expressing recent temporal context inside the classifier. The aggregate instability result supports that idea, while the unchanged overall error discourages describing it as a general accuracy improvement.

Reading the figures

A signal-amplitude trace above a sequence of predicted motion classes. During a sustained wrist-pronation interval, an isolated prediction jumps to chuck grip, illustrating the discontinuity that an adaptive prior aims to suppress.
Figure 2 from Campbell, Phinyomark, and Scheme (2019), illustrating the motivation for pLDA. © 2019 IEEE. Source paper. Select the figure to enlarge it.

The upper panel shows mean absolute value (MAV), a measure of EMG amplitude, against sample number. The lower panel shows predicted classes against analysis-window number. The bar above the predictions marks no motion, transition, and sustained wrist pronation. These panels use different horizontal units, so read each with its own axis.

The isolated excursion late in the steady interval is the key. Most neighbouring predictions support the sustained movement, but one window suggests another class. The figure is a simplified motivation for the method, rather than the aggregate performance comparison. To assess whether the methods helped across the dataset, turn to Figure 4 and its three error measures.

The aggregate results show why overall error was an incomplete description of the controller. The three panels separate error, active error, and instability. The marked comparisons support specific changes in unwanted active predictions and switching, even though the overall-error bars are similar.

Three panels compare error, active error, and instability for LDA, cost-sensitive LDA, and prior-adjusted LDA.
Original Figure 4 from the paper cited above; figure content unchanged. ©2019 IEEE. Source paper. Select the figure to enlarge it.

What the results do not establish

The paper evaluated recorded, prompted movements. It did not demonstrate improved task completion in an online study where a person reacts to the classifier’s output. Fewer active errors plausibly reduce correction effort, but actual usability requires measuring the person and controller together.

Prompt timing also introduces uncertainty around transitions. A participant’s muscle activity need not change at precisely the time the visual cue changes. The discussion identifies this as a possible source of label error, with implications for both baseline performance and tuning the adaptive priors.

The chosen cost coefficients encode a particular preference for no motion. Another device, task, or user might benefit from different coefficients. Only one windowing configuration was tested, so the results do not establish an optimal temporal setting or prove the absence of a responsiveness trade-off.

Looking back

The retrospective takeaway is that the decision rule is part of interface design. A classifier can be statistically similar by an overall metric yet behave differently at exactly the moments a user notices. Reporting active errors and switching behaviour makes that difference visible.

A useful follow-up would tune these preferences against an online task: measure completion time, unintended movement, recovery effort, and transition latency while varying the coefficients. That would test whether the favourable offline changes survive interaction with a person who adapts their contractions in response. This is a proposed extension, not a result of the 2019 experiment.

The broader lesson is methodological. Before replacing a familiar model, inspect the assumptions in its output rule. Sometimes the missing ingredient is a better expression of context or consequence, and the right evaluation is what reveals its value.

Read further

Campbell, E., Phinyomark, A., and Scheme, E. (2019). Linear Discriminant Analysis with Bayesian Risk Parameters for Myoelectric Control. IEEE Global Conference on Signal and Information Processing (GlobalSIP). DOI: 10.1109/GlobalSIP45357.2019.8969237.

Read the original paper on IEEE Xplore. Sections II-C and II-D explain the two modifications. Figure 3 illustrates actual decision streams; Figure 4 reports the comparisons across subjects and trials.