Skip to main content

IcaLabelResult

Namespace: DECODINGLIB  ·  Library: Decoding Library

#include <decoding/decoding_ica_label.h>

struct DECODINGLIB::IcaLabelResult

Outcome of labelling a single ICA component.

Pairs a component index with its winning IcaComponentLabel and a confidence score in [0,1][0, 1] derived from the underlying correlation or spectral statistic (for EOG/ECG: the maximum absolute Pearson correlation with the reference traces; for muscle: the fraction of power above 30 Hz). Downstream consumers typically threshold the score or render it next to the component topography so the user can override the automatic decision.

src/examples/ex_decoding/main.cpp
const QList<IcaLabelResult> labels = MlIcaLabel::classify(icaSources, eog, ecg, kSFreq);
const QVector<int> reject = MlIcaLabel::findArtifactComponents(labels); // indices to drop before back-projection
for (const IcaLabelResult& label : labels) {
qInfo().noquote() << "component" << label.componentIndex << IcaLabelResult::labelToString(label.label)
<< "confidence" << label.confidence;
}

Static Methods​

labelToString(label)​


Example​

Used in examples​

ex_decoding​

Spatial decoders and ICA labelling on synthetic mixtures with a known ground truth.

src/examples/ex_decoding/main.cpp, line 190
const QList<IcaLabelResult> labels = MlIcaLabel::classify(icaSources, eog, ecg, kSFreq);
const QVector<int> reject = MlIcaLabel::findArtifactComponents(labels); // indices to drop before back-projection
for (const IcaLabelResult& label : labels) {
qInfo().noquote() << "component" << label.componentIndex << IcaLabelResult::labelToString(label.label)
<< "confidence" << label.confidence;
}
ok &= expect(labels.size() == 4 && labels[0].label == IcaComponentLabel::Eog && labels[1].label == IcaComponentLabel::Ecg && labels[2].label == IcaComponentLabel::Muscle && labels[3].label == IcaComponentLabel::Brain,
"ICA labels: EOG, ECG, muscle, brain");
ok &= expect(reject == QVector<int>({0, 1, 2}), "components 0-2 are rejected");

Authors of this file​