pnpl.tasks.gwilliams2022.PhonemeClassification#
- class pnpl.tasks.gwilliams2022.PhonemeClassification(tmin=-0.2, tmax=0.6, label_type='phoneme', exclude_phonemes=<factory>, require_pronounced=True, _phonemes_sorted=<factory>, _phoneme_to_id=<factory>)[source]#
Multi-class phoneme classification on MEG-MASC.
Each sample is aligned to a phoneme onset extracted from the events file. Labels are ARPABET phonemes (after mapping from TIMIT). Sample tuples follow the continuous-data convention used elsewhere in pnpl:
(subject, session, task, run, onset, label_str).- Parameters:
tmin (float) – Start time relative to phoneme onset (seconds).
tmax (float) – End time relative to phoneme onset (seconds).
label_type (str) –
"phoneme"for multi-class,"voicing"for binary voiced/unvoiced.exclude_phonemes (list) – ARPABET symbols to drop from samples and the label vocabulary.
require_pronounced (bool) – If True, drop events with
pronouncedset to a falsy value (e.g. silently-read trials)._phonemes_sorted (list)
_phoneme_to_id (dict)
- __init__(tmin=-0.2, tmax=0.6, label_type='phoneme', exclude_phonemes=<factory>, require_pronounced=True, _phonemes_sorted=<factory>, _phoneme_to_id=<factory>)#
- Parameters:
tmin (float)
tmax (float)
label_type (str)
exclude_phonemes (list)
require_pronounced (bool)
_phonemes_sorted (list)
_phoneme_to_id (dict)
- Return type:
None
Methods
__init__([tmin, tmax, label_type, ...])collect_samples(dataset)get_label(sample)Attributes
label_infolabel_typerequire_pronouncedtmaxtminexclude_phonemes