Reproducing Bouchard et al. (2013) from dandiset 000019¶

Paper. Bouchard KE, Mesgarani N, Johnson K, Chang EF (2013). Functional organization of human sensorimotor cortex for speech articulation. Nature 495, 327-332. doi:10.1038/nature11911. The claims file (claims/000019/10.1038-nature11911.yaml) was written from the NIH author manuscript in PubMed Central (PMC3606666) with its supplement, and checked by a second reader.

Dandiset. DANDI:000019, "Human ECoG speaking consonant-vowel syllables", version 0.220126.2148. The paper cites no version of the dandiset (it predates it). This is the only published version; the draft has the same 31 assets and the same size, so the published version is pinned.

What the dandiset holds. Raw ECoG (256 channels, 3051.76 Hz) of 31 recording blocks from four subjects (EC2, EC9, GP31, GP33), with a trial table per block (syllable, start, C-V transition and stop times), a bad flag and an anatomical label per electrode, 3-D electrode coordinates for two subjects, and a rest period per block. The microphone signal was removed (dandiset description), and no high gamma is stored, so high gamma is computed here from the raw voltage. The paper's subjects are EC2, EC33 and EC31; EC2, GP33 and GP31 are taken to be them (see the data check). EC9 is not in the paper and is not analysed.

Readings. Where the claims file leaves a method detail open it names readings, and every reading is run; a claim's outcome is the one all its method readings give, and it is blocked as methods_underspecified when they differ. The first run of this attempt asked five questions (questions/000019.yaml), answered by a reader on 2026-10-22, and the claims file now names these readings, all run here:

  • the baseline of the z-scores: (a) pre, -1000 to -500 ms before each C-V transition; (b) whole, the whole block; (c) rest, the rest period the dataset marks as baseline (a reading since the answer; the first run showed it as a variant only);
  • the CVs averaged: (a) every CV the dataset holds (all); (b) only CVs with 15 or more renditions (15+); the paper does not say which;
  • the z-scoring before the PCA: row, each electrode's whole concatenated (CV x time) series; time, each electrode across CVs at each time; the paper does not say which;
  • the input projected onto the PCs to give the states: (i) the z-scored matrix given to the PCA; (ii) the baseline z-scored high gamma, as Methods Eq. 5 writes it (added with the answer);
  • the acoustic onset of fig3d: the dandiset has no audio, and the hand-marked syllable start may stand in for it as a deviation, with the result against t = 0 shown beside it (the answer).

The fifth answer says the paper gives no way to derive the distances from the central sulcus and Sylvian fissure from grid geometry or unlabelled coordinates, so the spatial claims stay blocked.

Claim Tested here
data-composition tested
active-electrodes tested
fig1c-e-articulator-electrodes run; its criterion blocks it (metadata_insufficient) when no subject and numbering puts the six named electrodes on vSMC, as here
fig1f-h-phonetic-contrasts tested
fig2a-lips-dorsal blocked: metadata_insufficient (no positions relative to the central sulcus and Sylvian fissure)
fig2b-somatotopic-sequence blocked: metadata_insufficient
suppfig3b-spatial-clustering blocked: metadata_insufficient
suppfig3d-cross-subject blocked: metadata_insufficient
suppfig3f-dv-sequence blocked: metadata_insufficient
suppfig5-intermediate-organization blocked: metadata_insufficient
suppfig6-mixed-tuning tested
fig3d-timing-sequence tested
suppfig7-no-latency-difference blocked: metadata_insufficient
pca-nine-components tested
fig4a-consonant-clusters tested
suppfig11-co-clustering tested
fig4c-d-hierarchy tested
fig4ef-feature-correlations tested
fig5c-separability-timing tested
fig5d-separability-coupling tested
suppfig13-consonant-vowel-distance tested
suppfig9-pc-articulator-weights tested
In [1]:
import itertools
import time
import warnings

import h5py
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import remfile
from scipy import stats
from scipy.cluster.hierarchy import fcluster, linkage
from scipy.spatial.distance import pdist, squareform
from sklearn.metrics import silhouette_score

import bouchard as B

pd.set_option("display.width", 220)
pd.set_option("display.max_columns", 40)
pd.set_option("display.max_rows", 300)
warnings.filterwarnings("ignore", category=RuntimeWarning)
started = time.time()
In [2]:
# Metadata of every file (EC9 included), and a fingerprint of its first samples, read by streaming.
ASSETS = B.assets()
meta_rows = []
for a in ASSETS:
    with h5py.File(remfile.File(a["url"]), "r") as h5:
        m = B.read_metadata(h5)
        m["fingerprint"] = h5["acquisition/ElectricalSeries/data"][:2000, :4].copy()
    m["path"], m["size"] = a["path"], a["size"]
    meta_rows.append(m)
print(f"read metadata of {len(meta_rows)} files of dandiset {B.DANDISET_ID} version {B.DANDISET_VERSION} "
      f"in {time.time() - started:.0f} s")
read metadata of 31 files of dandiset 000019 version 0.220126.2148 in 29 s
In [3]:
# High gamma of the three subjects of the paper: every block is streamed into memory and processed.
blocks = {}
for s in B.SUBJECTS:
    blocks[s] = B.process_blocks([a for a in ASSETS if a["path"].startswith(f"sub-{s}/")],
                                 log=lambda msg: None)
S = {s: B.load_subject(blocks[s]) for s in B.SUBJECTS}
# What each file holds besides the tables: from the processed files in memory, and for EC9 (not
# analysed) from its first file, streamed.
CONTENTS = {a["path"]: b["contents"] for s in B.SUBJECTS for a, b in zip([a for a in ASSETS if a["path"].startswith(f"sub-{s}/")], blocks[s])}
ec9 = next(a for a in ASSETS if a["path"].startswith("sub-EC9/"))
with h5py.File(remfile.File(ec9["url"]), "r") as h5:
    CONTENTS[ec9["path"]] = B.describe_file(h5)
print(f"processed {sum(len(v) for v in blocks.values())} blocks in {time.time() - started:.0f} s")
streamed = sum(a["size"] for a in ASSETS if a["path"].split("/")[0][4:] in B.SUBJECTS)
print(f"streamed {streamed / 1e9:.1f} GB of raw ECoG")
processed 24 blocks in 1014 s
streamed 39.0 GB of raw ECoG

Data check¶

In [4]:
md = B.dandiset_metadata()
print("Dandiset:", md["name"], "| version", B.DANDISET_VERSION, "| DOI", md.get("doi"))
print("Related resource:", [(r.get("relation"), r.get("identifier"), r.get("url")) for r in md.get("relatedResource", [])])
print("Assets summary: subjects", md["assetsSummary"].get("numberOfSubjects"), "| files", md["assetsSummary"].get("numberOfFiles"))
files = pd.DataFrame([{
    "file": m["path"].split("/")[1], "subject": m["subject"], "rate_hz": m["rate"],
    "minutes": m["n_samples"] / m["rate"] / 60, "channels": m["n_channels"], "unit": m["unit"],
    "conversion": m["conversion"], "trials": len(m["condition"]), "speak": int(m["speak"].sum()),
    "bad": int(m["bad"].sum()), "rest_s": sum(b - a for a, b in m["rest"]),
    "invalid_intervals": len(m["invalid"]), "has_xyz": bool(np.isfinite(m["x"]).any()),
    "mean_x": np.nanmean(m["x"]) if np.isfinite(m["x"]).any() else np.nan,
    "electrode_ids": f"{m['electrode_ids'][0]}-{m['electrode_ids'][-1]}"} for m in meta_rows])
print(files.round(2).to_string(index=False))
print("\nFiles and trials per subject:")
print(files.groupby("subject").agg(files=("file", "size"), trials=("trials", "sum"), minutes=("minutes", "sum")).round(1).to_string())
print("\nSampling rates found:", sorted(files.rate_hz.unique()), "(Methods: 3052 Hz)")
print("Trials not marked speak=True, per subject:", (files.trials - files.speak).groupby(files.subject).sum().to_dict())
# What each file holds besides the trial and electrode tables, read from the files.
subj_of = {m["path"]: m["subject"] for m in meta_rows}
objs = pd.DataFrame([{"subject": subj_of[f], "path": o[0], "type": o[1], "shape": o[2]}
                     for f, c in CONTENTS.items() for o in c["objects"]])
print(f"\nFiles described: {len(CONTENTS)} (every file of EC2, GP31 and GP33, and the first of EC9's {sum(m['subject'] == 'EC9' for m in meta_rows)})")
top = objs[objs.path.str.count("/") <= 2].groupby(["path", "type"]).subject.agg(lambda x: f"{x.nunique()} subjects, {len(x)} files")
print("\nObjects under acquisition, processing, analysis and stimulus (two levels), over all files:")
print(top.to_string())
print("Objects with a microphone or audio name:", sorted({p for p in objs.path if any(k in p.lower() for k in ("audio", "micro", "sound", "speech"))}) or "none")
print("Datasets under processing/, with shapes, one file per subject:")
for s in ["EC2", "EC9", "GP31", "GP33"]:
    o = objs[(objs.subject == s) & objs.path.str.startswith("processing/") & objs["shape"].notna()].drop_duplicates("path")
    print(f"  {s}:", o[["path", "shape"]].values.tolist() or "none",
          "| files with processing/:", sum(any(x[0].startswith("processing") for x in c["objects"]) for f, c in CONTENTS.items() if subj_of[f] == s),
          "of", sum(subj_of[f] == s for f in CONTENTS), "described")
spec = [f for f, c in CONTENTS.items() if any(x[1] == "Spectrum" for x in c["objects"])][:1]
if spec:
    with h5py.File(remfile.File(next(a["url"] for a in ASSETS if a["path"] == spec[0])), "r") as h5:
        fr = h5["processing/ecephys/spectrum/frequencies"][:]
        pw = h5["processing/ecephys/spectrum/power"]
        print(f"  {spec[0]}: Spectrum frequencies {fr.min():.2f} to {fr.max():.1f} Hz in {len(fr)} bins; power {pw.shape} "
              f"(frequency x channel); a power spectrum of the ECoG channels, not a time series")
first_of = {s: next(c for f, c in CONTENTS.items() if subj_of[f] == s) for s in ["EC2", "EC9", "GP31", "GP33"]}
print("\nElectrode groups (name: location, description) in each described file, grouped:")
for s in ["EC2", "EC9", "GP31", "GP33"]:
    kinds = pd.Series({f.split("_ses-")[1]: "; ".join(f"{k}: {v.get('location')}, {v.get('description')}" for k, v in c["electrode_groups"].items())
                       for f, c in CONTENTS.items() if subj_of[f] == s})
    print(f"  {s}:", {k: sorted(g.index) for k, g in kinds.groupby(kinds)})
print("Subject fields identical in all described files of a subject:",
      all(c["subject"] == first_of[subj_of[f]]["subject"] for f, c in CONTENTS.items()))
print("Subject and description fields, first file per subject:")
for s in ["EC2", "EC9", "GP31", "GP33"]:
    c = first_of[s]
    print(f"  {s}: subject {c['subject']}; electrode groups {c['electrode_groups']}; {c['text']}")
    print(f"      electrode table columns: {c['electrode_columns']}")
Dandiset: Human ECoG speaking consonant-vowel syllables | version 0.220126.2148 | DOI 10.48324/dandi.000019/0.220126.2148
Related resource: [('dcite:IsDescribedBy', 'DOI:0.1038/nature11911', 'https://doi.org/10.1038/nature11911')]
Assets summary: subjects 4 | files 31
                     file subject  rate_hz  minutes  channels unit  conversion  trials  speak  bad  rest_s  invalid_intervals  has_xyz  mean_x electrode_ids
   sub-EC2_ses-EC2-B1.nwb     EC2  3051.76    10.78       256 volt         0.0     387    387    0   41.00                  6     True   -57.1         0-255
 sub-EC2_ses-EC2-B105.nwb     EC2  3051.76    11.62       256 volt         0.0     311    311    0   10.00                  5     True   -57.1         0-255
  sub-EC2_ses-EC2-B15.nwb     EC2  3051.76     9.58       256 volt         0.0     382    382    7   57.00                  7     True   -57.1         0-255
  sub-EC2_ses-EC2-B76.nwb     EC2  3051.76    11.20       256 volt         0.0     389    389   10   57.00                 28     True   -57.1         0-255
   sub-EC2_ses-EC2-B8.nwb     EC2  3051.76    10.02       256 volt         0.0     384    384    7   15.00                  4     True   -57.1         0-255
  sub-EC2_ses-EC2-B89.nwb     EC2  3051.76    10.00       256 volt         0.0     397    397   10   61.00                 11     True   -57.1         0-255
   sub-EC2_ses-EC2-B9.nwb     EC2  3051.76     9.42       256 volt         0.0     378    378    9   45.00                 13     True   -57.1         0-255
  sub-EC9_ses-EC9-B15.nwb     EC9  3051.76     3.25       256 volt         0.0      70     70    0    7.00                 25    False     NaN         1-256
  sub-EC9_ses-EC9-B39.nwb     EC9  3051.76    15.62       256 volt         0.0     280    278    1    6.00                 12    False     NaN         1-256
  sub-EC9_ses-EC9-B46.nwb     EC9  3051.76    15.92       256 volt         0.0     227    226    1   10.00                  1    False     NaN         1-256
  sub-EC9_ses-EC9-B49.nwb     EC9  3051.76    15.62       256 volt         0.0     254    251    4   24.00                  0    False     NaN         1-256
  sub-EC9_ses-EC9-B53.nwb     EC9  3051.76    15.78       256 volt         0.0     274    273    5   16.00                 17    False     NaN         1-256
  sub-EC9_ses-EC9-B60.nwb     EC9  3051.76    15.90       256 volt         0.0     275    274    2   13.00                  9    False     NaN         1-256
  sub-EC9_ses-EC9-B63.nwb     EC9  3051.76    16.37       256 volt         0.0     273    273    3   12.00                 10    False     NaN         1-256
 sub-GP31_ses-GP31-B1.nwb    GP31  3051.76     6.70       256 volt         0.0     237    237    9    5.00                  0     True   -56.8         0-255
 sub-GP31_ses-GP31-B2.nwb    GP31  3051.76     8.78       256 volt         0.0     315    315   12   20.00                  1     True   -56.8         0-255
sub-GP31_ses-GP31-B21.nwb    GP31  3051.76     7.27       256 volt         0.0     237    237   11   30.00                  0     True   -56.8         0-255
 sub-GP31_ses-GP31-B4.nwb    GP31  3051.76     7.75       256 volt         0.0     224    224    9   60.00                  0     True   -56.8         0-255
 sub-GP31_ses-GP31-B6.nwb    GP31  3051.76    10.25       256 volt         0.0     377    377    9    3.30                  1     True   -56.8         0-255
sub-GP31_ses-GP31-B63.nwb    GP31  3051.76     7.35       256 volt         0.0     374    374    8   12.00                 36     True   -56.8         0-255
sub-GP31_ses-GP31-B65.nwb    GP31  3051.76     6.47       256 volt         0.0     324    324    8    8.00                  0     True   -56.8         0-255
sub-GP31_ses-GP31-B67.nwb    GP31  3051.76     7.95       256 volt         0.0     429    429    8    4.10                  0     True   -56.8         0-255
sub-GP31_ses-GP31-B69.nwb    GP31  3051.76     8.92       256 volt         0.0     430    430    8    6.00                  6     True   -56.8         0-255
sub-GP31_ses-GP31-B71.nwb    GP31  3051.76    11.08       256 volt         0.0     481    481    8   16.00                  0     True   -56.8         0-255
sub-GP31_ses-GP31-B78.nwb    GP31  3051.76    10.42       256 volt         0.0     424    424   10   18.00                  1     True   -56.8         0-255
sub-GP31_ses-GP31-B82.nwb    GP31  3051.76    11.77       256 volt         0.0     529    529   12   55.00                  5     True   -56.8         0-255
sub-GP31_ses-GP31-B83.nwb    GP31  3051.76    12.00       256 volt         0.0     582    582    9    4.00                  0     True   -56.8         0-255
 sub-GP31_ses-GP31-B9.nwb    GP31  3051.76     9.60       256 volt         0.0     322    322   11   50.00                 50     True   -56.8         0-255
 sub-GP33_ses-GP33-B1.nwb    GP33  3051.76     9.12       256 volt         0.0     339    339    9   77.97                  0    False     NaN         1-256
sub-GP33_ses-GP33-B30.nwb    GP33  3051.76    10.97       256 volt         0.0     612    612   26   49.57                 26    False     NaN         1-256
 sub-GP33_ses-GP33-B5.nwb    GP33  3051.76    11.63       256 volt         0.0     507    507    8   54.62                 14    False     NaN         1-256

Files and trials per subject:
         files  trials  minutes
subject                        
EC2          7    2628     72.6
EC9          7    1653     98.5
GP31        14    5285    126.3
GP33         3    1458     31.7

Sampling rates found: [np.float64(3051.7578), np.float64(3051.7578125)] (Methods: 3052 Hz)
Trials not marked speak=True, per subject: {'EC2': 0, 'EC9': 8, 'GP31': 0, 'GP33': 0}

Files described: 25 (every file of EC2, GP31 and GP33, and the first of EC9's 7)

Objects under acquisition, processing, analysis and stimulus (two levels), over all files:
path                                        type              
acquisition/ElectricalSeries                ElectricalSeries      4 subjects, 25 files
acquisition/ElectricalSeries/data                                 4 subjects, 25 files
acquisition/ElectricalSeries/electrodes     DynamicTableRegion    4 subjects, 25 files
acquisition/ElectricalSeries/starting_time                        4 subjects, 25 files
processing/ecephys                          ProcessingModule       1 subjects, 1 files
processing/ecephys/spectrum                 Spectrum               1 subjects, 1 files
stimulus/presentation                                             4 subjects, 25 files
stimulus/templates                                                4 subjects, 25 files
Objects with a microphone or audio name: none
Datasets under processing/, with shapes, one file per subject:
  EC2: [['processing/ecephys/spectrum/frequencies', (15259,)], ['processing/ecephys/spectrum/power', (15259, 256)]] | files with processing/: 1 of 7 described
  EC9: none | files with processing/: 0 of 1 described
  GP31: none | files with processing/: 0 of 14 described
  GP33: none | files with processing/: 0 of 3 described
  sub-EC2/sub-EC2_ses-EC2-B1.nwb: Spectrum frequencies 0.00 to 1525.8 Hz in 15259 bins; power (15259, 256) (frequency x channel); a power spectrum of the ECoG channels, not a time series

Electrode groups (name: location, description) in each described file, grouped:
  EC2: {'L256Grid electrodes: grid, L256Grid': ['EC2-B1.nwb', 'EC2-B105.nwb', 'EC2-B15.nwb', 'EC2-B76.nwb', 'EC2-B8.nwb', 'EC2-B89.nwb', 'EC2-B9.nwb']}
  EC9: {'256Grid electrodes: location, auto_group': ['EC9-B15.nwb']}
  GP31: {'L256Grid electrodes: grid, L256Grid': ['GP31-B1.nwb', 'GP31-B2.nwb', 'GP31-B21.nwb', 'GP31-B4.nwb', 'GP31-B6.nwb', 'GP31-B63.nwb', 'GP31-B65.nwb', 'GP31-B67.nwb', 'GP31-B69.nwb', 'GP31-B71.nwb', 'GP31-B78.nwb', 'GP31-B82.nwb', 'GP31-B83.nwb', 'GP31-B9.nwb']}
  GP33: {'auto_group: location, auto_group': ['GP33-B1.nwb', 'GP33-B30.nwb', 'GP33-B5.nwb']}
Subject fields identical in all described files of a subject: True
Subject and description fields, first file per subject:
  EC2: subject {'species': 'Homo sapiens', 'subject_id': 'EC2'}; electrode groups {'L256Grid electrodes': {'location': 'grid', 'description': 'L256Grid'}}; {'institution': 'University of California, San Francisco', 'lab': 'Chang Lab', 'session_description': 'EC2_B1'}
      electrode table columns: {'bad': 'bool', 'filtering': ['none'], 'group_name': ['L256Grid electrodes'], 'id': 'int64', 'imp': 'float64', 'location': ['caudalmiddlefrontal', 'middletemporal', 'parsopercularis', 'postcentral', 'precentral', 'superiortemporal'], 'x': 'float64', 'y': 'float64', 'z': 'float64'}
  EC9: subject {'species': 'Homo sapiens', 'subject_id': 'EC9'}; electrode groups {'256Grid electrodes': {'location': 'location', 'description': 'auto_group'}}; {'institution': 'University of California, San Francisco', 'lab': 'Chang Lab', 'session_description': 'EC9_B15'}
      electrode table columns: {'bad': 'bool', 'filtering': ['none'], 'group_name': ['256Grid electrodes'], 'id': 'int64', 'imp': 'float64', 'location': ['', 'postcentral', 'precentral'], 'x': 'float64', 'y': 'float64', 'z': 'float64'}
  GP31: subject {'species': 'Homo sapiens', 'subject_id': 'GP31'}; electrode groups {'L256Grid electrodes': {'location': 'grid', 'description': 'L256Grid'}}; {'institution': 'University of California, San Francisco', 'lab': 'Chang Lab', 'session_description': 'GP31_B1'}
      electrode table columns: {'bad': 'bool', 'filtering': ['none'], 'group_name': ['L256Grid electrodes'], 'id': 'int64', 'imp': 'float64', 'location': ['caudalmiddlefrontal', 'middletemporal', 'parsopercularis', 'postcentral', 'precentral', 'superiortemporal'], 'x': 'float64', 'y': 'float64', 'z': 'float64'}
  GP33: subject {'species': 'Homo sapiens', 'subject_id': 'GP33'}; electrode groups {'auto_group': {'location': 'location', 'description': 'auto_group'}}; {'institution': 'University of California, San Francisco', 'lab': 'Chang Lab', 'session_description': 'GP33_B1'}
      electrode table columns: {'bad': 'bool', 'filtering': ['none'], 'group_name': ['auto_group'], 'id': 'int64', 'imp': 'float64', 'location': ['caudalmiddlefrontal', 'parsopercularis', 'postcentral', 'precentral', 'superiortemporal'], 'x': 'float64', 'y': 'float64', 'z': 'float64'}
In [5]:
# Duplicates: blocks with the same length, the same trial table, or the same first samples.
pairs = []
for i, j in itertools.combinations(range(len(meta_rows)), 2):
    a, b = meta_rows[i], meta_rows[j]
    same_n = a["n_samples"] == b["n_samples"]
    same_trials = len(a["cv"]) == len(b["cv"]) and np.allclose(a["cv"], b["cv"])
    same_data = np.array_equal(a["fingerprint"], b["fingerprint"])
    if same_n or same_trials or same_data:
        pairs.append((a["path"], b["path"], same_n, same_trials, same_data))
print("Pairs sharing sample count, trial times or first 2000 samples of 4 channels:")
for p in pairs:
    print("  ", p)
Pairs sharing sample count, trial times or first 2000 samples of 4 channels:
   ('sub-EC9/sub-EC9_ses-EC9-B39.nwb', 'sub-EC9/sub-EC9_ses-EC9-B49.nwb', True, False, False)

Only one pair of files shares a property (two EC9 blocks with the same number of samples); their trial times and first samples differ, so no recording was deposited twice.

In [6]:
# Syllables per subject, from the trial labels.
label_rows = []
for m in meta_rows:
    for c in m["condition"]:
        label_rows.append({"subject": m["subject"], "label": c, "cv": B.parse_label(c)})
labels = pd.DataFrame(label_rows)
for s, g in labels.groupby("subject"):
    unparsed = g[g.cv.isna()].label.value_counts().to_dict()
    cv = g.dropna().cv
    cons = sorted({c for c, v in cv}, key=B.CONSONANTS.index)
    counts = cv.value_counts()
    print(f"{s}: {len(g)} trials, {counts.size} distinct CVs, {len(cons)} consonants; renditions per CV "
          f"{counts.min()} to {counts.max()}; labels that are not CVs of the task: {unparsed}")
    missing = [c + v for c in B.CONSONANTS for v in "aiu" if (c, v) not in set(cv)]
    print(f"    CVs missing: {missing}; CVs with fewer than 15 renditions: "
          f"{ {''.join(k): int(n) for k, n in counts.items() if n < 15} }; more than 100: "
          f"{ {''.join(k): int(n) for k, n in counts.items() if n > 100} }")
print("Labels merged as misspellings:", labels[labels.label.isin(list(B.SPELLING))].groupby(["subject", "label"]).size().to_dict())
print("Spellings merged: 'she' -> 'shee', 'ha' -> 'haa'. Paper: 19, 19 and 18 consonants, 168 CVs (57 + 57 + 54), 15 to 100 renditions each.")
EC2: 2628 trials, 57 distinct CVs, 19 consonants; renditions per CV 10 to 58; labels that are not CVs of the task: {}
    CVs missing: []; CVs with fewer than 15 renditions: {'thi': 10}; more than 100: {}
EC9: 1653 trials, 57 distinct CVs, 19 consonants; renditions per CV 7 to 46; labels that are not CVs of the task: {np.str_('dhee'): 8, np.str_(''): 6, np.str_('dhoo'): 6, np.str_('chee'): 5, np.str_('dhaa'): 5, np.str_('jee'): 2, np.str_('skee'): 1, np.str_('ya'): 1, np.str_('kay'): 1, np.str_('chaa'): 1, np.str_('choo'): 1}
    CVs missing: []; CVs with fewer than 15 renditions: {'thi': 12, 'thu': 10, 'tha': 7}; more than 100: {}
GP31: 5285 trials, 55 distinct CVs, 19 consonants; renditions per CV 2 to 107; labels that are not CVs of the task: {}
    CVs missing: ['tha', 'thu']; CVs with fewer than 15 renditions: {'thi': 2}; more than 100: {'la': 107, 'di': 106, 'da': 105, 'ga': 105, 'sha': 105, 'ha': 105, 'bi': 105, 'ni': 105, 'hi': 105, 'li': 105, 'yu': 105, 'ka': 104, 'na': 104, 'sa': 104, 'va': 104, 'ti': 104, 'ki': 104, 'mi': 104, 'shi': 104, 'si': 104, 'du': 104, 'nu': 104, 'ba': 103, 'ta': 103, 'shu': 103, 'hu': 103, 'ma': 102, 'ra': 102, 'ya': 102, 'wi': 102, 'tu': 102, 'lu': 102, 'wa': 101}
GP33: 1458 trials, 57 distinct CVs, 19 consonants; renditions per CV 22 to 28; labels that are not CVs of the task: {}
    CVs missing: []; CVs with fewer than 15 renditions: {}; more than 100: {}
Labels merged as misspellings: {('EC2', np.str_('she')): 2, ('EC9', np.str_('ha')): 1, ('EC9', np.str_('she')): 1, ('GP33', np.str_('ha')): 2}
Spellings merged: 'she' -> 'shee', 'ha' -> 'haa'. Paper: 19, 19 and 18 consonants, 168 CVs (57 + 57 + 54), 15 to 100 renditions each.
In [7]:
# Electrodes: labels, bad flags, coordinates.
for s in ["EC2", "EC9", "GP31", "GP33"]:
    ms = [m for m in meta_rows if m["subject"] == s]
    same_loc = all(np.array_equal(m["location"], ms[0]["location"]) for m in ms)
    loc = pd.Series(ms[0]["location"]).replace("", "(none)").value_counts().to_dict()
    badsets = sorted({tuple(np.where(m["bad"])[0]) for m in ms}, key=len)
    print(f"{s}: labels identical in all blocks {same_loc}; labels {loc}")
    print(f"    bad-channel sets over blocks: {[list(b) for b in badsets]}")
    x = ms[0]["x"]
    if np.isfinite(x).any():
        print(f"    x {np.nanmin(x):.1f} to {np.nanmax(x):.1f}, y {np.nanmin(ms[0]['y']):.1f} to {np.nanmax(ms[0]['y']):.1f}, "
              f"z {np.nanmin(ms[0]['z']):.1f} to {np.nanmax(ms[0]['z']):.1f} (no unit or frame given); "
              f"neighbour spacing median {np.median(np.linalg.norm(np.diff(np.c_[x, ms[0]['y'], ms[0]['z']], axis=0), axis=1)):.2f}")
    else:
        print("    no coordinates (x, y, z are NaN)")
for s in B.SUBJECTS:
    print(f"{s}: vSMC (precentral or postcentral, good in every block) {len(S[s]['vsmc'])} electrodes; "
          f"electrodes bad in any block {int((~S[s]['good']).sum())}")
print("vSMC electrodes over the three subjects:", sum(len(S[s]["vsmc"]) for s in B.SUBJECTS), "(Supplementary Figure 9: n = 266)")
EC2: labels identical in all blocks True; labels {'superiortemporal': 51, 'postcentral': 44, 'precentral': 44, 'middletemporal': 37, 'supramarginal': 27, 'parsopercularis': 27, 'caudalmiddlefrontal': 26}
    bad-channel sets over blocks: [[], [np.int64(48), np.int64(112), np.int64(113), np.int64(114), np.int64(115), np.int64(123), np.int64(127)], [np.int64(48), np.int64(112), np.int64(113), np.int64(114), np.int64(115), np.int64(123), np.int64(127), np.int64(192), np.int64(240)], [np.int64(48), np.int64(112), np.int64(113), np.int64(114), np.int64(115), np.int64(123), np.int64(127), np.int64(192), np.int64(238), np.int64(240)]]
    x -62.6 to -34.6, y -37.5 to 28.4, z -19.0 to 54.0 (no unit or frame given); neighbour spacing median 4.38
EC9: labels identical in all blocks False; labels {'(none)': 177, 'precentral': 41, 'postcentral': 38}
    bad-channel sets over blocks: [[], [np.int64(89)], [np.int64(89), np.int64(255)], [np.int64(64), np.int64(65), np.int64(66)], [np.int64(89), np.int64(244), np.int64(245), np.int64(255)], [np.int64(64), np.int64(65), np.int64(66), np.int64(89), np.int64(255)]]
    no coordinates (x, y, z are NaN)
GP31: labels identical in all blocks True; labels {'superiortemporal': 59, 'middletemporal': 54, 'postcentral': 44, 'precentral': 42, 'parsopercularis': 24, 'supramarginal': 22, 'caudalmiddlefrontal': 11}
    bad-channel sets over blocks: [[np.int64(48), np.int64(112), np.int64(113), np.int64(114), np.int64(115), np.int64(123), np.int64(127), np.int64(255)], [np.int64(48), np.int64(64), np.int64(66), np.int64(112), np.int64(113), np.int64(114), np.int64(115), np.int64(123), np.int64(255)], [np.int64(18), np.int64(48), np.int64(112), np.int64(113), np.int64(114), np.int64(115), np.int64(123), np.int64(127), np.int64(255)], [np.int64(48), np.int64(64), np.int64(66), np.int64(112), np.int64(113), np.int64(114), np.int64(115), np.int64(123), np.int64(127), np.int64(255)], [np.int64(48), np.int64(64), np.int64(65), np.int64(66), np.int64(112), np.int64(113), np.int64(114), np.int64(115), np.int64(123), np.int64(127), np.int64(255)], [np.int64(48), np.int64(64), np.int64(66), np.int64(112), np.int64(113), np.int64(114), np.int64(115), np.int64(123), np.int64(127), np.int64(195), np.int64(201), np.int64(255)], [np.int64(18), np.int64(48), np.int64(64), np.int64(65), np.int64(66), np.int64(112), np.int64(113), np.int64(114), np.int64(115), np.int64(123), np.int64(127), np.int64(255)]]
    x -61.6 to -44.3, y -31.1 to 40.2, z -11.9 to 60.5 (no unit or frame given); neighbour spacing median 3.86
GP33: labels identical in all blocks True; labels {'precentral': 77, 'parsopercularis': 58, 'caudalmiddlefrontal': 52, 'superiortemporal': 43, 'postcentral': 26}
    bad-channel sets over blocks: [[np.int64(48), np.int64(112), np.int64(113), np.int64(114), np.int64(115), np.int64(123), np.int64(127), np.int64(255)], [np.int64(48), np.int64(112), np.int64(113), np.int64(114), np.int64(115), np.int64(123), np.int64(127), np.int64(192), np.int64(255)], [np.int64(18), np.int64(19), np.int64(48), np.int64(112), np.int64(113), np.int64(114), np.int64(115), np.int64(123), np.int64(127), np.int64(208), np.int64(209), np.int64(210), np.int64(211), np.int64(212), np.int64(213), np.int64(214), np.int64(215), np.int64(216), np.int64(217), np.int64(218), np.int64(219), np.int64(220), np.int64(221), np.int64(222), np.int64(223), np.int64(255)]]
    no coordinates (x, y, z are NaN)
EC2: vSMC (precentral or postcentral, good in every block) 86 electrodes; electrodes bad in any block 10
GP31: vSMC (precentral or postcentral, good in every block) 83 electrodes; electrodes bad in any block 14
GP33: vSMC (precentral or postcentral, good in every block) 99 electrodes; electrodes bad in any block 27
vSMC electrodes over the three subjects: 268 (Supplementary Figure 9: n = 266)

The archive's summary counts four subjects. EC2 matches the paper's EC2 by name. GP31 and GP33 are not names the paper uses; the paper's other two subjects are EC31 (left hemisphere) and EC33 (right). No field in the files links them: the subject fields hold only the species and the subject id, and the session descriptions name only the block (printed above). In EC2 and GP31 the electrode group is named L256Grid electrodes, and every electrode has a negative x; both fit a left hemisphere if the L and the x mean what they usually do. GP33's group is auto_group, with location location, and GP33 has no coordinates, so its hemisphere cannot be checked. GP31 is the subject with 18 consonants that have all three vowels (/tha/ and /thu/ are missing, table of data-composition), which fits the paper's subject with 18 consonants and 54 CVs. That GP31 is EC31 and GP33 is EC33 is an assumption the data are consistent with, not shown by them. EC9 has 23 consonant labels (including /ch/, /dh/, /j/, /sk/), labels on only 79 of 256 electrodes and no coordinates; it is not one of the paper's subjects and is left out.

Besides the raw series, one file (EC2 block 1) has a processing module holding a power spectrum of the 256 channels (frequency by channel, no time axis); no file holds audio or a microphone series. The kept trials whose epoch overlaps an interval marked as an ECoG artifact are counted once per trial (162); counted once per trial and interval, as in the first version of this check, they are 177.

In [8]:
# Trials kept, trials in invalid intervals, rest periods, and the high-gamma statistics.
rows = []
for s in B.SUBJECTS:
    for b in blocks[s]:
        cv = b["cv"]
        pairs_inv = sum(((cv[b["kept"]] + 0.75 > a0) & (cv[b["kept"]] - 0.5 < a1)).sum() for a0, a1 in b["invalid"])
        g = ~b["bad"]
        rows.append({"subject": s, "block": b["session"], "trials": len(cv), "kept": len(b["kept"]),
                     "kept_in_invalid": int(b["in_invalid"].sum()), "trial_interval_overlaps": int(pairs_inv), "rest_s": round(b["rest_seconds"], 1),
                     "hg_whole_mean_uV": float(np.nanmedian(b["hg_stats"]["whole"][0][g]) * 1e6),
                     "hg_whole_sd_over_mean": float(np.nanmedian(b["hg_stats"]["whole"][1][g] / b["hg_stats"]["whole"][0][g])),
                     "pre_mean_over_whole": float(np.nanmedian(b["hg_stats"]["pre"][0][g] / b["hg_stats"]["whole"][0][g])),
                     "rest_mean_over_whole": float(np.nanmedian(b["hg_stats"]["rest"][0][g] / b["hg_stats"]["whole"][0][g])),
                     "rest_sd_over_whole": float(np.nanmedian(b["hg_stats"]["rest"][1][g] / b["hg_stats"]["whole"][1][g])),
                     "env_rate": round(b["env_rate"], 3)})
blk = pd.DataFrame(rows)
print(blk.round(3).to_string(index=False))
print("\nTrials dropped (epoch -1000 to +750 ms outside the recording):", int((blk.trials - blk.kept).sum()))
print("Kept trials whose epoch overlaps an 'ECoG artifact' invalid interval (not excluded; the claims file does not say to):",
      int(blk.kept_in_invalid.sum()), "of", int(blk.kept.sum()), "| overlaps counted per trial and interval:", int(blk.trial_interval_overlaps.sum()))
sd_raw = {s: float(np.median([np.std(m["fingerprint"], axis=0).mean() for m in meta_rows if m["subject"] == s])) for s in B.SUBJECTS}
print("Raw series: unit", meta_rows[0]["unit"], "with conversion", meta_rows[0]["conversion"],
      "| median SD of the stored values over the first 2000 samples of 4 channels:", {k: f"{v:.1e}" for k, v in sd_raw.items()})
print("hg_whole_mean_uV above is the stored high-gamma amplitude x 1e6, without the conversion factor.")
for s in B.SUBJECTS:
    for base in B.BASELINES:
        H = S[s]["H"][base][:, S[s]["vsmc"]]
        print(f"{s} {base:5s}: per-CV mean z over vSMC electrodes, range {np.nanmin(H):.2f} to {np.nanmax(H):.2f}; "
              f"mean over -500 to -400 ms {np.nanmean(H[:, :, :21]):.2f}")
subject    block  trials  kept  kept_in_invalid  trial_interval_overlaps  rest_s  hg_whole_mean_uV  hg_whole_sd_over_mean  pre_mean_over_whole  rest_mean_over_whole  rest_sd_over_whole  env_rate
    EC2   EC2_B1     387   387                8                        8    41.0             3.874                  0.239                0.990                 1.017               0.949   400.001
    EC2 EC2_B105     311   311                0                        0    10.0             3.513                  0.259                0.980                 0.994               1.073   400.001
    EC2  EC2_B15     382   382                4                        4    57.0             4.180                  0.238                0.992                 0.966               0.936   400.002
    EC2  EC2_B76     389   389               19                       20    57.0             3.746                  0.281                0.977                 1.063               1.211   400.001
    EC2   EC2_B8     384   384                3                        3    15.0             3.703                  0.243                0.993                 1.074               1.069   400.002
    EC2  EC2_B89     397   397                6                        6    61.0             4.648                  0.214                0.996                 0.989               0.953   400.002
    EC2   EC2_B9     378   378               11                       12    45.0             3.732                  0.241                0.989                 1.015               1.009   400.002
   GP31  GP31_B1     237   236                0                        0     5.0             2.967                  0.218                0.991                 1.066               0.941   400.002
   GP31  GP31_B2     315   315                1                        1    20.0             2.956                  0.248                0.990                 1.040               0.942   400.002
   GP31 GP31_B21     237   237                0                        0    30.0             2.043                  0.201                0.988                 1.034               1.076   400.002
   GP31  GP31_B4     224   224                0                        0    60.0             2.939                  0.227                0.992                 1.010               0.980   400.002
   GP31  GP31_B6     377   377                1                        1     3.3             2.949                  0.212                0.991                 1.027               1.248   400.001
   GP31 GP31_B63     374   374               38                       39    12.0             2.688                  0.406                1.004                 0.851               0.297   400.002
   GP31 GP31_B65     324   324                0                        0     8.0             2.251                  0.177                1.002                 0.958               0.978   400.002
   GP31 GP31_B67     429   429                0                        0     4.1             1.998                  0.191                0.999                 1.016               1.159   400.002
   GP31 GP31_B69     430   430                9                       11     6.0             1.912                  0.204                0.999                 0.979               0.985   400.002
   GP31 GP31_B71     481   481                0                        0    16.0             1.854                  0.204                0.995                 0.952               1.000   400.001
   GP31 GP31_B78     424   424                0                        0    18.0             1.864                  0.234                0.986                 0.991               0.910   400.002
   GP31 GP31_B82     529   529               11                       11    55.0             1.975                  0.213                0.994                 1.006               0.946   400.001
   GP31 GP31_B83     582   582                0                        0     4.0             2.039                  0.250                1.004                 1.100               0.898   400.001
   GP31  GP31_B9     322   322               15                       23    50.0             2.928                  1.147                0.938                 1.067               1.109   400.002
   GP33  GP33_B1     339   339                0                        0    78.0             4.442                  0.275                0.996                 1.000               0.909   400.001
   GP33 GP33_B30     612   612               27                       27    49.6             2.964                  0.297                1.017                 0.917               0.852   400.001
   GP33  GP33_B5     507   507                9                       11    54.6             4.118                  0.200                0.992                 1.005               1.019   400.001

Trials dropped (epoch -1000 to +750 ms outside the recording): 1
Kept trials whose epoch overlaps an 'ECoG artifact' invalid interval (not excluded; the claims file does not say to): 162 of 9370 | overlaps counted per trial and interval: 177
Raw series: unit volt with conversion 0.001 | median SD of the stored values over the first 2000 samples of 4 channels: {'EC2': '2.5e-05', 'GP31': '6.3e-05', 'GP33': '8.1e-05'}
hg_whole_mean_uV above is the stored high-gamma amplitude x 1e6, without the conversion factor.
EC2 pre  : per-CV mean z over vSMC electrodes, range -1.04 to 4.21; mean over -500 to -400 ms -0.10
EC2 whole: per-CV mean z over vSMC electrodes, range -0.92 to 3.38; mean over -500 to -400 ms -0.13
EC2 rest : per-CV mean z over vSMC electrodes, range -1.02 to 5.96; mean over -500 to -400 ms 0.03
GP31 pre  : per-CV mean z over vSMC electrodes, range -1.64 to 3.98; mean over -500 to -400 ms -0.02
GP31 whole: per-CV mean z over vSMC electrodes, range -1.63 to 3.57; mean over -500 to -400 ms -0.04
GP31 rest : per-CV mean z over vSMC electrodes, range -1.65 to 7.12; mean over -500 to -400 ms 0.07
GP33 pre  : per-CV mean z over vSMC electrodes, range -0.98 to 3.10; mean over -500 to -400 ms -0.02
GP33 whole: per-CV mean z over vSMC electrodes, range -0.99 to 2.82; mean over -500 to -400 ms -0.06
GP33 rest : per-CV mean z over vSMC electrodes, range -0.99 to 3.71; mean over -500 to -400 ms 0.07

Units: the raw series says volts with a conversion factor of 0.001, so by NWB the stored values times 0.001 are volts. The stored values have an SD of a few 1e-5 (printed above): read as volts this is tens of microvolts, a usual ECoG amplitude, while with the factor it would be tens of nanovolts. The data are consistent with values already in volts and a wrong conversion factor; this does not affect the analysis, which uses z-scores only. Sampling rate 3051.7578 Hz in all files, the TDT rate the Methods round to 3052 Hz. The pre baseline (-1000 to -500 ms before each C-V transition) has a median mean within a few percent of the whole block's. The rest periods are short (3.3 to 78 s per block) and their statistics differ from the whole block's in both directions by block (median ratios above); z-scores against them reach higher maxima (ranges above). The rest period is baseline reading (c) of the claims file.

In [9]:
# Clock check: the trial times and the ECoG share a clock if the high gamma tells syllables apart
# at the times the paper says, and not before speech. Leave-one-out nearest-centroid classification
# of the vowel (/a/, /i/, /u/) and of the major oral articulator of the consonant (labial, coronal,
# dorsal; reading (a) of the labels) from the vSMC high-gamma pattern of each CV, at each time.
def loo_accuracy(X, y):
    ok = 0
    for i in range(len(y)):
        mask = np.arange(len(y)) != i
        cents = {c: X[mask & (y == c)].mean(0) for c in np.unique(y[mask])}
        pred = min(cents, key=lambda c: np.linalg.norm(X[i] - cents[c]))
        ok += pred == y[i]
    return ok / len(y)

clock = []
for s in B.SUBJECTS:
    H = S[s]["H"]["pre"][:, S[s]["vsmc"]]
    vow = np.array([v for c, v in S[s]["cvs"]])
    maj = np.array([B.MAJOR["a"].get(c, "") for c, v in S[s]["cvs"]])
    lab = maj != ""
    for t in range(0, len(B.EPOCH_MS), 5):
        clock.append({"subject": s, "t_ms": B.EPOCH_MS[t], "vowel": loo_accuracy(H[:, :, t], vow),
                      "consonant": loo_accuracy(H[lab][:, :, t], maj[lab])})
clock = pd.DataFrame(clock)
summary = clock.groupby("t_ms")[["vowel", "consonant"]].mean()
print("Mean accuracy over subjects (chance 1/3 for vowels; 0.5 to 0.53 for consonants, the largest class share):")
print(summary.iloc[::4].round(2).T.to_string())
for col in ["vowel", "consonant"]:
    print(f"{col}: peak {summary[col].max():.2f} at {summary[col].idxmax()} ms; mean before -400 ms {summary[col][summary.index < -400].mean():.2f}")
fig, ax = plt.subplots(figsize=(6, 3))
summary.plot(ax=ax)
ax.axvline(0, color="k", lw=0.5)
ax.set_xlabel("time from C-V transition (ms)"); ax.set_ylabel("LOO accuracy")
plt.show()
Mean accuracy over subjects (chance 1/3 for vowels; 0.5 to 0.53 for consonants, the largest class share):
t_ms       -500  -400  -300  -200  -100   0     100   200   300   400   500   600   700
vowel      0.38  0.41  0.42  0.35  0.34  0.28  0.63  0.80  0.76  0.74  0.70  0.57  0.48
consonant  0.58  0.62  0.76  0.79  0.89  0.89  0.71  0.44  0.40  0.46  0.45  0.45  0.47
vowel: peak 0.83 at 250 ms; mean before -400 ms 0.39
consonant: peak 0.89 at -75 ms; mean before -400 ms 0.59
No description has been provided for this image

The consonant's articulator is decoded best before the C-V transition (0.89 at -75 ms) and the vowel after it (0.83 at 250 ms), and both are near chance at the start of the epoch (vowel 0.39 against 1/3; consonant 0.59 against a largest-class share of about 0.5). This is consistent with the trial times and the ECoG sharing a clock in every subject, with the annotations marking the C-V transition; it does not show the alignment to the millisecond.

The two matrices transcribed from the supplement, printed and drawn as in the figures (1 white, 0 black), so that the transcription can be checked against Supplementary Figures 1d and 12.

In [10]:
# Supplementary Figure 1d (articulators) and Supplementary Figure 12 (phonetic features), as transcribed.
cons_cv = [(c, "a") for c in B.CONSONANTS]
art = pd.DataFrame(B.articulator_matrix(cons_cv)[:, :4].astype(int), index=B.CONSONANTS, columns=B.ARTICULATORS)
feat = pd.DataFrame(np.c_[B.feature_matrix(cons_cv, "location"), B.feature_matrix(cons_cv, "degree")].astype(int),
                    index=B.CONSONANTS, columns=B.LOCATION + B.DEGREE)
vow = pd.DataFrame({v: np.r_[B.articulator_matrix([("b", v)])[0, 4:], B.feature_matrix([("b", v)], "vowel")[0]].astype(int)
                    for v in "aiu"}, index=[f"{a} (1d)" for a in B.VOWEL_ARTICULATORS] + [f"{f} (12)" for f in B.VOWEL_FEATURES])
print("Consonant rows of Supplementary Figure 1d (articulators):")
print(art.T.to_string())
print("\nConsonant features of Supplementary Figure 12 (location, then degree and shape):")
print(feat.T.to_string())
print("\nVowel rows of both figures:")
print(vow.to_string())
fig, axes = plt.subplots(1, 3, figsize=(13, 4), gridspec_kw={"width_ratios": [19, 19, 3]})
for ax, (m, title) in zip(axes, [(feat.T, "Suppl. Fig. 12, consonants"), (art.T, "Suppl. Fig. 1d, consonants"), (vow, "vowels")]):
    ax.imshow(m.values, cmap="gray", vmin=0, vmax=1, aspect="auto")
    ax.set_xticks(range(m.shape[1])); ax.set_xticklabels(m.columns, fontsize=7)
    ax.set_yticks(range(m.shape[0])); ax.set_yticklabels(m.index, fontsize=7); ax.set_title(title, fontsize=9)
plt.tight_layout(); plt.show()
Consonant rows of Supplementary Figure 1d (articulators):
        b  d  f  g  h  k  l  m  n  p  r  s  sh  t  th  v  w  y  z
Lips    1  0  1  0  0  0  0  1  0  1  0  0   0  0   0  1  1  0  0
Tongue  0  1  0  1  0  1  1  0  1  0  1  1   1  1   1  0  1  1  1
Larynx  1  1  0  1  0  0  1  1  1  0  1  0   0  0   0  1  1  1  1
Jaw     1  1  1  0  0  0  1  1  1  1  1  1   1  1   1  1  1  1  1

Consonant features of Supplementary Figure 12 (location, then degree and shape):
                  b  d  f  g  h  k  l  m  n  p  r  s  sh  t  th  v  w  y  z
Bilabial          1  0  0  0  0  0  0  1  0  1  0  0   0  0   0  0  1  0  0
Secondary Labial  0  0  0  0  0  0  0  0  0  0  1  0   1  0   0  0  0  0  0
Labiodental       0  0  1  0  0  0  0  0  0  0  0  0   0  0   0  1  0  0  0
Dental            0  0  0  0  0  0  0  0  0  0  0  0   0  0   1  0  0  0  0
Alveolar          0  1  0  0  0  0  1  0  1  0  0  1   0  1   0  0  0  0  1
Post Alveolar     0  0  0  0  0  0  0  0  0  0  1  0   1  0   0  0  0  1  0
Velar             0  0  0  1  0  1  0  0  0  0  0  0   0  0   0  0  1  0  0
Voiced            1  1  0  1  0  0  1  1  1  0  1  0   0  0   0  1  1  1  1
Mandibular        1  1  1  0  0  0  1  1  1  1  1  1   1  1   1  1  1  1  1
Oral Stop         1  1  0  1  0  1  0  1  1  1  0  0   0  1   0  0  0  0  0
Fricative         0  0  1  0  0  0  0  0  0  0  0  1   1  0   1  1  0  0  1
Approximate       0  0  0  0  0  0  0  0  0  0  1  0   0  0   0  0  1  1  0
Nasal Stop        0  0  0  0  0  0  0  1  1  0  0  0   0  0   0  0  0  0  0
Lateral           0  0  0  0  0  0  1  0  0  0  0  0   0  0   0  0  0  0  0
Rhotic            0  0  0  0  0  0  0  0  0  0  1  0   0  0   0  0  0  0  0

Vowel rows of both figures:
                   a  i  u
Back Tongue (1d)   1  0  1
High Tongue (1d)   0  1  1
Back Tongue (12)   1  0  1
High Tongue (12)   0  1  1
Lip Rounding (12)  0  0  1
Jaw Open (12)      1  0  0
No description has been provided for this image

Shared computations¶

The partial correlations and the GLM (Methods Eqs. 2 to 4) are computed once per baseline and CV set, and the state space (Methods Eq. 5) once per baseline, CV set and z-scoring reading; the states K of each CV are then projected from the PCA input (reading i) or from the baseline z-scored high gamma (reading ii). The articulator windows T_A come from the timing analysis under each of its eight readings (claim fig3d-timing-sequence: threshold set per subject or pooled, over all six articulators or per articulator, and onset at the threshold or at half the peak).

In [11]:
BASES = B.BASELINES      # baseline readings (a) pre, (b) whole, (c) rest (claims header)
ZMODES = ("row", "time")  # z-scoring before the PCA (claims header)
PROJ = ("i", "ii")        # input projected: (i) the PCA input, (ii) Hg as Eq. 5 writes it
ART6 = B.ARTICULATORS + B.VOWEL_ARTICULATORS
TIMING_READINGS = list(itertools.product(("per subject", "pooled"), ("all six", "per articulator"), ("threshold", "half peak")))
CVSETS = ("all", "15+")    # (a) every CV, (b) only CVs with at least 15 renditions (claims header)
CVIDX = {(s, cs): np.where(S[s]["counts"] >= (15 if cs == "15+" else 0))[0] for s in B.SUBJECTS for cs in CVSETS}
CVS = {k: [S[k[0]]["cvs"][i] for i in v] for k, v in CVIDX.items()}
AM = {k: B.articulator_matrix(v) for k, v in CVS.items()}
HV = {(s, base, cs): S[s]["H"][base][CVIDX[s, cs]][:, S[s]["vsmc"]]
      for s in B.SUBJECTS for base in B.BASELINES for cs in CVSETS}
RHO = {(s, base, cs): B.partial_correlation(HV[s, base, cs], AM[s, cs]) for s in B.SUBJECTS for base in BASES for cs in CVSETS}
GLM = {(s, base, cs): B.glm(HV[s, base, cs], AM[s, cs][:, :4]) for s in B.SUBJECTS for base in BASES for cs in CVSETS}


def timing_rows(base, cs, reading, rho=None):
    rho = RHO if rho is None else rho
    subj_mode, art_mode, onset_mode = reading
    rows = []
    for s in B.SUBJECTS:
        pool = np.concatenate([rho[x, base, cs] for x in B.SUBJECTS]) if subj_mode == "pooled" else rho[s, base, cs]
        for a in range(6):
            vals = pool if art_mode == "all six" else pool[:, a]
            thr = vals.mean() + 2.5 * vals.std()
            for e in range(rho[s, base, cs].shape[0]):
                r = rho[s, base, cs][e, a]
                if r.max() > thr:
                    on, pk, off = B.timing(r, thr if onset_mode == "threshold" else r.max() / 2)
                    rows.append({"subject": s, "articulator": ART6[a], "electrode": e, "onset": on,
                                 "peak": pk, "offset": off, "threshold": thr})
    return pd.DataFrame(rows)


TIMING = {(base, cs, r): timing_rows(base, cs, r) for base in BASES for cs in CVSETS for r in TIMING_READINGS}


def articulator_windows(base, cs, reading):
    """T_A per subject: mean onset to mean offset of the subject's electrodes for A (None if none)."""
    t = TIMING[base, cs, reading]
    out = {}
    for s in B.SUBJECTS:
        for a in B.ARTICULATORS:
            g = t[(t.subject == s) & (t.articulator == a)]
            out[s, a] = (g.onset.mean(), g.offset.mean()) if len(g) else None
    return out


def weights(base, cs, reading, pmode):
    """Per subject: W (vSMC electrode, 4), NaN for an articulator without a window, and the
    electrodes kept by the GLM rule (mean p over T_A below 0.05 for any articulator)."""
    T = articulator_windows(base, cs, reading)
    out = {}
    for s in B.SUBJECTS:
        beta, pF, pt, r2 = GLM[s, base, cs]
        keep = np.zeros(beta.shape[0], bool)
        W = np.full((beta.shape[0], 4), np.nan)
        for a, name in enumerate(B.ARTICULATORS):
            if T[s, name] is None:
                continue
            idx = (B.EPOCH_MS >= T[s, name][0]) & (B.EPOCH_MS <= T[s, name][1])
            p = (pF[:, idx] if pmode == "F-test" else pt[:, a, idx]).mean(1)
            keep |= p < 0.05
            W[:, a] = beta[:, a, idx].mean(1)
        out[s] = {"W": W, "keep": keep, "windows": {a: T[s, a] for a in B.ARTICULATORS}}
    return out


W_READINGS = [(base, cs, r, p) for base in BASES for cs in CVSETS for r in TIMING_READINGS for p in ("F-test", "t-test")]
WEIGHTS = {k: weights(*k) for k in W_READINGS}
STATE = {(s, base, z, cs, w): B.state_space(HV[s, base, cs], z, w)
         for s in B.SUBJECTS for base in BASES for z in ZMODES for cs in CVSETS
         for w in [(-500, 750), (-375, 620)]}
EP = (-500, 750)
SS_READINGS = list(itertools.product(BASES, ZMODES, PROJ, CVSETS))
KS = {(s, base, z, pj, cs): STATE[s, base, z, cs, EP][2] if pj == "i" else B.project(STATE[s, base, z, cs, EP][0], HV[s, base, cs])
      for s in B.SUBJECTS for base, z, pj, cs in SS_READINGS}

# Variant (not a reading of the claims file): the trials whose epoch overlaps an interval the files
# mark as an ECoG artifact are left out of the CV means; the CVs and electrodes are the same.
S_CLEAN = {s: B.load_subject(blocks[s], exclude_invalid=True) for s in B.SUBJECTS}
assert all(S_CLEAN[s]["cvs"] == S[s]["cvs"] and S_CLEAN[s]["counts"].min() > 0 for s in B.SUBJECTS)
HV_CLEAN = {(s, base, cs): S_CLEAN[s]["H"][base][CVIDX[s, cs]][:, S[s]["vsmc"]]
            for s in B.SUBJECTS for base in B.BASELINES for cs in CVSETS}
print("Renditions left out by the artifact variant, per subject:", {s: int((S[s]["counts"] - S_CLEAN[s]["counts"]).sum()) for s in B.SUBJECTS},
      "| largest share of one CV's renditions:", {s: round(float(((S[s]["counts"] - S_CLEAN[s]["counts"]) / S[s]["counts"]).max()), 2) for s in B.SUBJECTS})
print(f"shared computations done at {time.time() - started:.0f} s")
Renditions left out by the artifact variant, per subject: {'EC2': 51, 'GP31': 75, 'GP33': 36} | largest share of one CV's renditions: {'EC2': 0.11, 'GP31': 0.06, 'GP33': 0.08}
shared computations done at 1030 s

data-composition¶

Three subjects with high-density ECoG (two left, one right hemisphere) read aloud CV syllables made of 18 or 19 consonants followed by /a/, /i/ or /u/, each CV produced 15 to 100 times, with the microphone recorded with the ECoG at 3052 Hz.

In [12]:
comp = []
for s in B.SUBJECTS:
    n = S[s]["counts"]
    comp.append({"subject": s, "CVs": len(S[s]["cvs"]), "consonants": len({c for c, v in S[s]["cvs"]}),
                 "vowels": len({v for c, v in S[s]["cvs"]}), "min_renditions": int(n.min()), "max_renditions": int(n.max()),
                 "CVs_below_15": int((n < 15).sum()), "CVs_above_100": int((n > 100).sum()),
                 "consonants_with_all_3_vowels_and_15+": len([c for c in B.CONSONANTS if all((c, v) in S[s]["cvs"] and n[S[s]["cvs"].index((c, v))] >= 15 for v in "aiu")]),
                 "hemisphere_from_x": ("left" if np.nanmean(S[s]["x"]) < 0 else "right") if np.isfinite(S[s]["x"]).any() else "unknown"})
comp = pd.DataFrame(comp)
print(comp.to_string(index=False))
print("Subjects in the dandiset:", sorted(files.subject.unique()), "| of the paper's (EC2, EC31, EC33), by assumed correspondence: 3")
print("Distinct CVs over the three subjects:", comp.CVs.sum(), "(paper 168); with CVs of fewer than 15 renditions left out:",
      int((comp.CVs - comp.CVs_below_15).sum()))
print("ECoG sampling rate:", sorted(files.rate_hz.unique()), "Hz (3052 +- 1)")
print("Audio in the files: none (removed for HIPAA, dandiset description)")
subject  CVs  consonants  vowels  min_renditions  max_renditions  CVs_below_15  CVs_above_100  consonants_with_all_3_vowels_and_15+ hemisphere_from_x
    EC2   57          19       3              10              58             1              0                                    18              left
   GP31   55          19       3               2             107             1             33                                    18              left
   GP33   57          19       3              22              28             0              0                                    19           unknown
Subjects in the dandiset: ['EC2', 'EC9', 'GP31', 'GP33'] | of the paper's (EC2, EC31, EC33), by assumed correspondence: 3
Distinct CVs over the three subjects: 169 (paper 168); with CVs of fewer than 15 renditions left out: 167
ECoG sampling rate: [np.float64(3051.7578), np.float64(3051.7578125)] Hz (3052 +- 1)
Audio in the files: none (removed for HIPAA, dandiset description)

Result: partially reproduced. The dandiset holds the three subjects (taking GP31 and GP33 to be EC31 and EC33) and a fourth one, EC9, that is not in the paper. The ECoG rate is 3051.76 Hz. The counts differ from the paper's: 57, 55 and 57 CVs (169 in all, against 168), each subject with 19 consonants, and renditions of 2 to 107 per CV (EC2's /thi/ 10, GP31's /thi/ 2, GP31 up to 107). Leaving out CVs with fewer than 15 renditions gives 56 + 54 + 57 = 167, still not the paper's split. The audio is not in the dandiset, and GP33's hemisphere cannot be checked. In EC2 and GP31, 18 consonants have all three vowels with 15 or more renditions each, and in GP33 19; the paper's split is 19, 19 and 18 consonants.

active-electrodes¶

About 30 active vSMC electrodes were found per subject during syllable articulation, an electrode being active when its high-gamma z-score changed by more than 2 for any syllable.

In [13]:
def overall(outcomes):
    """The outcome all method readings give, or methods_underspecified when they differ."""
    u = sorted(set(outcomes))
    return u[0] if len(u) == 1 else "differ by reading: " + ", ".join(f"{o} {list(outcomes).count(o)}" for o in u)


def by_factor(df, factors, col="outcome"):
    """Outcome counts for each level of each reading factor, the other factors pooled."""
    print(f"Outcome counts by reading factor ({len(df)} readings):")
    for f in factors:
        print(f"  {f}:", {lvl: g[col].value_counts().to_dict() for lvl, g in df.groupby(f, sort=False)})


act = []
for base in B.BASELINES:
    for cs in CVSETS:
        for s in B.SUBJECTS:
            H = HV[s, base, cs]
            act.append({"baseline": base, "CVs": cs, "subject": s, "vSMC": H.shape[1],
                        "(a) z > 2": int((np.nanmax(H, axis=(0, 2)) > 2).sum()),
                        "(b) |z| > 2": int((np.nanmax(np.abs(H), axis=(0, 2)) > 2).sum())})
act = pd.DataFrame(act)
print(act.to_string(index=False))
am = act.groupby(["baseline", "CVs"])[["(a) z > 2", "(b) |z| > 2"]].mean().round(2)
am["within 27-33 (a or b)"] = am.apply(lambda r: 27 <= r["(a) z > 2"] <= 33 or 27 <= r["(b) |z| > 2"] <= 33, axis=1)
print("\nMean over subjects (criterion 27 to 33):")
print(am.to_string())
for thr in (1.5, 2, 2.5, 3):
    print(f"threshold {thr} (all CVs): mean active per subject, pre {np.mean([(np.nanmax(HV[s, 'pre', 'all'], axis=(0, 2)) > thr).sum() for s in B.SUBJECTS]):.1f}, "
          f"whole {np.mean([(np.nanmax(HV[s, 'whole', 'all'], axis=(0, 2)) > thr).sum() for s in B.SUBJECTS]):.1f}, "
          f"rest {np.mean([(np.nanmax(HV[s, 'rest', 'all'], axis=(0, 2)) > thr).sum() for s in B.SUBJECTS]):.1f}")
res = am.loc[list(BASES)]
per_cs = {cs: "reproduced" if all(res.xs(cs, level=1)["within 27-33 (a or b)"]) else
          ("partially" if any(res.xs(cs, level=1)["within 27-33 (a or b)"]) else "not reproduced")
          for cs in CVSETS}
print("Outcome per CV set:", per_cs)
print("Outcome over readings:", overall(list(per_cs.values())))
print("\nElectrodes active (z > 2) with every CV but not with only the CVs of 15+ renditions, and the CVs above 2 at them:")
for base in BASES:
    for s in B.SUBJECTS:
        Ha, H15 = HV[s, base, "all"], HV[s, base, "15+"]
        only = (np.nanmax(Ha, axis=(0, 2)) > 2) & ~(np.nanmax(H15, axis=(0, 2)) > 2)
        drivers = pd.Series([c + v for e in np.where(only)[0] for (c, v), x in zip(CVS[s, "all"], np.nanmax(Ha[:, e], axis=1)) if x > 2])
        print(f"  {base:5s} {s}: {int(only.sum())} electrodes; CVs above 2 there (electrodes): {drivers.value_counts().to_dict()}",
              f"| renditions of those CVs: { {k: int(S[s]['counts'][S[s]['cvs'].index(next(p for p in S[s]['cvs'] if p[0] + p[1] == k))]) for k in drivers.unique()} }")
act_c = pd.DataFrame([{"baseline": base, "CVs": cs, "subject": s,
                       "(a) z > 2": int((np.nanmax(HV_CLEAN[s, base, cs], axis=(0, 2)) > 2).sum())}
                      for base in BASES for cs in CVSETS for s in B.SUBJECTS])
print("\nVariant, artifact trials left out (z > 2), active electrodes per subject and mean:")
print(act_c.pivot_table(index=["baseline", "CVs"], columns="subject", values="(a) z > 2").assign(
    mean=lambda d: d.mean(axis=1).round(2)).to_string())
baseline CVs subject  vSMC  (a) z > 2  (b) |z| > 2
     pre all     EC2    86         15           15
     pre all    GP31    83         49           49
     pre all    GP33    99          9            9
     pre 15+     EC2    86         14           14
     pre 15+    GP31    83          9            9
     pre 15+    GP33    99          9            9
   whole all     EC2    86         15           15
   whole all    GP31    83         43           43
   whole all    GP33    99          6            6
   whole 15+     EC2    86         15           15
   whole 15+    GP31    83          0            0
   whole 15+    GP33    99          6            6
    rest all     EC2    86         30           30
    rest all    GP31    83         51           51
    rest all    GP33    99         21           21
    rest 15+     EC2    86         29           29
    rest 15+    GP31    83         31           31
    rest 15+    GP33    99         21           21

Mean over subjects (criterion 27 to 33):
              (a) z > 2  (b) |z| > 2  within 27-33 (a or b)
baseline CVs                                               
pre      15+      10.67        10.67                  False
         all      24.33        24.33                  False
rest     15+      27.00        27.00                   True
         all      34.00        34.00                  False
whole    15+       7.00         7.00                  False
         all      21.33        21.33                  False
threshold 1.5 (all CVs): mean active per subject, pre 41.7, whole 38.3, rest 52.0
threshold 2 (all CVs): mean active per subject, pre 24.3, whole 21.3, rest 34.0
threshold 2.5 (all CVs): mean active per subject, pre 11.7, whole 10.0, rest 20.3
threshold 3 (all CVs): mean active per subject, pre 5.3, whole 2.7, rest 14.0
Outcome per CV set: {'all': 'not reproduced', '15+': 'partially'}
Outcome over readings: differ by reading: not reproduced 1, partially 1

Electrodes active (z > 2) with every CV but not with only the CVs of 15+ renditions, and the CVs above 2 at them:
  pre   EC2: 1 electrodes; CVs above 2 there (electrodes): {'thi': 1} | renditions of those CVs: {'thi': 10}
  pre   GP31: 40 electrodes; CVs above 2 there (electrodes): {'thi': 40} | renditions of those CVs: {'thi': 2}
  pre   GP33: 0 electrodes; CVs above 2 there (electrodes): {} | renditions of those CVs: {}
  whole EC2: 0 electrodes; CVs above 2 there (electrodes): {} | renditions of those CVs: {}
  whole GP31: 43 electrodes; CVs above 2 there (electrodes): {'thi': 43} | renditions of those CVs: {'thi': 2}
  whole GP33: 0 electrodes; CVs above 2 there (electrodes): {} | renditions of those CVs: {}
  rest  EC2: 1 electrodes; CVs above 2 there (electrodes): {'thi': 1} | renditions of those CVs: {'thi': 10}
  rest  GP31: 20 electrodes; CVs above 2 there (electrodes): {'thi': 20} | renditions of those CVs: {'thi': 2}
  rest  GP33: 0 electrodes; CVs above 2 there (electrodes): {} | renditions of those CVs: {}

Variant, artifact trials left out (z > 2), active electrodes per subject and mean:
subject        EC2  GP31  GP33   mean
baseline CVs                         
pre      15+  14.0   3.0   7.0   8.00
         all  15.0  46.0   7.0  22.67
rest     15+  29.0   2.0  14.0  15.00
         all  30.0  34.0  14.0  26.00
whole    15+  15.0   0.0   5.0   6.67
         all  15.0  43.0   5.0  21.00

Result: blocked (methods_underspecified). The two readings of the CV set give different outcomes. With every CV, no baseline gives a mean within 27 to 33: 24.3 per subject with pre (EC2 15, GP31 49, GP33 9), 21.3 with whole and 34.0 with rest (not reproduced). With only the CVs of 15 or more renditions, rest gives 27.0 (EC2 29, GP31 31, GP33 21), at the lower edge of the tolerance, while pre gives 10.7 and whole 7.0 (partially reproduced). Both readings of the change give the same counts, as no electrode passes on a decrease alone. The count moves strongly with the threshold (with every CV, 41.7 to 5.3 per subject over thresholds 1.5 to 3 with pre).

The split between the CV readings comes from one syllable. Every GP31 electrode that is active with every CV but not with the 15+ CVs is above 2 for /thi/, which GP31 has 2 renditions of (40 electrodes under pre, 43 under whole, 20 under rest); in EC2 one electrode is active through /thi/ (10 renditions) under pre and rest, and in GP33 none. Leaving out the trials that overlap intervals marked as ECoG artifacts (a variant, not a reading of the claims file) gives means of 22.7, 21.0 and 26.0 with every CV and 8.0, 6.7 and 15.0 with the 15+ CVs, none within 27 to 33. GP31's count under rest with the 15+ CVs falls from 31 to 2 in this variant, so the one reading within tolerance rests on trials the files mark as artifacts.

fig1c-e-articulator-electrodes¶

In one subject, dorsal electrodes (e124, e108) were active for /b/ (lips), mid vSMC electrodes (e129, e133, e105) for /d/ (front tongue), and a more ventral electrode (e104) was most active for /g/ (back tongue).

In [14]:
NAMED = {"b": [124, 108], "d": [129, 133, 105], "g": [104]}
f1 = []
for s in B.SUBJECTS:
    for numbering, offset in (("(a) from 1", 1), ("(b) from 0", 0)):
        idx = {k: [n - offset for n in v] for k, v in NAMED.items()}
        all_idx = sum(idx.values(), [])
        on_vsmc = [i in S[s]["vsmc"] for i in all_idx]
        for base in BASES:
            for measure in ("(i) at -25 ms", "(ii) peak"):
                H = S[s]["H"][base]
                resp = {}
                for c in "bdg":
                    k = S[s]["cvs"].index((c, "a"))
                    resp[c] = H[k, :, B.ms_index(-25)] if measure.startswith("(i)") else np.nanmax(H[k], axis=1)
                prefers = {i: max("bdg", key=lambda c: resp[c][i]) for i in all_idx}
                ok = [prefers[i] == c for c, ii in idx.items() for i in ii]
                f1.append({"subject": s, "numbering": numbering, "baseline": base, "measure": measure,
                           "named on vSMC": f"{sum(on_vsmc)} of 6",
                           "labels": ",".join(S[s]["location"][i][:4] + ("" if S[s]["good"][i] else "(bad)") for i in all_idx),
                           "preferences (b b d d d g)": " ".join(prefers[i] for i in all_idx),
                           "prefer their syllable": f"{sum(ok)} of 6"})
f1 = pd.DataFrame(f1)
print(f1.to_string(index=False))
print("\nSubject and numbering pairs that put all six named electrodes on vSMC:",
      f1[f1["named on vSMC"] == "6 of 6"][["subject", "numbering"]].drop_duplicates().values.tolist())
subject  numbering baseline       measure named on vSMC                             labels preferences (b b d d d g) prefer their syllable
    EC2 (a) from 1      pre (i) at -25 ms        3 of 6 post(bad),post,midd,supe,post,post               b b d g d g                5 of 6
    EC2 (a) from 1      pre     (ii) peak        3 of 6 post(bad),post,midd,supe,post,post               b b d g d g                5 of 6
    EC2 (a) from 1    whole (i) at -25 ms        3 of 6 post(bad),post,midd,supe,post,post               b b d g d g                5 of 6
    EC2 (a) from 1    whole     (ii) peak        3 of 6 post(bad),post,midd,supe,post,post               b b d g d g                5 of 6
    EC2 (a) from 1     rest (i) at -25 ms        3 of 6 post(bad),post,midd,supe,post,post               b b d g d g                5 of 6
    EC2 (a) from 1     rest     (ii) peak        3 of 6 post(bad),post,midd,supe,post,post               b b d g d g                5 of 6
    EC2 (b) from 0      pre (i) at -25 ms        5 of 6      post,post,midd,prec,post,post               b b g b b d                2 of 6
    EC2 (b) from 0      pre     (ii) peak        5 of 6      post,post,midd,prec,post,post               b b d b b d                3 of 6
    EC2 (b) from 0    whole (i) at -25 ms        5 of 6      post,post,midd,prec,post,post               b b g b b d                2 of 6
    EC2 (b) from 0    whole     (ii) peak        5 of 6      post,post,midd,prec,post,post               b b d b b d                3 of 6
    EC2 (b) from 0     rest (i) at -25 ms        5 of 6      post,post,midd,prec,post,post               b b g b b d                2 of 6
    EC2 (b) from 0     rest     (ii) peak        5 of 6      post,post,midd,prec,post,post               b b d b b d                3 of 6
   GP31 (a) from 1      pre (i) at -25 ms        3 of 6 post(bad),post,midd,supe,post,post               b b d g g g                4 of 6
   GP31 (a) from 1      pre     (ii) peak        3 of 6 post(bad),post,midd,supe,post,post               b b b g g g                3 of 6
   GP31 (a) from 1    whole (i) at -25 ms        3 of 6 post(bad),post,midd,supe,post,post               b b d g d g                5 of 6
   GP31 (a) from 1    whole     (ii) peak        3 of 6 post(bad),post,midd,supe,post,post               b b b g g g                3 of 6
   GP31 (a) from 1     rest (i) at -25 ms        3 of 6 post(bad),post,midd,supe,post,post               b b d g d g                5 of 6
   GP31 (a) from 1     rest     (ii) peak        3 of 6 post(bad),post,midd,supe,post,post               b b g g g g                3 of 6
   GP31 (b) from 0      pre (i) at -25 ms        4 of 6      prec,post,midd,supe,post,post               b b g b d g                4 of 6
   GP31 (b) from 0      pre     (ii) peak        4 of 6      prec,post,midd,supe,post,post               b b b b g g                3 of 6
   GP31 (b) from 0    whole (i) at -25 ms        4 of 6      prec,post,midd,supe,post,post               b b g b d d                3 of 6
   GP31 (b) from 0    whole     (ii) peak        4 of 6      prec,post,midd,supe,post,post               b b b b d g                4 of 6
   GP31 (b) from 0     rest (i) at -25 ms        4 of 6      prec,post,midd,supe,post,post               b b d b d d                4 of 6
   GP31 (b) from 0     rest     (ii) peak        4 of 6      prec,post,midd,supe,post,post               b b g b g g                3 of 6
   GP33 (a) from 1      pre (i) at -25 ms        1 of 6 prec(bad),prec,pars,pars,pars,pars               b b d d d d                5 of 6
   GP33 (a) from 1      pre     (ii) peak        1 of 6 prec(bad),prec,pars,pars,pars,pars               b b b b d d                3 of 6
   GP33 (a) from 1    whole (i) at -25 ms        1 of 6 prec(bad),prec,pars,pars,pars,pars               b b d d d d                5 of 6
   GP33 (a) from 1    whole     (ii) peak        1 of 6 prec(bad),prec,pars,pars,pars,pars               b b b b d d                3 of 6
   GP33 (a) from 1     rest (i) at -25 ms        1 of 6 prec(bad),prec,pars,pars,pars,pars               b b b d d d                4 of 6
   GP33 (a) from 1     rest     (ii) peak        1 of 6 prec(bad),prec,pars,pars,pars,pars               b b b b d d                3 of 6
   GP33 (b) from 0      pre (i) at -25 ms        3 of 6      post,prec,pars,pars,prec,pars               d d g g d d                1 of 6
   GP33 (b) from 0      pre     (ii) peak        3 of 6      post,prec,pars,pars,prec,pars               d b b b g d                1 of 6
   GP33 (b) from 0    whole (i) at -25 ms        3 of 6      post,prec,pars,pars,prec,pars               d d g g d d                1 of 6
   GP33 (b) from 0    whole     (ii) peak        3 of 6      post,prec,pars,pars,prec,pars               d b b b g d                1 of 6
   GP33 (b) from 0     rest (i) at -25 ms        3 of 6      post,prec,pars,pars,prec,pars               d d g g d d                1 of 6
   GP33 (b) from 0     rest     (ii) peak        3 of 6      post,prec,pars,pars,prec,pars               d b b b g d                1 of 6

Subject and numbering pairs that put all six named electrodes on vSMC: []

Result: blocked (metadata_insufficient). No subject, counted from 1 or from 0, has all six named electrodes on vSMC. The most is 5 of 6, in EC2 counted from 0, where e129 is labelled middle temporal; GP31 has at most 4 and GP33 at most 3. The criterion blocks the claim in that case: the dataset does not say which subject Fig. 1 shows or how the paper numbered electrodes. For information, in EC2 counted from 1 (3 of 6 on vSMC, e124 flagged bad in some block), five of the six named electrodes prefer their syllable under both measures and all three baselines; counted from 0, two or three of six do.

fig1f-h-phonetic-contrasts¶

Fricatives with different tongue-tip constriction locations engaged different electrodes; front-tongue consonants of different manner engaged overlapping electrodes with different magnitudes; for /ja/, /ji/, /ju/ the activity was similar before the C-V transition, while a dorsal electrode was active during /u/ only.

The judged part: in at least one subject, a vSMC electrode with a positive lips weight (from the GLM electrodes of claim fig2a-lips-dorsal) has mean high gamma above 2 at +250 ms for /ju/ and below 2 for /ja/ and /ji/. The lips weights and the GLM electrodes are computed without electrode positions, which are only needed for fig2a's spatial judgement (see the summary).

In [15]:
t250 = B.ms_index(250)
fh = []
for key in W_READINGS:
    base, cs = key[0], key[1]
    hits = {}
    for s in B.SUBJECTS:
        cvs = CVS[s, cs]
        Hj = {v: HV[s, base, cs][cvs.index(("y", v)), :, t250] for v in "aiu"}
        w = WEIGHTS[key][s]
        cand = w["keep"] & (w["W"][:, 0] > 0)
        hit = cand & (Hj["u"] > 2) & (Hj["a"] < 2) & (Hj["i"] < 2)
        hits[s] = (int(cand.sum()), int((cand & (Hj["u"] > 2)).sum()), int(hit.sum()),
                   float(Hj["u"][cand].max()) if cand.any() else np.nan)
    fh.append({"baseline": base, "CVs": cs, "timing reading": " / ".join(key[2]), "p-value": key[3],
               **{f"{s} lips+ / ju>2 / hits / max /ju/": f"{hits[s][0]} / {hits[s][1]} / {hits[s][2]} / {hits[s][3]:.2f}" for s in B.SUBJECTS},
               "ju>2": sum(h[1] for h in hits.values()), "holds": any(h[2] > 0 for h in hits.values())})
fh = pd.DataFrame(fh)
print(fh.to_string(index=False))
print("\nReadings where it holds:", int(fh.holds.sum()), "of", len(fh))
print("Largest /ju/ z at +250 ms among lips-positive GLM electrodes, over all readings and subjects:",
      max(float(v.split(" / ")[3]) for c in fh.columns if "max /ju/" in c for v in fh[c]))
print("Readings with a lips-positive GLM electrode above 2 for /ju/:", int((fh["ju>2"] > 0).sum()), "of", len(fh),
      "(baselines:", fh[fh["ju>2"] > 0].baseline.value_counts().to_dict(), "); in all of them /ja/ or /ji/ is also above 2 there" if not fh.holds.any() else "")
print("Outcome over readings:", overall(["reproduced" if h else "not reproduced" for h in fh.holds]))
allv = []
for base in BASES:
    for cs in CVSETS:
        for s in B.SUBJECTS:
            cvs = CVS[s, cs]
            Hj = {v: HV[s, base, cs][cvs.index(("y", v)), :, t250] for v in "aiu"}
            allv.append({"baseline": base, "CVs": cs, "subject": s, "vSMC": len(Hj["u"]), "/ju/ > 2": int((Hj["u"] > 2).sum()),
                         "/ju/ > 2, /ja/ and /ji/ < 2": int(((Hj["u"] > 2) & (Hj["a"] < 2) & (Hj["i"] < 2)).sum()),
                         "largest /ju/": round(float(np.nanmax(Hj["u"])), 2)})
print("\nAll vSMC electrodes, without the GLM selection (not the criterion; it separates the selection from the effect):")
print(pd.DataFrame(allv).to_string(index=False))
fig, axes = plt.subplots(1, 3, figsize=(12, 3), sharey=True)
key0 = W_READINGS[0]
for ax, s in zip(axes, B.SUBJECTS):
    cvs = CVS[s, "all"]
    H = HV[s, "pre", "all"]
    w = WEIGHTS[key0][s]
    cand = np.where(w["keep"] & (w["W"][:, 0] > 0))[0]
    d = H[cvs.index(("y", "u")), cand, t250] - np.maximum(H[cvs.index(("y", "a")), cand, t250], H[cvs.index(("y", "i")), cand, t250])
    e = cand[np.argmax(d)]
    tr = H[[cvs.index(("y", v)) for v in "aiu"], e]
    for v, row in zip("aiu", tr):
        ax.plot(B.EPOCH_MS, row, label=f"/j{v}/")
    ax.set_title(f"{s} electrode {S[s]['vsmc'][e]}")
    print(f"{s}: plotted electrode {S[s]['vsmc'][e]} (largest /ju/ minus /ja/,/ji/ at +250 ms among lips+ GLM electrodes), z at +250 ms: "
          + ", ".join(f"/j{v}/ {row[t250]:.2f}" for v, row in zip("aiu", tr)) + f"; plotted range {tr.min():.2f} to {tr.max():.2f}; "
          f"mean |difference| between the three before 0 ms {np.abs(tr[:, B.EPOCH_MS < 0] - tr[:, B.EPOCH_MS < 0].mean(0)).mean():.2f}")
    ax.axvline(0, color="k", lw=0.5); ax.axhline(2, color="grey", lw=0.5, ls="--")
axes[0].legend(); axes[0].set_ylabel("z (pre baseline)")
plt.show()
baseline CVs                            timing reading p-value EC2 lips+ / ju>2 / hits / max /ju/ GP31 lips+ / ju>2 / hits / max /ju/ GP33 lips+ / ju>2 / hits / max /ju/  ju>2  holds
     pre all         per subject / all six / threshold  F-test                  11 / 0 / 0 / 0.96                   29 / 0 / 0 / 0.40                   14 / 0 / 0 / 0.78     0  False
     pre all         per subject / all six / threshold  t-test                   8 / 0 / 0 / 0.96                   30 / 0 / 0 / 0.40                   13 / 0 / 0 / 0.78     0  False
     pre all         per subject / all six / half peak  F-test                   8 / 0 / 0 / 0.96                   25 / 0 / 0 / 0.40                   15 / 0 / 0 / 0.78     0  False
     pre all         per subject / all six / half peak  t-test                   6 / 0 / 0 / 0.96                   24 / 0 / 0 / 0.40                    8 / 0 / 0 / 0.78     0  False
     pre all per subject / per articulator / threshold  F-test                  12 / 0 / 0 / 0.96                   30 / 0 / 0 / 0.40                   22 / 0 / 0 / 0.70     0  False
     pre all per subject / per articulator / threshold  t-test                  10 / 0 / 0 / 0.99                   28 / 0 / 0 / 0.40                   13 / 0 / 0 / 0.33     0  False
     pre all per subject / per articulator / half peak  F-test                  11 / 0 / 0 / 1.13                   25 / 0 / 0 / 0.40                   11 / 0 / 0 / 0.61     0  False
     pre all per subject / per articulator / half peak  t-test                   4 / 0 / 0 / 1.13                   23 / 0 / 0 / 0.40                   11 / 0 / 0 / 0.27     0  False
     pre all              pooled / all six / threshold  F-test                  10 / 0 / 0 / 0.96                   29 / 0 / 0 / 0.40                   13 / 0 / 0 / 0.61     0  False
     pre all              pooled / all six / threshold  t-test                  10 / 0 / 0 / 0.99                   33 / 0 / 0 / 0.40                    9 / 0 / 0 / 0.37     0  False
     pre all              pooled / all six / half peak  F-test                   7 / 0 / 0 / 0.96                   24 / 0 / 0 / 0.40                   10 / 0 / 0 / 0.61     0  False
     pre all              pooled / all six / half peak  t-test                   5 / 0 / 0 / 0.96                   24 / 0 / 0 / 0.40                    7 / 0 / 0 / 0.25     0  False
     pre all      pooled / per articulator / threshold  F-test                  11 / 0 / 0 / 0.96                   32 / 0 / 0 / 0.40                   22 / 0 / 0 / 0.78     0  False
     pre all      pooled / per articulator / threshold  t-test                  10 / 0 / 0 / 1.03                   34 / 0 / 0 / 0.40                   15 / 0 / 0 / 0.78     0  False
     pre all      pooled / per articulator / half peak  F-test                   8 / 0 / 0 / 0.96                   25 / 0 / 0 / 0.40                   12 / 0 / 0 / 0.61     0  False
     pre all      pooled / per articulator / half peak  t-test                   4 / 0 / 0 / 0.96                   22 / 0 / 0 / 0.40                    9 / 0 / 0 / 0.37     0  False
     pre 15+         per subject / all six / threshold  F-test                  12 / 0 / 0 / 1.03                   40 / 0 / 0 / 0.40                   14 / 0 / 0 / 0.78     0  False
     pre 15+         per subject / all six / threshold  t-test                   9 / 0 / 0 / 0.99                   28 / 0 / 0 / 0.40                   13 / 0 / 0 / 0.78     0  False
     pre 15+         per subject / all six / half peak  F-test                   8 / 0 / 0 / 0.96                   32 / 0 / 0 / 0.40                   15 / 0 / 0 / 0.78     0  False
     pre 15+         per subject / all six / half peak  t-test                   6 / 0 / 0 / 0.96                   19 / 0 / 0 / 0.28                    8 / 0 / 0 / 0.78     0  False
     pre 15+ per subject / per articulator / threshold  F-test                  13 / 0 / 0 / 0.96                   32 / 0 / 0 / 0.40                   22 / 0 / 0 / 0.70     0  False
     pre 15+ per subject / per articulator / threshold  t-test                  11 / 0 / 0 / 1.03                   30 / 0 / 0 / 0.40                   13 / 0 / 0 / 0.33     0  False
     pre 15+ per subject / per articulator / half peak  F-test                  10 / 0 / 0 / 1.13                   31 / 0 / 0 / 0.40                   11 / 0 / 0 / 0.61     0  False
     pre 15+ per subject / per articulator / half peak  t-test                   4 / 0 / 0 / 1.13                   24 / 0 / 0 / 0.40                   11 / 0 / 0 / 0.27     0  False
     pre 15+              pooled / all six / threshold  F-test                  11 / 0 / 0 / 1.03                   37 / 0 / 0 / 0.40                   15 / 0 / 0 / 0.61     0  False
     pre 15+              pooled / all six / threshold  t-test                   9 / 0 / 0 / 0.99                   30 / 0 / 0 / 0.40                   14 / 0 / 0 / 0.48     0  False
     pre 15+              pooled / all six / half peak  F-test                   8 / 0 / 0 / 0.96                   30 / 0 / 0 / 0.40                   13 / 0 / 0 / 0.61     0  False
     pre 15+              pooled / all six / half peak  t-test                   6 / 0 / 0 / 0.96                   23 / 0 / 0 / 0.40                    7 / 0 / 0 / 0.33     0  False
     pre 15+      pooled / per articulator / threshold  F-test                  14 / 0 / 0 / 1.03                   39 / 0 / 0 / 0.40                   14 / 0 / 0 / 0.61     0  False
     pre 15+      pooled / per articulator / threshold  t-test                  10 / 0 / 0 / 1.03                   31 / 0 / 0 / 0.40                   12 / 0 / 0 / 0.48     0  False
     pre 15+      pooled / per articulator / half peak  F-test                  10 / 0 / 0 / 1.13                   31 / 0 / 0 / 0.40                   11 / 0 / 0 / 0.61     0  False
     pre 15+      pooled / per articulator / half peak  t-test                   5 / 0 / 0 / 1.13                   23 / 0 / 0 / 0.40                    8 / 0 / 0 / 0.27     0  False
   whole all         per subject / all six / threshold  F-test                  11 / 0 / 0 / 0.85                   30 / 0 / 0 / 0.23                   17 / 0 / 0 / 0.67     0  False
   whole all         per subject / all six / threshold  t-test                   8 / 0 / 0 / 0.85                   23 / 0 / 0 / 0.19                   13 / 0 / 0 / 0.67     0  False
   whole all         per subject / all six / half peak  F-test                   8 / 0 / 0 / 0.85                   28 / 0 / 0 / 0.23                   11 / 0 / 0 / 0.47     0  False
   whole all         per subject / all six / half peak  t-test                   6 / 0 / 0 / 0.85                   25 / 0 / 0 / 0.19                    6 / 0 / 0 / 0.18     0  False
   whole all per subject / per articulator / threshold  F-test                  10 / 0 / 0 / 0.85                   29 / 0 / 0 / 0.23                   23 / 0 / 0 / 0.67     0  False
   whole all per subject / per articulator / threshold  t-test                  13 / 0 / 0 / 1.14                   28 / 0 / 0 / 0.19                   14 / 0 / 0 / 0.67     0  False
   whole all per subject / per articulator / half peak  F-test                  10 / 0 / 0 / 1.19                   25 / 0 / 0 / 0.23                   12 / 0 / 0 / 0.47     0  False
   whole all per subject / per articulator / half peak  t-test                   4 / 0 / 0 / 1.19                   20 / 0 / 0 / 0.19                    9 / 0 / 0 / 0.33     0  False
   whole all              pooled / all six / threshold  F-test                  12 / 0 / 0 / 0.85                   30 / 0 / 0 / 0.23                   13 / 0 / 0 / 0.47     0  False
   whole all              pooled / all six / threshold  t-test                  10 / 0 / 0 / 0.92                   27 / 0 / 0 / 0.19                   10 / 0 / 0 / 0.47     0  False
   whole all              pooled / all six / half peak  F-test                  11 / 0 / 0 / 1.19                   26 / 0 / 0 / 0.23                   12 / 0 / 0 / 0.47     0  False
   whole all              pooled / all six / half peak  t-test                   7 / 0 / 0 / 1.19                   22 / 0 / 0 / 0.19                    6 / 0 / 0 / 0.17     0  False
   whole all      pooled / per articulator / threshold  F-test                  11 / 0 / 0 / 0.85                   32 / 0 / 0 / 0.23                   16 / 0 / 0 / 0.67     0  False
   whole all      pooled / per articulator / threshold  t-test                  10 / 0 / 0 / 1.14                   31 / 0 / 0 / 0.19                   13 / 0 / 0 / 0.33     0  False
   whole all      pooled / per articulator / half peak  F-test                  10 / 0 / 0 / 1.19                   27 / 0 / 0 / 0.23                   11 / 0 / 0 / 0.67     0  False
   whole all      pooled / per articulator / half peak  t-test                   7 / 0 / 0 / 1.19                   24 / 0 / 0 / 0.19                    8 / 0 / 0 / 0.24     0  False
   whole 15+         per subject / all six / threshold  F-test                  11 / 0 / 0 / 1.14                   36 / 0 / 0 / 0.23                   17 / 0 / 0 / 0.67     0  False
   whole 15+         per subject / all six / threshold  t-test                   9 / 0 / 0 / 0.92                   23 / 0 / 0 / 0.19                   13 / 0 / 0 / 0.67     0  False
   whole 15+         per subject / all six / half peak  F-test                   8 / 0 / 0 / 0.85                   28 / 0 / 0 / 0.34                   11 / 0 / 0 / 0.47     0  False
   whole 15+         per subject / all six / half peak  t-test                   6 / 0 / 0 / 0.85                   20 / 0 / 0 / 0.19                    6 / 0 / 0 / 0.18     0  False
   whole 15+ per subject / per articulator / threshold  F-test                  13 / 0 / 0 / 0.85                   32 / 0 / 0 / 0.23                   23 / 0 / 0 / 0.67     0  False
   whole 15+ per subject / per articulator / threshold  t-test                  12 / 0 / 0 / 1.14                   30 / 0 / 0 / 0.19                   14 / 0 / 0 / 0.67     0  False
   whole 15+ per subject / per articulator / half peak  F-test                  10 / 0 / 0 / 1.19                   31 / 0 / 0 / 0.34                   12 / 0 / 0 / 0.47     0  False
   whole 15+ per subject / per articulator / half peak  t-test                   4 / 0 / 0 / 1.19                   22 / 0 / 0 / 0.19                    9 / 0 / 0 / 0.33     0  False
   whole 15+              pooled / all six / threshold  F-test                  11 / 0 / 0 / 1.14                   41 / 0 / 0 / 0.34                   15 / 0 / 0 / 0.47     0  False
   whole 15+              pooled / all six / threshold  t-test                  10 / 0 / 0 / 1.14                   34 / 0 / 0 / 0.34                   14 / 0 / 0 / 0.37     0  False
   whole 15+              pooled / all six / half peak  F-test                   8 / 0 / 0 / 0.85                   29 / 0 / 0 / 0.34                   13 / 0 / 0 / 0.47     0  False
   whole 15+              pooled / all six / half peak  t-test                   6 / 0 / 0 / 0.85                   21 / 0 / 0 / 0.34                    7 / 0 / 0 / 0.20     0  False
   whole 15+      pooled / per articulator / threshold  F-test                  15 / 0 / 0 / 1.14                   40 / 0 / 0 / 0.34                   14 / 0 / 0 / 0.47     0  False
   whole 15+      pooled / per articulator / threshold  t-test                  11 / 0 / 0 / 1.14                   32 / 0 / 0 / 0.34                   11 / 0 / 0 / 0.37     0  False
   whole 15+      pooled / per articulator / half peak  F-test                  10 / 0 / 0 / 1.19                   32 / 0 / 0 / 0.34                   12 / 0 / 0 / 0.47     0  False
   whole 15+      pooled / per articulator / half peak  t-test                   5 / 0 / 0 / 1.19                   21 / 0 / 0 / 0.19                    7 / 0 / 0 / 0.24     0  False
    rest all         per subject / all six / threshold  F-test                  10 / 1 / 0 / 2.41                   27 / 0 / 0 / 0.94                   17 / 0 / 0 / 1.56     1  False
    rest all         per subject / all six / threshold  t-test                   9 / 0 / 0 / 1.25                   25 / 0 / 0 / 0.83                   18 / 0 / 0 / 1.56     0  False
    rest all         per subject / all six / half peak  F-test                   8 / 0 / 0 / 1.18                   24 / 0 / 0 / 0.94                   12 / 0 / 0 / 1.56     0  False
    rest all         per subject / all six / half peak  t-test                   6 / 0 / 0 / 1.18                   19 / 0 / 0 / 0.83                    7 / 0 / 0 / 0.52     0  False
    rest all per subject / per articulator / threshold  F-test                  11 / 0 / 0 / 1.18                   24 / 0 / 0 / 0.83                   17 / 0 / 0 / 1.00     0  False
    rest all per subject / per articulator / threshold  t-test                  10 / 1 / 0 / 3.54                   26 / 0 / 0 / 0.83                   14 / 0 / 0 / 0.48     1  False
    rest all per subject / per articulator / half peak  F-test                   9 / 0 / 0 / 1.18                   24 / 0 / 0 / 0.94                   10 / 0 / 0 / 1.56     0  False
    rest all per subject / per articulator / half peak  t-test                   6 / 1 / 0 / 3.54                   25 / 0 / 0 / 0.83                    6 / 0 / 0 / 0.48     1  False
    rest all              pooled / all six / threshold  F-test                  11 / 0 / 0 / 1.18                   22 / 0 / 0 / 0.94                   12 / 0 / 0 / 1.00     0  False
    rest all              pooled / all six / threshold  t-test                  12 / 0 / 0 / 1.71                   25 / 0 / 0 / 0.83                   10 / 0 / 0 / 1.00     0  False
    rest all              pooled / all six / half peak  F-test                  11 / 1 / 0 / 2.30                   20 / 0 / 0 / 0.94                   11 / 0 / 0 / 1.00     1  False
    rest all              pooled / all six / half peak  t-test                   5 / 1 / 0 / 2.30                   19 / 0 / 0 / 0.83                    8 / 0 / 0 / 1.00     1  False
    rest all      pooled / per articulator / threshold  F-test                  12 / 0 / 0 / 1.18                   28 / 0 / 0 / 0.94                   18 / 0 / 0 / 1.00     0  False
    rest all      pooled / per articulator / threshold  t-test                  13 / 1 / 0 / 3.54                   25 / 0 / 0 / 0.83                   15 / 0 / 0 / 0.48     1  False
    rest all      pooled / per articulator / half peak  F-test                  11 / 1 / 0 / 2.30                   27 / 0 / 0 / 0.94                   10 / 0 / 0 / 1.56     1  False
    rest all      pooled / per articulator / half peak  t-test                   5 / 2 / 0 / 3.54                   19 / 0 / 0 / 0.83                    6 / 0 / 0 / 0.48     2  False
    rest 15+         per subject / all six / threshold  F-test                  12 / 2 / 0 / 3.54                   33 / 0 / 0 / 0.94                   17 / 0 / 0 / 1.56     2  False
    rest 15+         per subject / all six / threshold  t-test                   8 / 0 / 0 / 1.18                   26 / 0 / 0 / 0.83                   18 / 0 / 0 / 1.56     0  False
    rest 15+         per subject / all six / half peak  F-test                   8 / 0 / 0 / 1.18                   25 / 0 / 0 / 0.83                   12 / 0 / 0 / 1.56     0  False
    rest 15+         per subject / all six / half peak  t-test                   6 / 0 / 0 / 1.18                   18 / 0 / 0 / 0.83                    7 / 0 / 0 / 0.52     0  False
    rest 15+ per subject / per articulator / threshold  F-test                  12 / 1 / 0 / 3.54                   24 / 0 / 0 / 0.83                   17 / 0 / 0 / 1.00     1  False
    rest 15+ per subject / per articulator / threshold  t-test                   9 / 0 / 0 / 1.18                   26 / 0 / 0 / 0.83                   14 / 0 / 0 / 0.48     0  False
    rest 15+ per subject / per articulator / half peak  F-test                   9 / 0 / 0 / 1.18                   25 / 0 / 0 / 0.83                   10 / 0 / 0 / 1.56     0  False
    rest 15+ per subject / per articulator / half peak  t-test                   5 / 0 / 0 / 1.18                   20 / 0 / 0 / 0.83                    6 / 0 / 0 / 0.48     0  False
    rest 15+              pooled / all six / threshold  F-test                  11 / 1 / 0 / 3.54                   33 / 0 / 0 / 0.94                   12 / 0 / 0 / 1.00     1  False
    rest 15+              pooled / all six / threshold  t-test                   8 / 0 / 0 / 1.18                   26 / 0 / 0 / 0.83                   13 / 0 / 0 / 1.00     0  False
    rest 15+              pooled / all six / half peak  F-test                   9 / 0 / 0 / 1.18                   25 / 0 / 0 / 0.83                   11 / 0 / 0 / 1.00     0  False
    rest 15+              pooled / all six / half peak  t-test                   6 / 0 / 0 / 1.18                   18 / 0 / 0 / 0.83                    8 / 0 / 0 / 0.84     0  False
    rest 15+      pooled / per articulator / threshold  F-test                  12 / 0 / 0 / 1.18                   28 / 0 / 0 / 0.94                   12 / 0 / 0 / 1.00     0  False
    rest 15+      pooled / per articulator / threshold  t-test                  11 / 0 / 0 / 1.71                   22 / 0 / 0 / 0.83                   10 / 0 / 0 / 1.00     0  False
    rest 15+      pooled / per articulator / half peak  F-test                  10 / 1 / 0 / 2.30                   25 / 0 / 0 / 0.83                    9 / 0 / 0 / 1.00     1  False
    rest 15+      pooled / per articulator / half peak  t-test                   6 / 1 / 0 / 2.30                   17 / 0 / 0 / 0.83                    7 / 0 / 0 / 1.00     1  False

Readings where it holds: 0 of 96
Largest /ju/ z at +250 ms among lips-positive GLM electrodes, over all readings and subjects: 3.54
Readings with a lips-positive GLM electrode above 2 for /ju/: 13 of 96 (baselines: {'rest': 13} ); in all of them /ja/ or /ji/ is also above 2 there
Outcome over readings: not reproduced

All vSMC electrodes, without the GLM selection (not the criterion; it separates the selection from the effect):
baseline CVs subject  vSMC  /ju/ > 2  /ju/ > 2, /ja/ and /ji/ < 2  largest /ju/
     pre all     EC2    86         0                            0          1.13
     pre all    GP31    83         0                            0          0.40
     pre all    GP33    99         0                            0          0.91
     pre 15+     EC2    86         0                            0          1.13
     pre 15+    GP31    83         0                            0          0.40
     pre 15+    GP33    99         0                            0          0.91
   whole all     EC2    86         0                            0          1.19
   whole all    GP31    83         0                            0          0.34
   whole all    GP33    99         0                            0          0.84
   whole 15+     EC2    86         0                            0          1.19
   whole 15+    GP31    83         0                            0          0.34
   whole 15+    GP33    99         0                            0          0.84
    rest all     EC2    86         8                            1          3.54
    rest all    GP31    83         0                            0          0.94
    rest all    GP33    99         0                            0          1.74
    rest 15+     EC2    86         8                            1          3.54
    rest 15+    GP31    83         0                            0          0.94
    rest 15+    GP33    99         0                            0          1.74
EC2: plotted electrode 107 (largest /ju/ minus /ja/,/ji/ at +250 ms among lips+ GLM electrodes), z at +250 ms: /ja/ -0.18, /ji/ -0.37, /ju/ 0.96; plotted range -0.56 to 1.03; mean |difference| between the three before 0 ms 0.18
GP31: plotted electrode 108 (largest /ju/ minus /ja/,/ji/ at +250 ms among lips+ GLM electrodes), z at +250 ms: /ja/ -0.22, /ji/ -0.36, /ju/ 0.15; plotted range -0.39 to 0.29; mean |difference| between the three before 0 ms 0.12
GP33: plotted electrode 110 (largest /ju/ minus /ja/,/ji/ at +250 ms among lips+ GLM electrodes), z at +250 ms: /ja/ -0.02, /ji/ -0.38, /ju/ 0.61; plotted range -0.81 to 1.14; mean |difference| between the three before 0 ms 0.29
No description has been provided for this image

Result: not reproduced. Under all 96 readings (three baselines, two CV sets, eight timing readings for T_A, two p-value readings) no GLM electrode with a positive lips weight has z above 2 for /ju/ at +250 ms and below 2 for /ja/ and /ji/. With the rest baseline some do exceed 2 for /ju/ (13 of 96 readings, largest 3.54), but at each of them /ja/ or /ji/ is above 2 as well; under pre and whole none reaches 2. The /ju/ responses of the plotted electrodes are larger than /ja/ and /ji/ at +250 ms, but under the threshold. Without the GLM selection, among all vSMC electrodes, one EC2 electrode under rest (both CV sets) has /ju/ above 2 and /ja/ and /ji/ below 2; under pre and whole no vSMC electrode in any subject reaches 2 for /ju/ (largest 1.19), so there the result does not come from the selection. The other parts of the claim are not judged (no measure in the paper).

Spatial claims (blocked)¶

fig2a-lips-dorsal, fig2b-somatotopic-sequence, suppfig3b-spatial-clustering, suppfig3d-cross-subject, suppfig3f-dv-sequence, suppfig5-intermediate-organization and suppfig7-no-latency-difference all need each electrode's anterior-posterior distance from the central sulcus and dorsal-ventral distance from the Sylvian fissure (Methods). The dandiset gives neither. EC2 and GP31 have x, y, z coordinates with no unit, frame or description; GP33, one of the three subjects, has none. The labels say precentral or postcentral, not how far from either sulcus, and no electrode is labelled as on the guenon. Asked whether the paper gives a way to obtain these distances from the grid geometry, the reader answered that it does not: the paper measures them on each subject's MRI reconstruction. These claims stay blocked as metadata_insufficient.

The GLM electrode selection and weights of fig2a-lips-dorsal do not need positions and are computed above. For information only (not an outcome, and not a reading of the claim), the median z coordinate of the top 10% of each articulator's weights in the two subjects that have coordinates, under the first reading:

In [16]:
key0 = W_READINGS[0]
print("reading:", key0)
for s in ("EC2", "GP31"):
    w = WEIGHTS[key0][s]
    z = S[s]["z"][S[s]["vsmc"]]
    kept = np.where(w["keep"])[0]
    out = []
    for a, name in enumerate(B.ARTICULATORS):
        if np.isnan(w["W"][kept, a]).all():
            out.append(f"{name} no window"); continue
        top = kept[np.argsort(-w["W"][kept, a])[:max(1, len(kept) // 10)]]
        out.append(f"{name} {np.median(z[top]):.1f}")
    print(f"{s}: {len(kept)} GLM electrodes; median z of top 10% weights: " + ", ".join(out))
reading: ('pre', 'all', ('per subject', 'all six', 'threshold'), 'F-test')
EC2: 36 GLM electrodes; median z of top 10% weights: Lips 36.6, Tongue 15.6, Larynx 11.3, Jaw 19.9
GP31: 36 GLM electrodes; median z of top 10% weights: Lips 44.3, Tongue no window, Larynx 22.8, Jaw 28.8

suppfig6-mixed-tuning¶

Single electrodes show a clear preferred articulator and also carry weights for other articulators.

In [17]:
def mixed_tuning(Wk):
    """The criterion on weights Wk (electrode, 4): holds, group means, electrodes without a positive weight."""
    Wk = np.nan_to_num(Wk, nan=-np.inf)
    pos = np.where(Wk > 0, Wk, 0)
    has = pos.sum(1) > 0
    pct = 100 * pos[has] / pos[has].sum(1, keepdims=True)
    pref = np.argmax(Wk[has], axis=1)
    groups, ok = {}, True
    for a in range(4):
        g = pct[pref == a]
        if len(g) == 0:
            groups[B.ARTICULATORS[a]] = "none"
            continue
        m = g.mean(0)
        ok &= bool(np.argmax(m) == a and (np.delete(m, a) > 0).any())
        groups[B.ARTICULATORS[a]] = f"n={len(g)} " + "/".join(f"{x:.0f}" for x in m)
    return ok, groups, int((~has).sum())


rng6 = np.random.default_rng(6)
s6 = []
for key in W_READINGS:
    Wk = np.concatenate([WEIGHTS[key][s]["W"][WEIGHTS[key][s]["keep"]] for s in B.SUBJECTS])
    no_window = int(np.isnan(Wk).any(1).sum())
    # Null: each articulator's weights permuted across the subject's GLM electrodes, which breaks any
    # tuning of single electrodes while keeping each articulator's distribution of weights.
    Wnull = np.concatenate([np.column_stack([rng6.permutation(col) for col in WEIGHTS[key][s]["W"][WEIGHTS[key][s]["keep"]].T])
                            for s in B.SUBJECTS])
    null_ok = mixed_tuning(Wnull)[0]
    ok, groups, no_pos = mixed_tuning(Wk)
    s6.append({"baseline": key[0], "CVs": key[1], "timing reading": " / ".join(key[2]), "p-value": key[3],
               "electrodes": int(len(Wk)), "with an articulator lacking T_A": no_window,
               "no positive weight": no_pos, **groups, "holds": ok, "holds on permuted weights": null_ok})
s6 = pd.DataFrame(s6)
print("Group means of positive weights as % (Lips/Tongue/Larynx/Jaw), electrodes grouped by largest W:")
print(s6.to_string(index=False))
print("\nReadings where it holds:", int(s6.holds.sum()), "of", len(s6))
for a, name in enumerate(B.ARTICULATORS):
    v = [float(x.split(" ")[1].split("/")[a]) for x in s6[name] if x != "none"]
    print(f"{name} group: preferred share {min(v):.0f} to {max(v):.0f}% over the {len(v)} readings with such electrodes")
print("GLM electrodes over the three subjects:", s6.electrodes.min(), "to", s6.electrodes.max())
print("Outcome over readings:", overall(["reproduced" if h else "not reproduced" for h in s6.holds]))
print("Null, the same test on weights permuted across electrodes (one permutation per reading): holds in",
      int(s6["holds on permuted weights"].sum()), "of", len(s6))
Group means of positive weights as % (Lips/Tongue/Larynx/Jaw), electrodes grouped by largest W:
baseline CVs                            timing reading p-value  electrodes  with an articulator lacking T_A  no positive weight            Lips          Tongue           Larynx             Jaw  holds  holds on permuted weights
     pre all         per subject / all six / threshold  F-test         103                               36                   0  n=30 74/2/4/21   n=6 0/79/8/13   n=17 9/9/65/17   n=50 8/7/7/78   True                       True
     pre all         per subject / all six / threshold  t-test         103                               35                   0  n=29 76/1/5/18   n=8 0/83/6/11  n=14 9/10/68/13   n=52 7/7/5/82   True                       True
     pre all         per subject / all six / half peak  F-test          82                               27                   0  n=26 73/1/4/22    n=6 1/85/7/8    n=9 13/8/71/8  n=41 10/9/2/79   True                       True
     pre all         per subject / all six / half peak  t-test          62                               26                   0  n=22 75/1/3/21   n=3 3/85/2/10   n=5 17/2/70/11  n=32 10/7/2/81   True                       True
     pre all per subject / per articulator / threshold  F-test         110                                0                   0 n=30 65/10/6/19 n=14 16/65/8/12  n=13 5/16/68/12  n=53 8/10/4/77   True                       True
     pre all per subject / per articulator / threshold  t-test          92                                0                   0 n=23 63/14/4/19  n=10 20/68/5/6  n=12 4/12/71/13  n=47 6/11/3/80   True                       True
     pre all per subject / per articulator / half peak  F-test          75                                0                   0  n=24 69/9/3/18   n=7 4/74/5/16   n=7 15/14/63/8  n=37 9/14/5/72   True                       True
     pre all per subject / per articulator / half peak  t-test          58                                0                   0 n=18 67/13/4/16  n=5 25/53/5/16   n=6 12/12/67/9  n=29 7/13/3/76   True                       True
     pre all              pooled / all six / threshold  F-test         101                               34                   0  n=31 71/1/4/24    n=4 0/91/4/6   n=14 5/2/75/18   n=52 9/5/5/82   True                       True
     pre all              pooled / all six / threshold  t-test          99                               39                   0  n=24 74/0/4/22   n=5 2/82/4/12   n=11 6/1/81/12  n=59 10/4/4/83   True                       True
     pre all              pooled / all six / half peak  F-test          76                               25                   0  n=26 73/1/3/23    n=4 0/92/3/4    n=8 11/4/75/9   n=38 8/6/2/84   True                       True
     pre all              pooled / all six / half peak  t-test          62                               25                   0  n=21 75/0/3/22   n=3 5/79/2/14     n=5 9/1/81/9   n=33 9/4/3/84   True                       True
     pre all      pooled / per articulator / threshold  F-test         108                                0                   0  n=28 68/8/5/19   n=12 8/77/8/7  n=14 13/6/65/16  n=54 11/8/6/75   True                       True
     pre all      pooled / per articulator / threshold  t-test         101                                0                   0  n=24 69/7/5/18  n=7 13/67/6/14  n=12 11/5/68/15   n=58 9/8/6/77   True                       True
     pre all      pooled / per articulator / half peak  F-test          73                                0                   0  n=25 70/8/3/20    n=4 2/96/2/0   n=7 11/6/73/10 n=37 11/11/3/74   True                       True
     pre all      pooled / per articulator / half peak  t-test          60                                0                   0  n=19 70/9/4/17  n=4 18/60/1/22   n=6 10/7/71/11  n=31 7/11/3/79   True                       True
     pre 15+         per subject / all six / threshold  F-test         114                               47                   0  n=34 71/2/6/21   n=5 0/82/2/16  n=23 14/7/63/16  n=52 10/6/4/80   True                       True
     pre 15+         per subject / all six / threshold  t-test          98                               30                   0  n=30 76/1/5/18    n=6 0/91/2/7   n=19 9/9/70/11   n=43 7/8/4/81   True                       True
     pre 15+         per subject / all six / half peak  F-test          90                               35                   0  n=30 73/1/5/20   n=6 1/80/11/8   n=10 11/7/73/9  n=44 12/8/2/78   True                       True
     pre 15+         per subject / all six / half peak  t-test          56                               20                   0  n=22 79/1/4/16   n=3 3/84/3/10    n=3 14/4/80/2   n=28 9/8/2/81   True                      False
     pre 15+ per subject / per articulator / threshold  F-test         116                                0                   0  n=30 69/7/6/18 n=15 15/64/8/13  n=16 5/14/67/14   n=55 9/8/6/78   True                       True
     pre 15+ per subject / per articulator / threshold  t-test          97                                0                   0  n=24 70/8/6/16  n=9 23/59/11/7  n=15 4/10/71/15   n=49 8/7/6/80   True                       True
     pre 15+ per subject / per articulator / half peak  F-test          81                                0                   0  n=25 72/6/5/17   n=5 6/67/7/19   n=9 12/8/66/15 n=42 11/10/5/74   True                       True
     pre 15+ per subject / per articulator / half peak  t-test          58                                0                   0  n=19 74/7/6/13  n=4 29/55/6/10   n=5 13/11/68/8   n=30 8/9/3/79   True                       True
     pre 15+              pooled / all six / threshold  F-test         115                               44                   1  n=34 72/2/6/20   n=7 6/66/8/20   n=21 6/6/72/17   n=52 9/6/6/79   True                       True
     pre 15+              pooled / all six / threshold  t-test         107                               36                   1  n=27 75/0/6/19   n=9 5/70/8/16   n=20 5/7/73/15   n=50 8/5/6/80   True                       True
     pre 15+              pooled / all six / half peak  F-test          90                               32                   0  n=30 74/1/4/21  n=7 7/66/16/11     n=8 9/0/82/8   n=45 9/8/4/78   True                       True
     pre 15+              pooled / all six / half peak  t-test          63                               24                   0  n=21 78/0/4/18  n=4 12/72/11/5    n=5 11/7/74/9   n=33 9/6/3/83   True                       True
     pre 15+      pooled / per articulator / threshold  F-test         117                                0                   0  n=34 70/5/7/18  n=13 9/74/5/11   n=14 8/9/69/14  n=56 10/5/6/79   True                       True
     pre 15+      pooled / per articulator / threshold  t-test         100                                0                   0  n=26 73/4/6/17    n=9 9/80/4/6   n=15 8/9/72/12   n=50 8/6/5/80   True                       True
     pre 15+      pooled / per articulator / half peak  F-test          86                                0                   0  n=29 72/4/4/20   n=6 6/73/4/17   n=10 12/8/74/6  n=41 10/9/3/77   True                       True
     pre 15+      pooled / per articulator / half peak  t-test          61                                0                   0  n=19 75/5/4/16  n=5 12/68/2/18    n=6 9/6/76/10   n=31 9/8/2/81   True                       True
   whole all         per subject / all six / threshold  F-test         107                               36                   0  n=33 71/3/5/21   n=6 0/78/9/13  n=18 9/10/64/17   n=50 8/7/7/78   True                       True
   whole all         per subject / all six / threshold  t-test          95                               30                   0  n=26 74/1/3/21   n=7 0/77/6/17 n=13 11/11/63/15   n=49 5/7/6/82   True                       True
   whole all         per subject / all six / half peak  F-test          77                               29                   0  n=28 72/1/4/23    n=5 2/89/6/3   n=7 14/5/68/13  n=37 10/9/3/77   True                       True
   whole all         per subject / all six / half peak  t-test          58                               26                   0  n=22 74/1/2/23    n=2 5/93/3/0   n=3 17/0/61/21  n=31 10/7/2/81   True                       True
   whole all per subject / per articulator / threshold  F-test         105                                0                   0 n=29 65/11/2/22   n=12 9/74/9/7  n=14 12/7/68/13   n=50 9/9/4/78   True                       True
   whole all per subject / per articulator / threshold  t-test          93                                0                   0 n=21 65/10/2/22   n=4 15/78/7/0  n=11 12/6/65/17  n=57 9/10/4/78   True                       True
   whole all per subject / per articulator / half peak  F-test          72                                0                   0  n=26 72/7/2/19    n=4 8/83/1/9    n=6 12/8/73/7 n=36 10/12/4/74   True                       True
   whole all per subject / per articulator / half peak  t-test          53                                0                   0  n=17 70/9/2/18  n=3 22/63/1/14    n=5 14/9/68/9  n=28 8/11/3/78   True                       True
   whole all              pooled / all six / threshold  F-test         106                               35                   1  n=30 71/2/4/24    n=3 0/87/5/8   n=15 7/5/75/13  n=57 10/6/5/80   True                       True
   whole all              pooled / all six / threshold  t-test          96                               35                   0  n=22 73/1/3/24   n=6 2/77/3/18   n=11 6/2/79/14  n=57 10/4/3/83   True                       True
   whole all              pooled / all six / half peak  F-test          85                               27                   0  n=30 72/2/4/22    n=4 0/92/3/4   n=9 12/3/75/10   n=42 9/6/2/82   True                       True
   whole all              pooled / all six / half peak  t-test          61                               23                   0  n=20 76/0/2/22   n=3 4/81/5/10    n=4 2/1/84/13  n=34 10/6/3/82   True                       True
   whole all      pooled / per articulator / threshold  F-test         106                                0                   0 n=31 66/11/5/17   n=9 2/80/8/10  n=13 4/11/62/23  n=53 10/9/7/74   True                       True
   whole all      pooled / per articulator / threshold  t-test         100                                0                   0 n=25 65/12/6/17  n=6 10/70/15/5   n=13 7/7/64/22  n=56 8/11/6/75   True                       True
   whole all      pooled / per articulator / half peak  F-test          73                                0                   0 n=28 66/10/5/18   n=4 8/71/14/8   n=7 14/8/67/11  n=34 9/11/6/74   True                       True
   whole all      pooled / per articulator / half peak  t-test          60                                0                   0 n=20 67/12/3/18  n=4 17/60/1/22   n=4 15/0/66/19  n=32 8/10/7/75   True                       True
   whole 15+         per subject / all six / threshold  F-test         111                               41                   0  n=33 70/2/7/20   n=6 0/85/2/12 n=18 13/10/62/15  n=54 10/6/5/78   True                       True
   whole 15+         per subject / all six / threshold  t-test          88                               25                   0  n=26 76/1/5/18    n=6 0/92/2/6  n=13 12/8/65/15   n=43 7/7/3/83   True                       True
   whole 15+         per subject / all six / half peak  F-test          78                               30                   0  n=29 75/1/4/20   n=5 2/85/10/3   n=6 12/5/73/10  n=38 11/9/4/76   True                       True
   whole 15+         per subject / all six / half peak  t-test          53                               21                   0  n=23 78/1/3/19    n=2 5/92/3/0   n=1 12/0/59/30   n=27 8/8/3/81   True                       True
   whole 15+ per subject / per articulator / threshold  F-test         114                                0                   0  n=29 70/7/3/19  n=13 11/73/9/7  n=16 12/8/65/16  n=56 10/7/5/78   True                       True
   whole 15+ per subject / per articulator / threshold  t-test          95                                0                   0  n=24 72/6/3/19   n=4 15/77/8/0  n=14 10/6/62/21   n=53 9/6/5/79   True                       True
   whole 15+ per subject / per articulator / half peak  F-test          78                                0                   0  n=27 72/6/4/18    n=4 8/80/3/9    n=8 16/6/70/9  n=39 13/9/5/73   True                       True
   whole 15+ per subject / per articulator / half peak  t-test          54                                0                   0  n=19 72/7/5/16   n=2 19/74/1/5    n=5 15/9/67/9   n=28 9/8/3/80   True                       True
   whole 15+              pooled / all six / threshold  F-test         116                               47                   1  n=35 71/2/6/21  n=9 7/67/13/13   n=16 7/5/75/13  n=55 10/5/6/78   True                       True
   whole 15+              pooled / all six / threshold  t-test         111                               39                   1  n=27 73/0/4/23 n=11 6/70/13/11   n=17 6/9/73/12   n=55 8/5/6/80   True                       True
   whole 15+              pooled / all six / half peak  F-test          89                               31                   0  n=29 75/1/4/20  n=7 8/68/13/11    n=8 11/1/79/9  n=45 11/8/4/77   True                       True
   whole 15+              pooled / all six / half peak  t-test          56                               22                   0  n=22 79/0/3/18  n=3 16/65/11/7    n=3 1/10/82/6  n=28 10/6/2/82   True                       True
   whole 15+      pooled / per articulator / threshold  F-test         116                                0                   0  n=33 69/7/3/21   n=10 9/79/5/8  n=13 10/6/73/11  n=60 11/6/6/77   True                       True
   whole 15+      pooled / per articulator / threshold  t-test          99                                0                   0  n=23 70/6/4/20   n=5 12/81/4/3   n=16 7/5/73/15  n=55 10/6/5/79   True                       True
   whole 15+      pooled / per articulator / half peak  F-test          86                                0                   0  n=31 69/7/5/19    n=4 2/90/1/7   n=10 13/7/71/9  n=41 12/9/3/76   True                       True
   whole 15+      pooled / per articulator / half peak  t-test          55                                0                   0  n=19 72/7/4/17  n=3 10/76/0/14   n=6 10/3/72/15  n=27 10/7/2/80   True                       True
    rest all         per subject / all six / threshold  F-test         102                               34                   0  n=28 70/1/4/25   n=9 5/71/17/6  n=13 6/12/62/20   n=52 8/8/7/77   True                       True
    rest all         per subject / all six / threshold  t-test         103                               33                   0  n=20 71/1/4/25  n=14 10/73/9/8  n=14 5/14/62/18   n=55 7/7/5/80   True                       True
    rest all         per subject / all six / half peak  F-test          75                               26                   0  n=27 71/2/3/25    n=5 5/83/8/4  n=8 13/12/60/16   n=35 9/9/4/78   True                       True
    rest all         per subject / all six / half peak  t-test          53                               20                   0  n=19 75/1/2/22  n=4 11/68/16/4   n=2 16/0/54/30  n=28 12/6/2/81   True                       True
    rest all per subject / per articulator / threshold  F-test          99                                0                   0  n=23 67/9/4/20  n=9 11/67/13/9  n=13 2/16/61/21 n=54 11/8/10/70   True                       True
    rest all per subject / per articulator / threshold  t-test          96                                0                   0 n=20 69/10/4/17  n=7 14/72/11/4  n=13 2/13/67/18   n=56 9/8/9/74   True                       True
    rest all per subject / per articulator / half peak  F-test          71                                0                   0  n=23 72/6/3/19   n=3 6/80/11/3   n=6 12/8/60/20 n=39 11/11/9/69   True                       True
    rest all per subject / per articulator / half peak  t-test          57                                0                   0  n=17 71/8/3/17 n=2 23/51/11/15   n=6 12/4/64/20  n=32 12/9/6/73   True                       True
    rest all              pooled / all six / threshold  F-test          93                               26                   0  n=26 72/2/3/23   n=8 2/80/2/16  n=14 6/12/65/18   n=45 8/6/4/81   True                       True
    rest all              pooled / all six / threshold  t-test          94                               28                   0  n=19 76/0/3/21   n=8 2/83/3/12  n=17 5/15/65/15  n=50 10/6/2/81   True                       True
    rest all              pooled / all six / half peak  F-test          74                               22                   0  n=25 73/2/2/22    n=6 4/83/9/4  n=6 11/14/63/13  n=37 11/8/3/79   True                       True
    rest all              pooled / all six / half peak  t-test          57                               20                   0  n=17 78/1/2/20    n=3 9/86/3/1   n=4 10/14/68/8  n=33 10/7/2/81   True                       True
    rest all      pooled / per articulator / threshold  F-test         105                                0                   0  n=24 69/6/4/21 n=10 15/63/14/8  n=12 3/15/58/24  n=59 10/7/9/74   True                       True
    rest all      pooled / per articulator / threshold  t-test          95                                0                   1  n=19 70/7/5/18  n=6 20/66/14/0   n=12 4/9/63/23   n=57 9/7/7/76   True                       True
    rest all      pooled / per articulator / half peak  F-test          75                                0                   0  n=22 72/4/3/20   n=3 7/79/11/3   n=7 13/6/59/22  n=43 12/9/9/71   True                       True
    rest all      pooled / per articulator / half peak  t-test          52                                0                   0  n=14 76/6/3/15  n=1 31/48/21/0   n=4 11/8/63/18  n=33 11/7/8/74   True                       True
    rest 15+         per subject / all six / threshold  F-test         106                                0                   1  n=27 71/5/3/21  n=10 8/69/16/7 n=13 15/12/52/20  n=55 10/9/5/76   True                       True
    rest 15+         per subject / all six / threshold  t-test          93                                0                   1  n=21 70/5/4/21  n=17 13/72/7/8  n=10 9/10/60/21   n=44 8/9/2/80   True                       True
    rest 15+         per subject / all six / half peak  F-test          74                                0                   0  n=27 68/6/4/23  n=6 10/74/10/7   n=6 12/17/62/9  n=35 10/9/5/76   True                       True
    rest 15+         per subject / all six / half peak  t-test          52                                0                   0  n=18 72/4/2/22  n=6 19/61/11/9   n=1 34/0/49/17  n=27 11/6/2/82   True                       True
    rest 15+ per subject / per articulator / threshold  F-test          99                                0                   0  n=25 72/4/3/22  n=8 16/65/17/2   n=9 5/17/58/21  n=57 9/7/11/74   True                       True
    rest 15+ per subject / per articulator / threshold  t-test          94                                0                   0  n=23 73/4/3/20  n=5 10/77/13/0  n=11 1/10/66/23   n=55 9/5/9/77   True                       True
    rest 15+ per subject / per articulator / half peak  F-test          71                                0                   0  n=24 72/2/4/22   n=3 6/77/14/3  n=4 10/10/68/12 n=40 11/8/12/69   True                       True
    rest 15+ per subject / per articulator / half peak  t-test          52                                0                   0  n=17 74/3/4/19            none   n=3 10/6/73/11  n=32 10/4/9/77   True                       True
    rest 15+              pooled / all six / threshold  F-test         102                                0                   0  n=28 69/6/4/21  n=13 7/67/21/5  n=10 9/10/61/21  n=51 10/8/6/76   True                       True
    rest 15+              pooled / all six / threshold  t-test          96                                0                   0  n=22 70/5/4/21  n=18 9/71/13/7  n=12 4/13/67/16   n=44 9/9/4/78   True                       True
    rest 15+              pooled / all six / half peak  F-test          78                                0                   0  n=28 67/6/4/23   n=8 9/70/16/5   n=5 8/13/68/12  n=37 9/10/5/76   True                       True
    rest 15+              pooled / all six / half peak  t-test          57                                0                   0  n=18 72/4/2/22  n=7 16/58/9/17   n=4 9/15/64/12  n=28 10/7/2/80   True                       True
    rest 15+      pooled / per articulator / threshold  F-test          99                                0                   0  n=27 70/5/3/22    n=7 6/82/8/4  n=10 9/16/58/17   n=55 9/7/4/80   True                       True
    rest 15+      pooled / per articulator / threshold  t-test          90                                0                   0  n=20 72/4/2/21   n=7 6/71/17/6  n=11 7/15/61/16   n=52 8/7/3/81   True                       True
    rest 15+      pooled / per articulator / half peak  F-test          71                                0                   0  n=28 68/4/3/24    n=3 0/94/6/0  n=4 17/10/59/14   n=36 9/6/6/79   True                      False
    rest 15+      pooled / per articulator / half peak  t-test          49                                0                   0  n=18 72/3/2/23   n=1 24/71/0/5   n=2 22/0/59/20  n=28 10/4/4/83   True                       True

Readings where it holds: 96 of 96
Lips group: preferred share 63 to 79% over the 96 readings with such electrodes
Tongue group: preferred share 48 to 96% over the 95 readings with such electrodes
Larynx group: preferred share 49 to 84% over the 96 readings with such electrodes
Jaw group: preferred share 69 to 84% over the 96 readings with such electrodes
GLM electrodes over the three subjects: 49 to 117
Outcome over readings: reproduced
Null, the same test on weights permuted across electrodes (one permutation per reading): holds in 94 of 96

Result: reproduced. Under all 96 readings each group's preferred articulator has the largest mean share of positive weight (Lips 63 to 79%, Tongue 48 to 96%, Larynx 49 to 84%, Jaw 69 to 84%), and the other articulators keep a non-zero share (table). In one reading no electrode prefers the tongue, so that group is absent there. The GLM electrodes number 49 to 117 over the three subjects. In readings where an articulator has no window T_A in a subject, its weights there are missing and those electrodes are grouped on the other articulators. The test barely discriminates: on weights permuted across each subject's electrodes, which removes any tuning of single electrodes, it holds in 94 of 96 readings, because grouping electrodes by their largest weight puts the preferred articulator first almost by construction. The outcome follows the criterion; that single electrodes have a clear preferred articulator beyond what the grouping gives is not shown by it.

fig3d-timing-sequence¶

Articulator correlations follow a staggered sequence consistent across subjects; lip and tongue correlations begin well before sound onset, jaw and larynx align to the C-V transition, and the high and back tongue vowel features peak near the vowel midpoint (~250 ms).

Acoustic onset: the dandiset has no audio, so the onset of each CV is taken from the hand-marked syllable start of the trial table (mean over renditions, then over CVs). The criterion allows this substitute since the reader's answer, as a deviation from the prototype and thresholding of the Methods, with the result against t = 0 shown beside it.

In [18]:
onsets = []
for s in B.SUBJECTS:
    for b in blocks[s]:
        k = b["kept"]
        for lab, st, cv in zip(b["condition"][k], b["start"][k], b["cv"][k]):
            p = B.parse_label(lab)
            if p:
                onsets.append({"subject": s, "cv": p, "onset_ms": 1000 * (st - cv)})
onsets = pd.DataFrame(onsets)
per_cv = onsets.groupby(["subject", "cv"]).onset_ms.mean()
ACOUSTIC_ONSET = per_cv.mean()
print(f"Acoustic onset, substitute from the hand-marked syllable starts: mean over {len(per_cv)} CVs {ACOUSTIC_ONSET:.1f} ms "
      f"(per subject {per_cv.groupby(level=0).mean().round(1).to_dict()}; CV range {per_cv.min():.0f} to {per_cv.max():.0f} ms)")


def fig3d_table(TIM):
    """The criterion under every reading, from timing tables {(baseline, CVs, reading): rows}."""
    f3 = []
    for base in BASES:
        for cs in CVSETS:
            for reading in TIMING_READINGS:
                t = TIM[base, cs, reading]
                for anova in ("onset", "peak"):
                    F, p = stats.f_oneway(*[t[t.articulator == a][anova] for a in ART6])
                    mo = t.groupby("articulator").onset.mean()
                    mp = t.groupby("articulator").peak.mean()
                    c1 = mo["Lips"] < ACOUSTIC_ONSET and mo["Tongue"] < ACOUSTIC_ONSET
                    c2 = min(mo["Jaw"], mo["Larynx"]) > max(mo["Lips"], mo["Tongue"])
                    c3 = all(abs(mp[a] - 250) <= 25 for a in B.VOWEL_ARTICULATORS)
                    c1_0 = mo["Lips"] < 0 and mo["Tongue"] < 0
                    n_ok, n_ok0 = c1 + c2 + c3, c1_0 + c2 + c3
                    outcome = ("reproduced" if p < 1e-10 and n_ok == 3 else
                               "partially" if p < 1e-10 and n_ok == 2 else "not reproduced")
                    outcome0 = ("reproduced" if p < 1e-10 and n_ok0 == 3 else
                                "partially" if p < 1e-10 and n_ok0 == 2 else "not reproduced")
                    f3.append({"baseline": base, "CVs": cs, "timing reading": " / ".join(reading), "ANOVA on": anova,
                               "n": len(t), **{f"n {a[:6]}": int((t.articulator == a).sum()) for a in ART6},
                               "F": round(F, 1), "p": p, **{f"onset {a[:6]}": round(mo.get(a, np.nan)) for a in ART6},
                               "peak Back": round(mp["Back Tongue"]), "peak High": round(mp["High Tongue"]),
                               "lips,tongue < acoustic": c1, "jaw,larynx later": c2, "vowel peaks 250+-25": c3,
                               "outcome": outcome, "lips,tongue < 0": c1_0, "outcome vs t = 0": outcome0})
    return pd.DataFrame(f3)


f3 = fig3d_table(TIMING)
print(f3.to_string(index=False))
print("\nOutcome over readings (substitute acoustic onset):", overall(f3.outcome))
print("Beside it, against t = 0:", overall(f3["outcome vs t = 0"]), "| readings with lips and tongue onsets before 0 ms:",
      int(f3["lips,tongue < 0"].sum()), "of", len(f3), "| before the substitute onset:", int(f3["lips,tongue < acoustic"].sum()))
print("Ranges over readings: mean onset Lips", f3["onset Lips"].min(), "to", f3["onset Lips"].max(),
      "| Tongue", f3["onset Tongue"].min(), "to", f3["onset Tongue"].max(), "| Jaw", f3["onset Jaw"].min(), "to", f3["onset Jaw"].max(),
      "| Larynx", f3["onset Larynx"].min(), "to", f3["onset Larynx"].max(), "| peak Back", f3["peak Back"].min(), "to", f3["peak Back"].max(),
      "| peak High", f3["peak High"].min(), "to", f3["peak High"].max())
print("ANOVA F", f3.F.min(), "to", f3.F.max(), "| readings with p < 1e-10:", int((f3.p < 1e-10).sum()), "of", len(f3),
      "| conditions holding per reading:", (f3["lips,tongue < acoustic"].astype(int) + f3["jaw,larynx later"] + f3["vowel peaks 250+-25"]).value_counts().to_dict())
print("Total electrodes over articulators and subjects: from", f3.n.min(), "to", f3.n.max(), "(paper 211 +- 21)")
print("Electrodes per articulator over readings (min to max):", {a: (int(f3[f"n {a[:6]}"].min()), int(f3[f"n {a[:6]}"].max())) for a in ART6},
      "| Tongue under the 'all six' readings:", (int(f3[f3["timing reading"].str.contains("all six")]["n Tongue"].min()),
                                                 int(f3[f3["timing reading"].str.contains("all six")]["n Tongue"].max())))
print("Per subject, first reading (pre, all CVs):", TIMING["pre", "all", TIMING_READINGS[0]].groupby(["subject", "articulator"]).size().unstack().to_dict("index"))
for s in B.SUBJECTS:
    t = TIMING["pre", "all", TIMING_READINGS[0]]
    print(s, "mean onsets (ms):", t[t.subject == s].groupby("articulator").onset.mean().round().to_dict())
fig, ax = plt.subplots(figsize=(6, 3))
t = TIMING["pre", "all", TIMING_READINGS[0]]
for i, a in enumerate(ART6):
    g = t[t.articulator == a]
    ax.errorbar(g.onset.mean(), i, xerr=g.onset.sem(), fmt="<", color="C0")
    ax.errorbar(g.peak.mean(), i, xerr=g.peak.sem(), fmt="o", color="C1")
    ax.errorbar(g.offset.mean(), i, xerr=g.offset.sem(), fmt=">", color="C2")
ax.axvline(ACOUSTIC_ONSET, color="grey", ls="--", label="substitute acoustic onset"); ax.axvline(0, color="k", lw=0.5, label="C-V transition")
ax.legend(fontsize=7)
ax.set_yticks(range(6)); ax.set_yticklabels(ART6); ax.set_xlabel("ms (first reading, pre baseline, all CVs)")
plt.show()
# Variant (not a reading): the artifact trials left out of the CV means.
RHO_CLEAN = {(s, base, cs): B.partial_correlation(HV_CLEAN[s, base, cs], AM[s, cs]) for s in B.SUBJECTS for base in BASES for cs in CVSETS}
f3c = fig3d_table({(base, cs, r): timing_rows(base, cs, r, RHO_CLEAN) for base in BASES for cs in CVSETS for r in TIMING_READINGS})
print("Variant, artifact trials left out: outcome over readings", overall(f3c.outcome), "| against t = 0", overall(f3c["outcome vs t = 0"]),
      "| conditions holding per reading", (f3c["lips,tongue < acoustic"].astype(int) + f3c["jaw,larynx later"] + f3c["vowel peaks 250+-25"]).value_counts().to_dict(),
      "| mean onset Lips", f3c["onset Lips"].min(), "to", f3c["onset Lips"].max(), "| Tongue", f3c["onset Tongue"].min(), "to", f3c["onset Tongue"].max(),
      "| Jaw", f3c["onset Jaw"].min(), "to", f3c["onset Jaw"].max(), "| peak High", f3c["peak High"].min(), "to", f3c["peak High"].max(),
      "| electrodes", f3c.n.min(), "to", f3c.n.max())
Acoustic onset, substitute from the hand-marked syllable starts: mean over 169 CVs -109.6 ms (per subject {'EC2': -86.6, 'GP31': -113.2, 'GP33': -129.2}; CV range -257 to -11 ms)
baseline CVs                            timing reading ANOVA on   n  n Lips  n Tongue  n Larynx  n Jaw  n Back T  n High T    F            p  onset Lips  onset Tongue  onset Larynx  onset Jaw  onset Back T  onset High T  peak Back  peak High  lips,tongue < acoustic  jaw,larynx later  vowel peaks 250+-25        outcome  lips,tongue < 0 outcome vs t = 0
     pre all         per subject / all six / threshold    onset 175      31         5        18     34        38        49 22.5 3.008100e-17        -173           160           -13       -136           165           224        235        305                   False             False                False not reproduced            False   not reproduced
     pre all         per subject / all six / threshold     peak 175      31         5        18     34        38        49 27.2 4.093779e-20        -173           160           -13       -136           165           224        235        305                   False             False                False not reproduced            False   not reproduced
     pre all         per subject / all six / half peak    onset 175      31         5        18     34        38        49 27.3 3.599985e-20        -233            93           -91       -260           112           166        235        305                   False             False                False not reproduced            False   not reproduced
     pre all         per subject / all six / half peak     peak 175      31         5        18     34        38        49 27.2 4.093779e-20        -233            93           -91       -260           112           166        235        305                   False             False                False not reproduced            False   not reproduced
     pre all per subject / per articulator / threshold    onset 224      33        43        39     31        38        40 10.6 3.852976e-09         -83            89            55       -134           234           211        297        278                   False             False                False not reproduced            False   not reproduced
     pre all per subject / per articulator / threshold     peak 224      33        43        39     31        38        40 11.6 6.157008e-10         -83            89            55       -134           234           211        297        278                   False             False                False not reproduced            False   not reproduced
     pre all per subject / per articulator / half peak    onset 224      33        43        39     31        38        40 13.9 9.129367e-12        -132            52            12       -270           183           147        297        278                   False             False                False not reproduced            False   not reproduced
     pre all per subject / per articulator / half peak     peak 224      33        43        39     31        38        40 11.6 6.157008e-10        -132            52            12       -270           183           147        297        278                   False             False                False not reproduced            False   not reproduced
     pre all              pooled / all six / threshold    onset 176      25         3        18     38        35        57 24.7 1.222061e-18        -187           213            98       -125           169           206        245        282                   False             False                False not reproduced            False   not reproduced
     pre all              pooled / all six / threshold     peak 176      25         3        18     38        35        57 29.5 1.648552e-21        -187           213            98       -125           169           206        245        282                   False             False                False not reproduced            False   not reproduced
     pre all              pooled / all six / half peak    onset 176      25         3        18     38        35        57 27.8 1.627926e-20        -244           162             6       -248           109           132        245        282                   False             False                False not reproduced            False   not reproduced
     pre all              pooled / all six / half peak     peak 176      25         3        18     38        35        57 29.5 1.648552e-21        -244           162             6       -248           109           132        245        282                   False             False                False not reproduced            False   not reproduced
     pre all      pooled / per articulator / threshold    onset 197      33        41        31     31        28        33 11.9 5.274175e-10        -154           119            58       -117           179           195        262        284                   False             False                False not reproduced            False   not reproduced
     pre all      pooled / per articulator / threshold     peak 197      33        41        31     31        28        33 13.5 2.575740e-11        -154           119            58       -117           179           195        262        284                   False             False                False not reproduced            False   not reproduced
     pre all      pooled / per articulator / half peak    onset 197      33        41        31     31        28        33 15.1 1.830459e-12        -211            80            -5       -253           120           126        262        284                   False             False                False not reproduced            False   not reproduced
     pre all      pooled / per articulator / half peak     peak 197      33        41        31     31        28        33 13.5 2.575740e-11        -211            80            -5       -253           120           126        262        284                   False             False                False not reproduced            False   not reproduced
     pre 15+         per subject / all six / threshold    onset 165      26         5        14     29        39        52 19.9 2.265976e-15        -154           148           -30       -138           165           219        246        306                   False             False                False not reproduced            False   not reproduced
     pre 15+         per subject / all six / threshold     peak 165      26         5        14     29        39        52 24.5 3.178201e-18        -154           148           -30       -138           165           219        246        306                   False             False                False not reproduced            False   not reproduced
     pre 15+         per subject / all six / half peak    onset 165      26         5        14     29        39        52 25.3 1.058468e-18        -244            93          -111       -259            76           143        246        306                   False             False                False not reproduced            False   not reproduced
     pre 15+         per subject / all six / half peak     peak 165      26         5        14     29        39        52 24.5 3.178201e-18        -244            93          -111       -259            76           143        246        306                   False             False                False not reproduced            False   not reproduced
     pre 15+ per subject / per articulator / threshold    onset 185      30        36        26     30        28        35 10.4 9.551120e-09         -54           163            47       -138           197           232        285        309                   False             False                False not reproduced            False   not reproduced
     pre 15+ per subject / per articulator / threshold     peak 185      30        36        26     30        28        35 11.7 8.208530e-10         -54           163            47       -138           197           232        285        309                   False             False                False not reproduced            False   not reproduced
     pre 15+ per subject / per articulator / half peak    onset 185      30        36        26     30        28        35 12.6 1.767613e-10        -137           125           -18       -260            89           144        285        309                   False             False                False not reproduced            False   not reproduced
     pre 15+ per subject / per articulator / half peak     peak 185      30        36        26     30        28        35 11.7 8.208530e-10        -137           125           -18       -260            89           144        285        309                   False             False                False not reproduced            False   not reproduced
     pre 15+              pooled / all six / threshold    onset 165      24         2        12     31        39        57 30.2 1.588162e-21        -191           220            38       -128           187           228        271        317                   False             False                False not reproduced            False   not reproduced
     pre 15+              pooled / all six / threshold     peak 165      24         2        12     31        39        57 39.2 4.073747e-26        -191           220            38       -128           187           228        271        317                   False             False                False not reproduced            False   not reproduced
     pre 15+              pooled / all six / half peak    onset 165      24         2        12     31        39        57 34.0 1.643266e-23        -267           192           -69       -253           102           139        271        317                   False             False                False not reproduced            False   not reproduced
     pre 15+              pooled / all six / half peak     peak 165      24         2        12     31        39        57 39.2 4.073747e-26        -267           192           -69       -253           102           139        271        317                   False             False                False not reproduced            False   not reproduced
     pre 15+      pooled / per articulator / threshold    onset 180      25        40        27     31        28        29 13.9 2.099851e-11        -171           139            58       -131           201           214        287        309                   False             False                False not reproduced            False   not reproduced
     pre 15+      pooled / per articulator / threshold     peak 180      25        40        27     31        28        29 14.7 4.932962e-12        -171           139            58       -131           201           214        287        309                   False             False                False not reproduced            False   not reproduced
     pre 15+      pooled / per articulator / half peak    onset 180      25        40        27     31        28        29 16.0 5.764995e-13        -239           100           -11       -253            92           123        287        309                   False             False                False not reproduced            False   not reproduced
     pre 15+      pooled / per articulator / half peak     peak 180      25        40        27     31        28        29 14.7 4.932962e-12        -239           100           -11       -253            92           123        287        309                   False             False                False not reproduced            False   not reproduced
   whole all         per subject / all six / threshold    onset 179      31         5        16     35        43        49 22.4 2.642003e-17        -161           148             7       -136           177           223        242        304                   False             False                False not reproduced            False   not reproduced
   whole all         per subject / all six / threshold     peak 179      31         5        16     35        43        49 26.3 9.768148e-20        -161           148             7       -136           177           223        242        304                   False             False                False not reproduced            False   not reproduced
   whole all         per subject / all six / half peak    onset 179      31         5        16     35        43        49 28.0 9.734750e-21        -223            92           -71       -265           128           161        242        304                   False             False                False not reproduced            False   not reproduced
   whole all         per subject / all six / half peak     peak 179      31         5        16     35        43        49 26.3 9.768148e-20        -223            92           -71       -265           128           161        242        304                   False             False                False not reproduced            False   not reproduced
   whole all per subject / per articulator / threshold    onset 226      32        41        40     29        42        42  9.9 1.500497e-08         -97           107            78       -131           196           217        255        281                   False             False                False not reproduced            False   not reproduced
   whole all per subject / per articulator / threshold     peak 226      32        41        40     29        42        42  9.9 1.433881e-08         -97           107            78       -131           196           217        255        281                   False             False                False not reproduced            False   not reproduced
   whole all per subject / per articulator / half peak    onset 226      32        41        40     29        42        42 12.8 6.842306e-11        -148            73            39       -261           148           154        255        281                   False             False                False not reproduced            False   not reproduced
   whole all per subject / per articulator / half peak     peak 226      32        41        40     29        42        42  9.9 1.433881e-08        -148            73            39       -261           148           154        255        281                   False             False                False not reproduced            False   not reproduced
   whole all              pooled / all six / threshold    onset 173      26         5        15     38        34        55 22.5 3.260289e-17        -158            36           112       -126           190           197        270        276                   False             False                False not reproduced            False   not reproduced
   whole all              pooled / all six / threshold     peak 173      26         5        15     38        34        55 27.4 3.522387e-20        -158            36           112       -126           190           197        270        276                   False             False                False not reproduced            False   not reproduced
   whole all              pooled / all six / half peak    onset 173      26         5        15     38        34        55 26.1 1.874297e-19        -222           -26            25       -246           132           123        270        276                   False             False                False not reproduced             True   not reproduced
   whole all              pooled / all six / half peak     peak 173      26         5        15     38        34        55 27.4 3.522387e-20        -222           -26            25       -246           132           123        270        276                   False             False                False not reproduced             True   not reproduced
   whole all      pooled / per articulator / threshold    onset 199      34        42        33     30        28        32 11.5 9.489350e-10        -131           133            75       -116           196           193        279        286                   False             False                False not reproduced            False   not reproduced
   whole all      pooled / per articulator / threshold     peak 199      34        42        33     30        28        32 13.4 3.392311e-11        -131           133            75       -116           196           193        279        286                   False             False                False not reproduced            False   not reproduced
   whole all      pooled / per articulator / half peak    onset 199      34        42        33     30        28        32 14.9 2.319526e-12        -195            96            16       -243           129           130        279        286                   False             False                False not reproduced            False   not reproduced
   whole all      pooled / per articulator / half peak     peak 199      34        42        33     30        28        32 13.4 3.392311e-11        -195            96            16       -243           129           130        279        286                   False             False                False not reproduced            False   not reproduced
   whole 15+         per subject / all six / threshold    onset 162      26         5        11     30        40        50 18.4 2.575473e-14        -153           147            -2       -136           164           210        243        302                   False             False                False not reproduced            False   not reproduced
   whole 15+         per subject / all six / threshold     peak 162      26         5        11     30        40        50 22.8 3.886384e-17        -153           147            -2       -136           164           210        243        302                   False             False                False not reproduced            False   not reproduced
   whole 15+         per subject / all six / half peak    onset 162      26         5        11     30        40        50 24.8 2.607336e-18        -247            92           -98       -265            77           137        243        302                   False             False                False not reproduced            False   not reproduced
   whole 15+         per subject / all six / half peak     peak 162      26         5        11     30        40        50 22.8 3.886384e-17        -247            92           -98       -265            77           137        243        302                   False             False                False not reproduced            False   not reproduced
   whole 15+ per subject / per articulator / threshold    onset 188      29        35        28     30        31        35 11.9 5.317144e-10         -76           176            65       -137           221           227        301        307                   False             False                False not reproduced            False   not reproduced
   whole 15+ per subject / per articulator / threshold     peak 188      29        35        28     30        31        35 13.6 2.820393e-11         -76           176            65       -137           221           227        301        307                   False             False                False not reproduced            False   not reproduced
   whole 15+ per subject / per articulator / half peak    onset 188      29        35        28     30        31        35 14.6 4.650912e-12        -159           141            -6       -259           112           142        301        307                   False             False                False not reproduced            False   not reproduced
   whole 15+ per subject / per articulator / half peak     peak 188      29        35        28     30        31        35 13.6 2.820393e-11        -159           141            -6       -259           112           142        301        307                   False             False                False not reproduced            False   not reproduced
   whole 15+              pooled / all six / threshold    onset 163      24         3        11     30        40        55 26.5 2.404551e-19        -190           168            23       -122           175           218        256        307                   False             False                False not reproduced            False   not reproduced
   whole 15+              pooled / all six / threshold     peak 163      24         3        11     30        40        55 32.4 1.405508e-22        -190           168            23       -122           175           218        256        307                   False             False                False not reproduced            False   not reproduced
   whole 15+              pooled / all six / half peak    onset 163      24         3        11     30        40        55 30.1 2.158521e-21        -270            88           -76       -252            89           127        256        307                   False             False                False not reproduced            False   not reproduced
   whole 15+              pooled / all six / half peak     peak 163      24         3        11     30        40        55 32.4 1.405508e-22        -270            88           -76       -252            89           127        256        307                   False             False                False not reproduced            False   not reproduced
   whole 15+      pooled / per articulator / threshold    onset 187      26        43        29     30        29        30 13.7 2.357204e-11        -159           148            72       -122           210           225        294        314                   False             False                False not reproduced            False   not reproduced
   whole 15+      pooled / per articulator / threshold     peak 187      26        43        29     30        29        30 14.8 3.841425e-12        -159           148            72       -122           210           225        294        314                   False             False                False not reproduced            False   not reproduced
   whole 15+      pooled / per articulator / half peak    onset 187      26        43        29     30        29        30 15.8 6.300431e-13        -228           105             6       -252           103           130        294        314                   False             False                False not reproduced            False   not reproduced
   whole 15+      pooled / per articulator / half peak     peak 187      26        43        29     30        29        30 14.8 3.841425e-12        -228           105             6       -252           103           130        294        314                   False             False                False not reproduced            False   not reproduced
    rest all         per subject / all six / threshold    onset 168      26         6        14     37        35        50 21.7 1.268418e-16        -154           229            10       -129           136           214        203        296                   False             False                False not reproduced            False   not reproduced
    rest all         per subject / all six / threshold     peak 168      26         6        14     37        35        50 26.7 1.253267e-19        -154           229            10       -129           136           214        203        296                   False             False                False not reproduced            False   not reproduced
    rest all         per subject / all six / half peak    onset 168      26         6        14     37        35        50 27.3 5.526509e-20        -229           179           -68       -254            67           159        203        296                   False             False                False not reproduced            False   not reproduced
    rest all         per subject / all six / half peak     peak 168      26         6        14     37        35        50 26.7 1.253267e-19        -229           179           -68       -254            67           159        203        296                   False             False                False not reproduced            False   not reproduced
    rest all per subject / per articulator / threshold    onset 202      30        38        33     31        34        36 10.8 3.166727e-09        -101           143            72       -138           168           231        227        302                   False             False                False not reproduced            False   not reproduced
    rest all per subject / per articulator / threshold     peak 202      30        38        33     31        34        36 11.0 2.379807e-09        -101           143            72       -138           168           231        227        302                   False             False                False not reproduced            False   not reproduced
    rest all per subject / per articulator / half peak    onset 202      30        38        33     31        34        36 14.0 1.106925e-11        -167           106            21       -262           102           167        227        302                   False             False                False not reproduced            False   not reproduced
    rest all per subject / per articulator / half peak     peak 202      30        38        33     31        34        36 11.0 2.379807e-09        -167           106            21       -262           102           167        227        302                   False             False                False not reproduced            False   not reproduced
    rest all              pooled / all six / threshold    onset 170      22         6        15     42        30        55 22.6 3.404576e-17        -171           210            86       -129           142           196        224        278                   False             False                False not reproduced            False   not reproduced
    rest all              pooled / all six / threshold     peak 170      22         6        15     42        30        55 26.8 9.072746e-20        -171           210            86       -129           142           196        224        278                   False             False                False not reproduced            False   not reproduced
    rest all              pooled / all six / half peak    onset 170      22         6        15     42        30        55 26.7 1.146495e-19        -252           150             9       -238            79           127        224        278                   False             False                False not reproduced            False   not reproduced
    rest all              pooled / all six / half peak     peak 170      22         6        15     42        30        55 26.8 9.072746e-20        -252           150             9       -238            79           127        224        278                   False             False                False not reproduced            False   not reproduced
    rest all      pooled / per articulator / threshold    onset 192      29        43        32     35        23        30  9.4 5.225132e-08         -86           168           131       -129           121           168        215        276                   False             False                False not reproduced            False   not reproduced
    rest all      pooled / per articulator / threshold     peak 192      29        43        32     35        23        30 10.1 1.432819e-08         -86           168           131       -129           121           168        215        276                   False             False                False not reproduced            False   not reproduced
    rest all      pooled / per articulator / half peak    onset 192      29        43        32     35        23        30 13.6 2.598851e-11        -153           133            70       -249            56           116        215        276                   False             False                False not reproduced            False   not reproduced
    rest all      pooled / per articulator / half peak     peak 192      29        43        32     35        23        30 10.1 1.432819e-08        -153           133            70       -249            56           116        215        276                   False             False                False not reproduced            False   not reproduced
    rest 15+         per subject / all six / threshold    onset 168      24         7        10     35        40        52 18.4 1.861795e-14        -126           290            -1       -138           145           198        235        300                   False             False                False not reproduced            False   not reproduced
    rest 15+         per subject / all six / threshold     peak 168      24         7        10     35        40        52 22.9 2.456985e-17        -126           290            -1       -138           145           198        235        300                   False             False                False not reproduced            False   not reproduced
    rest 15+         per subject / all six / half peak    onset 168      24         7        10     35        40        52 24.3 3.269460e-18        -218           235           -90       -256            53           124        235        300                   False             False                False not reproduced            False   not reproduced
    rest 15+         per subject / all six / half peak     peak 168      24         7        10     35        40        52 22.9 2.456985e-17        -218           235           -90       -256            53           124        235        300                   False             False                False not reproduced            False   not reproduced
    rest 15+ per subject / per articulator / threshold    onset 193      27        43        26     34        28        35 12.4 2.117814e-10        -106           185            94       -138           176           208        272        311                   False             False                False not reproduced            False   not reproduced
    rest 15+ per subject / per articulator / threshold     peak 193      27        43        26     34        28        35 13.9 1.519627e-11        -106           185            94       -138           176           208        272        311                   False             False                False not reproduced            False   not reproduced
    rest 15+ per subject / per articulator / half peak    onset 193      27        43        26     34        28        35 15.2 1.633913e-12        -180           145            39       -252            69           129        272        311                   False             False                False not reproduced            False   not reproduced
    rest 15+ per subject / per articulator / half peak     peak 193      27        43        26     34        28        35 13.9 1.519627e-11        -180           145            39       -252            69           129        272        311                   False             False                False not reproduced            False   not reproduced
    rest 15+              pooled / all six / threshold    onset 163      22         5        11     34        39        52 23.0 2.631448e-17        -155           213            49       -142           174           195        268        301                   False             False                False not reproduced            False   not reproduced
    rest 15+              pooled / all six / threshold     peak 163      22         5        11     34        39        52 29.8 3.393746e-21        -155           213            49       -142           174           195        268        301                   False             False                False not reproduced            False   not reproduced
    rest 15+              pooled / all six / half peak    onset 163      22         5        11     34        39        52 26.1 3.821200e-19        -247           148           -39       -247            86           103        268        301                   False             False                False not reproduced            False   not reproduced
    rest 15+              pooled / all six / half peak     peak 163      22         5        11     34        39        52 29.8 3.393746e-21        -247           148           -39       -247            86           103        268        301                   False             False                False not reproduced            False   not reproduced
    rest 15+      pooled / per articulator / threshold    onset 187      26        45        28     33        26        29 16.0 4.700755e-13        -133           242           114       -140           166           212        263        325                   False             False                False not reproduced            False   not reproduced
    rest 15+      pooled / per articulator / threshold     peak 187      26        45        28     33        26        29 16.6 1.751393e-13        -133           242           114       -140           166           212        263        325                   False             False                False not reproduced            False   not reproduced
    rest 15+      pooled / per articulator / half peak    onset 187      26        45        28     33        26        29 19.5 1.594970e-15        -213           204            32       -249            52            99        263        325                   False             False                False not reproduced            False   not reproduced
    rest 15+      pooled / per articulator / half peak     peak 187      26        45        28     33        26        29 16.6 1.751393e-13        -213           204            32       -249            52            99        263        325                   False             False                False not reproduced            False   not reproduced

Outcome over readings (substitute acoustic onset): not reproduced
Beside it, against t = 0: not reproduced | readings with lips and tongue onsets before 0 ms: 2 of 96 | before the substitute onset: 0
Ranges over readings: mean onset Lips -270 to -54 | Tongue -26 to 290 | Jaw -270 to -116 | Larynx -111 to 131 | peak Back 203 to 301 | peak High 276 to 325
ANOVA F 9.4 to 39.2 | readings with p < 1e-10: 76 of 96 | conditions holding per reading: {0: 96}
Total electrodes over articulators and subjects: from 162 to 226 (paper 211 +- 21)
Electrodes per articulator over readings (min to max): {'Lips': (22, 34), 'Tongue': (2, 45), 'Larynx': (10, 40), 'Jaw': (29, 42), 'Back Tongue': (23, 43), 'High Tongue': (29, 57)} | Tongue under the 'all six' readings: (2, 7)
Per subject, first reading (pre, all CVs): {'EC2': {'Back Tongue': 11.0, 'High Tongue': 22.0, 'Jaw': 13.0, 'Larynx': 3.0, 'Lips': 3.0, 'Tongue': 1.0}, 'GP31': {'Back Tongue': 14.0, 'High Tongue': 12.0, 'Jaw': 6.0, 'Larynx': 7.0, 'Lips': 23.0, 'Tongue': nan}, 'GP33': {'Back Tongue': 13.0, 'High Tongue': 15.0, 'Jaw': 15.0, 'Larynx': 8.0, 'Lips': 5.0, 'Tongue': 4.0}}
EC2 mean onsets (ms): {'Back Tongue': 59.0, 'High Tongue': 166.0, 'Jaw': -130.0, 'Larynx': 172.0, 'Lips': -122.0, 'Tongue': -225.0}
GP31 mean onsets (ms): {'Back Tongue': 312.0, 'High Tongue': 448.0, 'Jaw': -178.0, 'Larynx': 0.0, 'Lips': -229.0}
GP33 mean onsets (ms): {'Back Tongue': 96.0, 'High Tongue': 129.0, 'Jaw': -125.0, 'Larynx': -94.0, 'Lips': 50.0, 'Tongue': 256.0}
No description has been provided for this image
Variant, artifact trials left out: outcome over readings not reproduced | against t = 0 not reproduced | conditions holding per reading {0: 92, 1: 4} | mean onset Lips -338 to -125 | Tongue -6 to 289 | Jaw -291 to -96 | peak High 268 to 303 | electrodes 156 to 227

Result: not reproduced. Under every one of the 96 readings none of the three order conditions holds, against the substitute acoustic onset (-110 ms) and against t = 0 alike. The lips correlations begin before the substitute onset (mean lips onset -270 to -54 ms), but the tongue correlations begin at -26 to +290 ms, so lips and tongue both precede the substitute onset in no reading and precede t = 0 in 2 of 96; the jaw begins as early as the lips (-270 to -116 ms), not later; and the high-tongue peak is at 276 to 325 ms, outside 250 +- 25 ms. The ANOVA across the six articulators has F = 9.4 to 39.2, with p below 1e-10 in 76 of the 96 readings. Electrode counts are 162 to 226 (paper 211). Tongue electrodes number 2 to 7 under the readings with one threshold for all six articulators (2 to 45 over all readings), so the tongue onsets of those readings rest on few electrodes. Leaving out the trials that overlap intervals marked as ECoG artifacts (a variant, not a reading) gives the same outcome: one condition holds in 4 of 96 readings and none in the others, with mean lips onsets of -338 to -125 ms and tongue onsets of -6 to 289 ms.

pca-nine-components¶

The cortical state-space has nine spatial PCs in every subject, the eigenvalues falling fast up to the ninth and slowly after, together explaining about 60% of the variance.

In [19]:
# The variance explained does not depend on the input projected (readings i and ii).
pc = []
for base in BASES:
    for z in ZMODES:
        for cs in CVSETS:
            for w in [(-500, 750), (-375, 620)]:
                fr = {s: STATE[s, base, z, cs, w][1] for s in B.SUBJECTS}
                pc.append({"baseline": base, "z-scoring": z, "CVs": cs, "window": f"{w[0]} to {w[1]}",
                           **{s: round(fr[s][:9].sum(), 3) for s in B.SUBJECTS},
                           "mean": round(np.mean([fr[s][:9].sum() for s in B.SUBJECTS]), 3)})
pc = pd.DataFrame(pc)
pc["within 0.54-0.66"] = pc["mean"].between(0.54, 0.66)
print(pc.to_string(index=False))
pc["outcome"] = np.where(pc["within 0.54-0.66"], "reproduced", "not reproduced")
print("\nOutcome over readings:", overall(pc.outcome))
by_factor(pc, ["baseline", "z-scoring", "CVs", "window"])
fig, axes = plt.subplots(1, 2, figsize=(10, 3))
for ax, z in zip(axes, ZMODES):
    for s in B.SUBJECTS:
        ax.plot(np.arange(1, 21), 100 * STATE[s, "pre", z, "all", EP][1][:20], "o-", ms=3, label=s)
    ax.axvline(9, color="grey", ls="--"); ax.set_title(f"pre baseline, {z} z-scoring, all CVs"); ax.set_xlabel("PC"); ax.set_ylabel("% variance")
axes[0].legend(); plt.show()
print("% variance of PCs 1 to 12, pre baseline, all CVs, epoch (all values plotted are within 0 to 40%):")
for z in ZMODES:
    for s in B.SUBJECTS:
        print(z, s, np.round(100 * STATE[s, "pre", z, "all", EP][1][:12], 1))
baseline z-scoring CVs      window   EC2  GP31  GP33  mean  within 0.54-0.66
     pre       row all -500 to 750 0.607 0.734 0.536 0.625              True
     pre       row all -375 to 620 0.624 0.743 0.549 0.639              True
     pre       row 15+ -500 to 750 0.605 0.665 0.536 0.602              True
     pre       row 15+ -375 to 620 0.621 0.675 0.549 0.615              True
     pre      time all -500 to 750 0.440 0.677 0.468 0.528             False
     pre      time all -375 to 620 0.458 0.681 0.475 0.538             False
     pre      time 15+ -500 to 750 0.438 0.562 0.468 0.490             False
     pre      time 15+ -375 to 620 0.454 0.565 0.475 0.498             False
   whole       row all -500 to 750 0.608 0.743 0.539 0.630              True
   whole       row all -375 to 620 0.625 0.752 0.552 0.643              True
   whole       row 15+ -500 to 750 0.606 0.651 0.539 0.598              True
   whole       row 15+ -375 to 620 0.621 0.659 0.552 0.611              True
   whole      time all -500 to 750 0.440 0.691 0.473 0.535             False
   whole      time all -375 to 620 0.459 0.695 0.481 0.545              True
   whole      time 15+ -500 to 750 0.438 0.560 0.473 0.490             False
   whole      time 15+ -375 to 620 0.454 0.562 0.481 0.499             False
    rest       row all -500 to 750 0.608 0.790 0.552 0.650              True
    rest       row all -375 to 620 0.624 0.792 0.566 0.661             False
    rest       row 15+ -500 to 750 0.603 0.786 0.552 0.647              True
    rest       row 15+ -375 to 620 0.619 0.787 0.566 0.657              True
    rest      time all -500 to 750 0.440 0.738 0.489 0.556              True
    rest      time all -375 to 620 0.459 0.735 0.497 0.564              True
    rest      time 15+ -500 to 750 0.436 0.705 0.489 0.543              True
    rest      time 15+ -375 to 620 0.453 0.700 0.497 0.550              True

Outcome over readings: differ by reading: not reproduced 8, reproduced 16
Outcome counts by reading factor (24 readings):
  baseline: {'pre': {'reproduced': 4, 'not reproduced': 4}, 'whole': {'reproduced': 5, 'not reproduced': 3}, 'rest': {'reproduced': 7, 'not reproduced': 1}}
  z-scoring: {'row': {'reproduced': 11, 'not reproduced': 1}, 'time': {'not reproduced': 7, 'reproduced': 5}}
  CVs: {'all': {'reproduced': 8, 'not reproduced': 4}, '15+': {'reproduced': 8, 'not reproduced': 4}}
  window: {'-500 to 750': {'reproduced': 8, 'not reproduced': 4}, '-375 to 620': {'reproduced': 8, 'not reproduced': 4}}
No description has been provided for this image
% variance of PCs 1 to 12, pre baseline, all CVs, epoch (all values plotted are within 0 to 40%):
row EC2 [27.3  9.2  5.6  5.2  4.1  3.1  2.6  1.8  1.7  1.6  1.5  1.4]
row GP31 [38.8  8.9  6.7  4.8  3.8  3.6  2.5  2.3  2.   1.8  1.5  1.4]
row GP33 [22.4  8.1  5.2  4.8  4.   2.8  2.2  2.2  1.9  1.8  1.7  1.5]
time EC2 [13.6  7.   5.1  4.3  3.6  3.4  2.5  2.4  2.1  1.9  1.8  1.6]
time GP31 [36.9  8.2  4.9  4.1  3.4  2.8  2.7  2.4  2.2  1.7  1.6  1.5]
time GP33 [16.7  7.5  5.7  4.3  3.4  2.6  2.4  2.1  2.   1.9  1.7  1.5]

Result: blocked (methods_underspecified). With row z-scoring, the first nine PCs explain a mean of 0.60 to 0.66 over subjects, within 0.54 to 0.66 in 11 of 12 readings (rest, every CV and the -375 to 620 ms window gives 0.661). With time z-scoring, the mean is 0.49 to 0.56, within the tolerance under the rest baseline (4 readings) and once under whole, and below it in the other 7 readings. The readings give different outcomes (16 within, 8 not). The z-scoring decides most of the split (row 11 of 12 within, time 5 of 12); the CV set and the window do not change the count (8 of 12 within each). The variance explained does not depend on the input projected. The spectra show no sharp change at the ninth eigenvalue in any subject (printed values); that part is not judged.

fig4a-consonant-clusters¶

At the consonant time (-25 ms) k-means clustering of the cortical state-space groups syllables by major oral articulator, and three clusters are more parsimonious than two or four (mean silhouette 0.47 against 0.45 and 0.43).

In [20]:
tc, tv = B.ms_index(-25), B.ms_index(250)
sil = []
for base, z, pj, cs in SS_READINGS:
    for s in B.SUBJECTS:
        K = KS[s, base, z, pj, cs][:, :, tc]
        row = {"baseline": base, "z-scoring": z, "projection": pj, "CVs": cs, "subject": s}
        for k in (2, 3, 4):
            row[f"k={k}"] = silhouette_score(K, B.kmeans(K, k, seed=40 + k))
        sil.append(row)
sil = pd.DataFrame(sil)
print(sil.round(3).to_string(index=False))
means = sil.groupby(["baseline", "z-scoring", "projection", "CVs"])[["k=2", "k=3", "k=4"]].mean()
means["k=3 highest"] = means.idxmax(axis=1) == "k=3"
means["all within 10%"] = (abs(means["k=2"] - 0.45) <= 0.045) & (abs(means["k=3"] - 0.47) <= 0.047) & (abs(means["k=4"] - 0.43) <= 0.043)
print("\nMean over subjects (paper 0.45, 0.47, 0.43):")
print(means.round(3).to_string())
means["outcome"] = ["reproduced" if h and w else "partially" if h else "not reproduced"
                    for h, w in zip(means["k=3 highest"], means["all within 10%"])]
print("Outcome over readings:", overall(means.outcome))
by_factor(means.reset_index(), ["baseline", "z-scoring", "projection", "CVs"])
print("Reading with the highest mean silhouette, by k, over the 24 readings:", means[["k=2", "k=3", "k=4"]].idxmax(axis=1).value_counts().to_dict())
baseline z-scoring projection CVs subject   k=2   k=3   k=4
     pre       row          i all     EC2 0.259 0.280 0.270
     pre       row          i all    GP31 0.782 0.410 0.252
     pre       row          i all    GP33 0.158 0.153 0.171
     pre       row          i 15+     EC2 0.263 0.274 0.273
     pre       row          i 15+    GP31 0.370 0.239 0.227
     pre       row          i 15+    GP33 0.158 0.153 0.171
     pre       row         ii all     EC2 0.363 0.345 0.352
     pre       row         ii all    GP31 0.516 0.497 0.312
     pre       row         ii all    GP33 0.232 0.231 0.249
     pre       row         ii 15+     EC2 0.362 0.362 0.369
     pre       row         ii 15+    GP31 0.507 0.311 0.330
     pre       row         ii 15+    GP33 0.232 0.231 0.249
     pre      time          i all     EC2 0.255 0.233 0.234
     pre      time          i all    GP31 0.759 0.326 0.223
     pre      time          i all    GP33 0.137 0.138 0.147
     pre      time          i 15+     EC2 0.195 0.232 0.247
     pre      time          i 15+    GP31 0.303 0.209 0.210
     pre      time          i 15+    GP33 0.137 0.138 0.147
     pre      time         ii all     EC2 0.350 0.328 0.360
     pre      time         ii all    GP31 0.512 0.499 0.310
     pre      time         ii all    GP33 0.231 0.231 0.248
     pre      time         ii 15+     EC2 0.349 0.360 0.362
     pre      time         ii 15+    GP31 0.488 0.296 0.324
     pre      time         ii 15+    GP33 0.231 0.231 0.248
   whole       row          i all     EC2 0.256 0.278 0.267
   whole       row          i all    GP31 0.801 0.377 0.249
   whole       row          i all    GP33 0.158 0.160 0.167
   whole       row          i 15+     EC2 0.261 0.272 0.272
   whole       row          i 15+    GP31 0.329 0.228 0.219
   whole       row          i 15+    GP33 0.158 0.160 0.167
   whole       row         ii all     EC2 0.358 0.337 0.347
   whole       row         ii all    GP31 0.793 0.439 0.306
   whole       row         ii all    GP33 0.219 0.224 0.242
   whole       row         ii 15+     EC2 0.358 0.360 0.365
   whole       row         ii 15+    GP31 0.435 0.301 0.311
   whole       row         ii 15+    GP33 0.219 0.224 0.242
   whole      time          i all     EC2 0.253 0.233 0.230
   whole      time          i all    GP31 0.776 0.307 0.230
   whole      time          i all    GP33 0.135 0.136 0.163
   whole      time          i 15+     EC2 0.190 0.228 0.243
   whole      time          i 15+    GP31 0.244 0.201 0.201
   whole      time          i 15+    GP33 0.135 0.136 0.163
   whole      time         ii all     EC2 0.345 0.328 0.353
   whole      time         ii all    GP31 0.783 0.433 0.302
   whole      time         ii all    GP33 0.218 0.231 0.240
   whole      time         ii 15+     EC2 0.345 0.356 0.357
   whole      time         ii 15+    GP31 0.430 0.295 0.301
   whole      time         ii 15+    GP33 0.218 0.231 0.240
    rest       row          i all     EC2 0.261 0.277 0.261
    rest       row          i all    GP31 0.350 0.353 0.359
    rest       row          i all    GP33 0.161 0.159 0.175
    rest       row          i 15+     EC2 0.260 0.269 0.264
    rest       row          i 15+    GP31 0.333 0.343 0.381
    rest       row          i 15+    GP33 0.161 0.159 0.175
    rest       row         ii all     EC2 0.386 0.344 0.347
    rest       row         ii all    GP31 0.659 0.411 0.408
    rest       row         ii all    GP33 0.221 0.233 0.249
    rest       row         ii 15+     EC2 0.384 0.345 0.347
    rest       row         ii 15+    GP31 0.675 0.412 0.431
    rest       row         ii 15+    GP33 0.221 0.233 0.249
    rest      time          i all     EC2 0.251 0.225 0.228
    rest      time          i all    GP31 0.605 0.618 0.325
    rest      time          i all    GP33 0.130 0.157 0.168
    rest      time          i 15+     EC2 0.187 0.231 0.241
    rest      time          i 15+    GP31 0.596 0.292 0.294
    rest      time          i 15+    GP33 0.130 0.157 0.168
    rest      time         ii all     EC2 0.361 0.316 0.335
    rest      time         ii all    GP31 0.654 0.402 0.406
    rest      time         ii all    GP33 0.228 0.235 0.248
    rest      time         ii 15+     EC2 0.358 0.318 0.335
    rest      time         ii 15+    GP31 0.671 0.409 0.426
    rest      time         ii 15+    GP33 0.228 0.235 0.248

Mean over subjects (paper 0.45, 0.47, 0.43):
                                     k=2    k=3    k=4  k=3 highest  all within 10%
baseline z-scoring projection CVs                                                  
pre      row       i          15+  0.264  0.222  0.223        False           False
                              all  0.400  0.281  0.231        False           False
                   ii         15+  0.367  0.301  0.316        False           False
                              all  0.370  0.358  0.304        False           False
         time      i          15+  0.211  0.193  0.202        False           False
                              all  0.384  0.232  0.201        False           False
                   ii         15+  0.356  0.296  0.311        False           False
                              all  0.364  0.353  0.306        False           False
rest     row       i          15+  0.251  0.257  0.273        False           False
                              all  0.257  0.263  0.265        False           False
                   ii         15+  0.427  0.330  0.343        False           False
                              all  0.422  0.329  0.335        False           False
         time      i          15+  0.304  0.227  0.234        False           False
                              all  0.329  0.333  0.241         True           False
                   ii         15+  0.419  0.321  0.336        False           False
                              all  0.414  0.318  0.330        False           False
whole    row       i          15+  0.249  0.220  0.219        False           False
                              all  0.405  0.272  0.228        False           False
                   ii         15+  0.337  0.295  0.306        False           False
                              all  0.457  0.333  0.298        False           False
         time      i          15+  0.190  0.188  0.202        False           False
                              all  0.388  0.225  0.208        False           False
                   ii         15+  0.331  0.294  0.299        False           False
                              all  0.449  0.331  0.298        False           False
Outcome over readings: differ by reading: not reproduced 23, partially 1
Outcome counts by reading factor (24 readings):
  baseline: {'pre': {'not reproduced': 8}, 'rest': {'not reproduced': 7, 'partially': 1}, 'whole': {'not reproduced': 8}}
  z-scoring: {'row': {'not reproduced': 12}, 'time': {'not reproduced': 11, 'partially': 1}}
  projection: {'i': {'not reproduced': 11, 'partially': 1}, 'ii': {'not reproduced': 12}}
  CVs: {'15+': {'not reproduced': 12}, 'all': {'not reproduced': 11, 'partially': 1}}
Reading with the highest mean silhouette, by k, over the 24 readings: {'k=2': 20, 'k=4': 3, 'k=3': 1}

Result: blocked (methods_underspecified). In 23 of the 24 readings three clusters do not have the highest mean silhouette (not reproduced). In one, rest baseline, time z-scoring, projection (i) and every CV, k = 3 is highest by a small margin (0.333 against 0.329 for k = 2), with values outside tolerance (partially reproduced), so the readings differ. Over the 24 readings, k = 2 has the highest mean silhouette in 20, k = 4 in 3 and k = 3 in 1. The silhouettes are lower than the paper's under every reading (k = 3: 0.19 to 0.36 against 0.47). GP31's k = 2 silhouette is 0.35 to 0.80 with every CV, where its /thi/ has two renditions, and 0.24 to 0.68 with only CVs of 15 or more renditions.

suppfig11-co-clustering¶

Clusters of the cortical state-space match the major articulators at the consonant time (median co-clustering 0.50 against 0.32 by chance) and the vowels at the vowel time (0.65 against 0.37), across subjects.

In [21]:
rng = np.random.default_rng(11)
cc = []
for base, z, pj, cs in SS_READINGS:
    obs = {"cons a": [], "cons b": [], "vowel": []}
    null = {"cons a": [], "cons b": [], "vowel": []}
    for s in B.SUBJECTS:
        K = KS[s, base, z, pj, cs]
        nc_c = B.kmeans(K[:, :, tc], 3, seed=21)
        nc_v = B.kmeans(K[:, :, tv], 3, seed=22)
        for name, nc, labs in (("cons a", nc_c, [B.MAJOR["a"].get(c) for c, v in CVS[s, cs]]),
                               ("cons b", nc_c, [B.MAJOR["b"].get(c) for c, v in CVS[s, cs]]),
                               ("vowel", nc_v, [v for c, v in CVS[s, cs]])):
            keep = np.array([l is not None for l in labs])
            ac = np.array([l for l in labs if l is not None])
            ncs = nc[keep]
            obs[name].append(B.co_clustering(ncs, ac))
            null[name].append(np.mean([B.co_clustering(ncs, rng.permutation(ac)) for _ in range(1000)], axis=0))
    row = {"baseline": base, "z-scoring": z, "projection": pj, "CVs": cs}
    test_ok = {}
    for name in obs:
        o, n = np.concatenate(obs[name]), np.concatenate(null[name])
        p = stats.wilcoxon(o, n).pvalue
        row[f"{name}: n, obs, null, p"] = f"{len(o)}, {np.median(o):.3f}, {np.median(n):.3f}, {p:.1e}"
        test_ok[name] = bool(p < 1e-10 and np.median(o - n) > 0)
    for cons in ("cons a", "cons b"):
        ok_tests = test_ok[cons] and test_ok["vowel"]     # each label reading with its own consonant test
        mo = {k: np.median(np.concatenate(obs[k])) for k in (cons, "vowel")}
        mn = {k: np.median(np.concatenate(null[k])) for k in (cons, "vowel")}
        within = abs(mo[cons] - 0.50) <= 0.05 and abs(mn[cons] - 0.32) <= 0.032 and abs(mo["vowel"] - 0.65) <= 0.065 and abs(mn["vowel"] - 0.37) <= 0.037
        row[f"outcome ({cons[-1]})"] = "reproduced" if ok_tests and within else ("partially" if ok_tests else "not reproduced")
    cc.append(row)
cc = pd.DataFrame(cc)
print(cc.to_string(index=False))
print("Expected: consonants 0.50 +- 0.05 against 0.32 +- 0.032; vowels 0.65 +- 0.065 against 0.37 +- 0.037; p < 1e-10")
print("Outcome over readings:", overall(list(cc["outcome (a)"]) + list(cc["outcome (b)"])))
cc_long = pd.concat([cc.assign(labels=lr, outcome=cc[f"outcome ({lr})"]) for lr in ("a", "b")])
by_factor(cc_long, ["baseline", "z-scoring", "projection", "CVs", "labels"])
for name in ("cons a", "cons b", "vowel"):
    col = cc[f"{name}: n, obs, null, p"].str.split(", ", expand=True).astype(float)
    print(f"{name}: observed median {col[1].min():.3f} to {col[1].max():.3f}, null {col[2].min():.3f} to {col[2].max():.3f}, p {col[3].min():.0e} to {col[3].max():.0e}")
baseline z-scoring projection CVs    cons a: n, obs, null, p    cons b: n, obs, null, p     vowel: n, obs, null, p    outcome (a)    outcome (b)
     pre       row          i all 133, 0.750, 0.395, 2.2e-16 160, 0.667, 0.385, 1.0e-17 169, 0.486, 0.386, 3.8e-11      partially      partially
     pre       row          i 15+ 131, 0.750, 0.338, 2.5e-19 158, 0.711, 0.336, 2.6e-20 167, 0.444, 0.383, 4.7e-08 not reproduced not reproduced
     pre       row         ii all 133, 0.878, 0.388, 3.8e-19 160, 0.767, 0.346, 2.2e-20 169, 0.578, 0.349, 5.5e-18      partially      partially
     pre       row         ii 15+ 131, 0.880, 0.344, 6.1e-21 158, 0.784, 0.350, 4.5e-22 167, 0.615, 0.351, 5.4e-19      partially      partially
     pre      time          i all 133, 0.720, 0.355, 5.3e-16 160, 0.645, 0.349, 7.7e-16 169, 0.512, 0.355, 2.8e-16      partially      partially
     pre      time          i 15+ 131, 0.706, 0.347, 1.8e-18 158, 0.595, 0.348, 1.1e-18 167, 0.583, 0.348, 1.7e-18      partially      partially
     pre      time         ii all 133, 0.878, 0.387, 3.7e-19 160, 0.754, 0.342, 2.5e-20 169, 0.698, 0.348, 2.1e-16      partially      partially
     pre      time         ii 15+ 131, 0.880, 0.347, 1.2e-20 158, 0.784, 0.356, 8.5e-22 167, 0.698, 0.343, 2.4e-20      partially      partially
   whole       row          i all 133, 0.783, 0.392, 1.5e-17 160, 0.667, 0.385, 1.7e-19 169, 0.493, 0.389, 1.6e-11      partially      partially
   whole       row          i 15+ 131, 0.750, 0.347, 2.8e-19 158, 0.651, 0.336, 2.8e-20 167, 0.409, 0.387, 2.9e-08 not reproduced not reproduced
   whole       row         ii all 133, 0.889, 0.394, 7.3e-20 160, 0.784, 0.350, 8.3e-22 169, 0.583, 0.352, 9.8e-18      partially      partially
   whole       row         ii 15+ 131, 0.880, 0.342, 2.0e-20 158, 0.784, 0.347, 8.6e-22 167, 0.667, 0.359, 2.0e-19      partially      partially
   whole      time          i all 133, 0.720, 0.348, 4.9e-17 160, 0.645, 0.367, 4.5e-18 169, 0.512, 0.357, 2.8e-16      partially      partially
   whole      time          i 15+ 131, 0.720, 0.339, 3.5e-19 158, 0.636, 0.346, 2.5e-19 167, 0.650, 0.356, 1.4e-19      partially      partially
   whole      time         ii all 133, 0.878, 0.381, 7.4e-20 160, 0.786, 0.342, 5.0e-22 169, 0.565, 0.348, 2.1e-17      partially      partially
   whole      time         ii 15+ 131, 0.880, 0.342, 2.0e-20 158, 0.800, 0.357, 1.8e-21 167, 0.650, 0.346, 6.8e-19      partially      partially
    rest       row          i all 133, 0.744, 0.393, 5.3e-18 160, 0.667, 0.389, 7.5e-19 169, 0.493, 0.387, 8.0e-09 not reproduced not reproduced
    rest       row          i 15+ 131, 0.750, 0.360, 3.3e-18 158, 0.706, 0.349, 3.2e-20 167, 0.492, 0.386, 4.7e-07 not reproduced not reproduced
    rest       row         ii all 133, 0.897, 0.412, 8.5e-21 160, 0.800, 0.363, 3.7e-22 169, 0.558, 0.363, 1.9e-17      partially      partially
    rest       row         ii 15+ 131, 0.909, 0.411, 1.2e-20 158, 0.800, 0.347, 9.3e-23 167, 0.558, 0.361, 1.0e-17      partially      partially
    rest      time          i all 133, 0.633, 0.391, 3.3e-14 160, 0.611, 0.378, 2.7e-13 169, 0.484, 0.343, 3.9e-11      partially      partially
    rest      time          i 15+ 131, 0.732, 0.384, 1.4e-18 158, 0.706, 0.370, 1.7e-19 167, 0.492, 0.430, 3.1e-10 not reproduced not reproduced
    rest      time         ii all 133, 0.897, 0.406, 2.6e-20 160, 0.778, 0.355, 1.4e-22 169, 0.585, 0.362, 1.2e-17      partially      partially
    rest      time         ii 15+ 131, 0.909, 0.395, 3.5e-20 158, 0.792, 0.345, 1.6e-22 167, 0.585, 0.360, 2.1e-17      partially      partially
Expected: consonants 0.50 +- 0.05 against 0.32 +- 0.032; vowels 0.65 +- 0.065 against 0.37 +- 0.037; p < 1e-10
Outcome over readings: differ by reading: not reproduced 10, partially 38
Outcome counts by reading factor (48 readings):
  baseline: {'pre': {'partially': 14, 'not reproduced': 2}, 'whole': {'partially': 14, 'not reproduced': 2}, 'rest': {'partially': 10, 'not reproduced': 6}}
  z-scoring: {'row': {'partially': 16, 'not reproduced': 8}, 'time': {'partially': 22, 'not reproduced': 2}}
  projection: {'i': {'partially': 14, 'not reproduced': 10}, 'ii': {'partially': 24}}
  CVs: {'all': {'partially': 22, 'not reproduced': 2}, '15+': {'partially': 16, 'not reproduced': 8}}
  labels: {'a': {'partially': 19, 'not reproduced': 5}, 'b': {'partially': 19, 'not reproduced': 5}}
cons a: observed median 0.633 to 0.909, null 0.338 to 0.412, p 6e-21 to 3e-14
cons b: observed median 0.595 to 0.800, null 0.336 to 0.389, p 9e-23 to 3e-13
vowel: observed median 0.409 to 0.698, null 0.343 to 0.430, p 2e-20 to 5e-07

Result: blocked (methods_underspecified). The state-space clusters match the major articulators more than chance under every reading (consonant p from 9e-23 to 3e-13). The observed consonant medians (0.633 to 0.909 with labels (a), 0.595 to 0.800 with labels (b)) are above the paper's 0.50 +- 0.05, and the vowel medians (0.41 to 0.70) are mostly below its 0.65 +- 0.065, so 38 of the 48 readings (24 readings by two label readings) give partially reproduced. In five readings, all with projection (i) (row with 15+ CVs under each baseline, rest with row and every CV, and rest with time and 15+ CVs), the vowel test misses the p < 1e-10 bound (p from 3e-10 to 5e-07) and gives not reproduced under both label readings. Projection (ii) gives partially reproduced in all 24 of its readings. Each label reading is now judged with its own consonant test and the vowel test; the outcomes are the same as before. The nulls (0.336 to 0.412 for consonants, 0.343 to 0.430 for vowels) are near the paper's 0.32 and 0.37.

fig4c-d-hierarchy¶

Hierarchical clustering of the state-space puts the major oral articulator at the top tier for consonants; for vowels the first split is lip rounding (/u/ against /a/ and /i/).

In [22]:
hc = []
for base, z, pj, cs in SS_READINGS:
    for s in B.SUBJECTS:
        K = KS[s, base, z, pj, cs]
        cons_cut = fcluster(linkage(K[:, :, tc], "ward"), 3, "maxclust")
        vow_cut = fcluster(linkage(K[:, :, tv], "ward"), 2, "maxclust")
        row = {"baseline": base, "z-scoring": z, "projection": pj, "CVs": cs, "subject": s}
        for lr in ("a", "b"):
            labs = np.array([B.MAJOR[lr].get(c, "") for c, v in CVS[s, cs]])
            lab = labs != ""
            maj = {k: pd.Series(labs[lab & (cons_cut == k)]).mode().tolist() for k in (1, 2, 3)}
            distinct = all(len(v) == 1 for v in maj.values()) and len({v[0] for v in maj.values()}) == 3
            home = {a: pd.Series(cons_cut[lab & (labs == a)]).mode()[0] for a in ("labial", "coronal", "dorsal")}
            purity = np.mean([cons_cut[i] == home[labs[i]] for i in np.where(lab)[0]])
            row[f"cons ({lr}) majorities"] = "/".join(v[0] if len(v) == 1 else "tie" for v in maj.values())
            row[f"cons ({lr}) in home"] = round(purity, 2)
            row[f"cons ({lr}) holds"] = bool(distinct and purity >= 2 / 3)
            row[f"cons ({lr}) co-clust"] = round(np.median(B.co_clustering(cons_cut[lab], labs[lab])), 2)
        vow = np.array([v for c, v in CVS[s, cs]])
        ok = any((vow_cut[vow == "u"] == ku).mean() > 0.5 and (vow_cut[vow != "u"] == 3 - ku).mean() > 0.5 for ku in (1, 2))
        row["a/i/u in cluster 1"] = "/".join(f"{(vow_cut[vow == v] == 1).mean():.2f}" for v in "aiu")
        row["vowel holds"] = bool(ok)
        hc.append(row)
hc = pd.DataFrame(hc)
print(hc.to_string(index=False))
oc = []
for (base, z, pj, cs), g in hc.groupby(["baseline", "z-scoring", "projection", "CVs"]):
    for lr in ("a", "b"):
        both = g[f"cons ({lr}) holds"] & g["vowel holds"]
        oc.append({"baseline": base, "z-scoring": z, "projection": pj, "CVs": cs, "labels": lr, "subjects with both": int(both.sum()),
                   "outcome": "reproduced" if both.all() else ("partially" if both.any() else "not reproduced")})
oc = pd.DataFrame(oc)
print(oc.to_string(index=False))
print("Outcome over readings:", overall(oc.outcome))
by_factor(oc, ["baseline", "z-scoring", "projection", "CVs", "labels"])
baseline z-scoring projection CVs subject     cons (a) majorities  cons (a) in home  cons (a) holds  cons (a) co-clust     cons (b) majorities  cons (b) in home  cons (b) holds  cons (b) co-clust a/i/u in cluster 1  vowel holds
     pre       row          i all     EC2   coronal/labial/dorsal              0.98            True               0.98   coronal/labial/dorsal              0.93            True               0.92     0.74/0.58/0.11         True
     pre       row          i all    GP31  labial/coronal/coronal              0.91           False               0.80  labial/coronal/coronal              0.90           False               0.77     0.94/0.95/1.00        False
     pre       row          i all    GP33  coronal/coronal/labial              0.64           False               0.70  coronal/coronal/labial              0.63           False               0.67     0.53/0.84/0.26         True
     pre       row          i 15+     EC2  labial/coronal/coronal              0.80           False               0.63  labial/coronal/coronal              0.81           False               0.61     0.58/0.56/0.11         True
     pre       row          i 15+    GP31  labial/coronal/coronal              0.71           False               0.70  labial/coronal/coronal              0.73           False               0.71     0.94/1.00/1.00        False
     pre       row          i 15+    GP33  coronal/coronal/labial              0.64           False               0.70  coronal/coronal/labial              0.63           False               0.67     0.53/0.84/0.26         True
     pre       row         ii all     EC2   coronal/dorsal/labial              1.00            True               1.00   coronal/dorsal/labial              0.94            True               0.94     0.00/0.00/0.84         True
     pre       row         ii all    GP31  coronal/labial/coronal              0.91           False               0.80  coronal/labial/coronal              0.92           False               0.78     1.00/0.95/1.00        False
     pre       row         ii all    GP33   coronal/labial/labial              0.76           False               0.77   coronal/labial/labial              0.72           False               0.73     0.11/0.95/0.05         True
     pre       row         ii 15+     EC2   coronal/dorsal/labial              1.00            True               1.00   coronal/dorsal/labial              0.94            True               0.94     0.00/0.00/0.84         True
     pre       row         ii 15+    GP31  labial/coronal/coronal              0.76           False               0.74   labial/dorsal/coronal              0.75            True               0.72     0.94/1.00/1.00        False
     pre       row         ii 15+    GP33   coronal/labial/labial              0.76           False               0.77   coronal/labial/labial              0.72           False               0.73     0.11/0.95/0.05         True
     pre      time          i all     EC2  coronal/labial/coronal              0.73           False               0.67  coronal/labial/coronal              0.74           False               0.67     0.00/0.00/0.89         True
     pre      time          i all    GP31  labial/coronal/coronal              0.88           False               0.78  labial/coronal/coronal              0.88           False               0.75     0.94/0.95/1.00        False
     pre      time          i all    GP33 coronal/coronal/coronal              0.56           False               0.32 coronal/coronal/coronal              0.57           False               0.31     0.21/0.16/0.32        False
     pre      time          i 15+     EC2  coronal/labial/coronal              0.73           False               0.65  coronal/labial/coronal              0.74           False               0.65     0.00/0.00/0.84         True
     pre      time          i 15+    GP31  labial/coronal/coronal              0.69           False               0.67   labial/dorsal/coronal              0.69            True               0.65     0.94/1.00/1.00        False
     pre      time          i 15+    GP33 coronal/coronal/coronal              0.56           False               0.32 coronal/coronal/coronal              0.57           False               0.31     0.21/0.16/0.32        False
     pre      time         ii all     EC2   coronal/dorsal/labial              1.00            True               1.00   coronal/dorsal/labial              0.94            True               0.94     1.00/0.00/0.00        False
     pre      time         ii all    GP31  coronal/labial/coronal              0.91           False               0.80  coronal/labial/coronal              0.88           False               0.75     1.00/0.95/1.00        False
     pre      time         ii all    GP33  labial/coronal/coronal              0.80           False               0.77  labial/coronal/coronal              0.80           False               0.71     0.16/0.00/0.37        False
     pre      time         ii 15+     EC2   coronal/dorsal/labial              1.00            True               1.00   coronal/dorsal/labial              0.94            True               0.94     1.00/0.00/0.00         True
     pre      time         ii 15+    GP31      labial/tie/coronal              0.79           False               0.77   labial/dorsal/coronal              0.76            True               0.75     0.94/1.00/1.00        False
     pre      time         ii 15+    GP33  labial/coronal/coronal              0.80           False               0.77  labial/coronal/coronal              0.80           False               0.71     0.16/0.00/0.37        False
   whole       row          i all     EC2   coronal/labial/dorsal              0.98            True               0.98   coronal/labial/dorsal              0.93            True               0.92     0.84/0.79/0.21         True
   whole       row          i all    GP31  labial/coronal/coronal              0.91           False               0.80  labial/coronal/coronal              0.90           False               0.77     1.00/0.95/1.00        False
   whole       row          i all    GP33  labial/coronal/coronal              0.60           False               0.56  labial/coronal/coronal              0.61           False               0.55     0.05/0.00/0.05        False
   whole       row          i 15+     EC2  labial/coronal/coronal              0.80           False               0.63  labial/coronal/coronal              0.81           False               0.61     0.58/0.44/0.11         True
   whole       row          i 15+    GP31  labial/coronal/coronal              0.67           False               0.59  labial/coronal/coronal              0.63           False               0.52     0.94/1.00/1.00        False
   whole       row          i 15+    GP33  labial/coronal/coronal              0.60           False               0.56  labial/coronal/coronal              0.61           False               0.55     0.05/0.00/0.05        False
   whole       row         ii all     EC2   coronal/labial/dorsal              0.98            True               0.98   coronal/labial/dorsal              0.93            True               0.92     0.00/0.00/1.00         True
   whole       row         ii all    GP31  labial/coronal/coronal              0.91           False               0.80  labial/coronal/coronal              0.87           False               0.74     1.00/0.95/1.00        False
   whole       row         ii all    GP33   coronal/labial/labial              0.73           False               0.73   coronal/labial/labial              0.67           False               0.62     0.11/0.00/0.11        False
   whole       row         ii 15+     EC2   coronal/dorsal/labial              1.00            True               1.00   coronal/dorsal/labial              0.94            True               0.94     0.00/0.00/1.00         True
   whole       row         ii 15+    GP31  labial/coronal/coronal              0.76           False               0.67  labial/coronal/coronal              0.71           False               0.58     0.94/1.00/1.00        False
   whole       row         ii 15+    GP33   coronal/labial/labial              0.73           False               0.73   coronal/labial/labial              0.67           False               0.62     0.11/0.00/0.11        False
   whole      time          i all     EC2  coronal/labial/coronal              0.73           False               0.67  coronal/labial/coronal              0.74           False               0.67     0.00/0.00/0.42        False
   whole      time          i all    GP31  labial/coronal/coronal              0.93           False               0.82  labial/coronal/coronal              0.90           False               0.77     1.00/0.95/1.00        False
   whole      time          i all    GP33 coronal/coronal/coronal              0.53           False               0.32 coronal/coronal/coronal              0.56           False               0.30     0.11/0.00/0.05        False
   whole      time          i 15+     EC2  coronal/labial/coronal              0.73           False               0.65  coronal/labial/coronal              0.74           False               0.65     0.00/0.00/0.84         True
   whole      time          i 15+    GP31  coronal/labial/coronal              0.60           False               0.51  coronal/labial/coronal              0.59           False               0.51     0.94/1.00/1.00        False
   whole      time          i 15+    GP33 coronal/coronal/coronal              0.53           False               0.32 coronal/coronal/coronal              0.56           False               0.30     0.11/0.00/0.05        False
   whole      time         ii all     EC2   coronal/labial/dorsal              1.00            True               1.00   coronal/labial/dorsal              0.96            True               0.96     1.00/0.00/0.00        False
   whole      time         ii all    GP31  labial/coronal/coronal              0.91           False               0.80  labial/coronal/coronal              0.88           False               0.75     1.00/0.95/1.00        False
   whole      time         ii all    GP33   coronal/labial/labial              0.73           False               0.72   coronal/labial/labial              0.70           False               0.69     0.16/0.00/0.63         True
   whole      time         ii 15+     EC2   coronal/dorsal/labial              1.00            True               1.00   coronal/dorsal/labial              0.94            True               0.94     1.00/0.00/0.00         True
   whole      time         ii 15+    GP31  labial/coronal/coronal              0.76           False               0.74   labial/dorsal/coronal              0.75            True               0.72     0.94/1.00/1.00        False
   whole      time         ii 15+    GP33   coronal/labial/labial              0.73           False               0.72   coronal/labial/labial              0.70           False               0.69     0.16/0.00/0.63         True
    rest       row          i all     EC2   coronal/labial/dorsal              0.98            True               0.98   coronal/labial/dorsal              0.93            True               0.92     0.74/0.53/0.05         True
    rest       row          i all    GP31  coronal/labial/coronal              0.86           False               0.71  coronal/labial/coronal              0.88           False               0.71     1.00/0.95/1.00        False
    rest       row          i all    GP33  labial/coronal/coronal              0.71           False               0.73  labial/coronal/coronal              0.70           False               0.65     0.89/1.00/0.89        False
    rest       row          i 15+     EC2   coronal/labial/dorsal              0.95            True               0.95   coronal/labial/dorsal              0.91            True               0.89     0.74/0.56/0.05         True
    rest       row          i 15+    GP31      coronal/tie/labial              0.86           False               0.73      coronal/tie/labial              0.88           False               0.72     1.00/0.94/1.00        False
    rest       row          i 15+    GP33  labial/coronal/coronal              0.71           False               0.73  labial/coronal/coronal              0.70           False               0.65     0.89/1.00/0.89        False
    rest       row         ii all     EC2   coronal/labial/dorsal              1.00            True               1.00   coronal/labial/dorsal              0.93            True               0.91     1.00/0.05/0.00         True
    rest       row         ii all    GP31      tie/coronal/labial              0.84           False               0.71      tie/coronal/labial              0.87           False               0.71     1.00/0.95/1.00        False
    rest       row         ii all    GP33  labial/coronal/coronal              0.80           False               0.82  labial/coronal/coronal              0.78           False               0.72     0.11/0.00/0.11        False
    rest       row         ii 15+     EC2   coronal/labial/dorsal              0.98            True               0.98   coronal/labial/dorsal              0.91            True               0.91     1.00/0.00/0.00         True
    rest       row         ii 15+    GP31      tie/coronal/labial              0.86           False               0.73      tie/coronal/labial              0.88           False               0.72     1.00/0.94/1.00        False
    rest       row         ii 15+    GP33  labial/coronal/coronal              0.80           False               0.82  labial/coronal/coronal              0.78           False               0.72     0.11/0.00/0.11        False
    rest      time          i all     EC2  coronal/labial/coronal              0.73           False               0.67  coronal/labial/coronal              0.74           False               0.67     1.00/0.53/0.16         True
    rest      time          i all    GP31     tie/coronal/coronal              0.93           False               0.49     tie/coronal/coronal              0.94           False               0.49     1.00/0.95/1.00        False
    rest      time          i all    GP33      labial/tie/coronal              0.78           False               0.38      labial/tie/coronal              0.78           False               0.38     0.89/1.00/0.89        False
    rest      time          i 15+     EC2  coronal/labial/coronal              0.73           False               0.67  coronal/labial/coronal              0.75           False               0.61     0.00/0.44/0.79         True
    rest      time          i 15+    GP31      tie/coronal/labial              0.86           False               0.73      tie/coronal/labial              0.88           False               0.72     0.17/0.11/0.11        False
    rest      time          i 15+    GP33      labial/tie/coronal              0.78           False               0.38      labial/tie/coronal              0.78           False               0.38     0.89/1.00/0.89        False
    rest      time         ii all     EC2   coronal/labial/dorsal              0.98            True               0.98   coronal/labial/dorsal              0.93            True               0.92     1.00/0.05/0.00         True
    rest      time         ii all    GP31      tie/coronal/labial              0.84           False               0.71      tie/coronal/labial              0.87           False               0.71     1.00/0.95/1.00        False
    rest      time         ii all    GP33  labial/coronal/coronal              0.78           False               0.81  labial/coronal/coronal              0.74           False               0.71     0.11/0.00/0.11        False
    rest      time         ii 15+     EC2   coronal/labial/dorsal              1.00            True               1.00   coronal/labial/dorsal              0.94            True               0.94     1.00/0.00/0.00         True
    rest      time         ii 15+    GP31      tie/coronal/labial              0.86           False               0.73      tie/coronal/labial              0.88           False               0.72     1.00/0.94/1.00        False
    rest      time         ii 15+    GP33  labial/coronal/coronal              0.78           False               0.81  labial/coronal/coronal              0.74           False               0.71     0.11/0.00/0.11        False
baseline z-scoring projection CVs labels  subjects with both        outcome
     pre       row          i 15+      a                   0 not reproduced
     pre       row          i 15+      b                   0 not reproduced
     pre       row          i all      a                   1      partially
     pre       row          i all      b                   1      partially
     pre       row         ii 15+      a                   1      partially
     pre       row         ii 15+      b                   1      partially
     pre       row         ii all      a                   1      partially
     pre       row         ii all      b                   1      partially
     pre      time          i 15+      a                   0 not reproduced
     pre      time          i 15+      b                   0 not reproduced
     pre      time          i all      a                   0 not reproduced
     pre      time          i all      b                   0 not reproduced
     pre      time         ii 15+      a                   1      partially
     pre      time         ii 15+      b                   1      partially
     pre      time         ii all      a                   0 not reproduced
     pre      time         ii all      b                   0 not reproduced
    rest       row          i 15+      a                   1      partially
    rest       row          i 15+      b                   1      partially
    rest       row          i all      a                   1      partially
    rest       row          i all      b                   1      partially
    rest       row         ii 15+      a                   1      partially
    rest       row         ii 15+      b                   1      partially
    rest       row         ii all      a                   1      partially
    rest       row         ii all      b                   1      partially
    rest      time          i 15+      a                   0 not reproduced
    rest      time          i 15+      b                   0 not reproduced
    rest      time          i all      a                   0 not reproduced
    rest      time          i all      b                   0 not reproduced
    rest      time         ii 15+      a                   1      partially
    rest      time         ii 15+      b                   1      partially
    rest      time         ii all      a                   1      partially
    rest      time         ii all      b                   1      partially
   whole       row          i 15+      a                   0 not reproduced
   whole       row          i 15+      b                   0 not reproduced
   whole       row          i all      a                   1      partially
   whole       row          i all      b                   1      partially
   whole       row         ii 15+      a                   1      partially
   whole       row         ii 15+      b                   1      partially
   whole       row         ii all      a                   1      partially
   whole       row         ii all      b                   1      partially
   whole      time          i 15+      a                   0 not reproduced
   whole      time          i 15+      b                   0 not reproduced
   whole      time          i all      a                   0 not reproduced
   whole      time          i all      b                   0 not reproduced
   whole      time         ii 15+      a                   1      partially
   whole      time         ii 15+      b                   1      partially
   whole      time         ii all      a                   0 not reproduced
   whole      time         ii all      b                   0 not reproduced
Outcome over readings: differ by reading: not reproduced 20, partially 28
Outcome counts by reading factor (48 readings):
  baseline: {'pre': {'not reproduced': 8, 'partially': 8}, 'rest': {'partially': 12, 'not reproduced': 4}, 'whole': {'not reproduced': 8, 'partially': 8}}
  z-scoring: {'row': {'partially': 20, 'not reproduced': 4}, 'time': {'not reproduced': 16, 'partially': 8}}
  projection: {'i': {'not reproduced': 16, 'partially': 8}, 'ii': {'partially': 20, 'not reproduced': 4}}
  CVs: {'15+': {'partially': 14, 'not reproduced': 10}, 'all': {'partially': 14, 'not reproduced': 10}}
  labels: {'a': {'partially': 14, 'not reproduced': 10}, 'b': {'partially': 14, 'not reproduced': 10}}

Result: blocked (methods_underspecified). Both splits hold together in at most one subject, EC2 (14 of the 24 readings), so no reading gives reproduced; 28 of the 48 readings (with the two label readings) give partially reproduced and 20 not reproduced. Under time z-scoring with projection (i) no subject meets both. The vowel split (/u/ against /a/ and /i/) never holds in GP31. By reading factor, projection (ii) gives partially reproduced in 20 of 24 readings and projection (i) in 8 of 24; the CV set and the label reading do not change the counts (14 of 24 each).

fig4ef-feature-correlations¶

Over early times (-375 to 120 ms) constriction location correlates with the state-space structure more than constriction degree, which correlates more than the upcoming vowel; over later times (125 to 620 ms) vowel configuration correlates most.

In [23]:
FEATS = ("location", "degree", "vowel")


def feature_r(base, z, pj, cs, metric="euclidean"):
    """R(t) per subject and feature set (Methods Eq. 7): {(subject, set): R over epoch times}."""
    out = {}
    for s in B.SUBJECTS:
        K = KS[s, base, z, pj, cs]
        dK = np.array([pdist(K[:, :, t]) for t in range(K.shape[2])])
        for f in FEATS:
            dP = pdist(B.feature_matrix(CVS[s, cs], f), metric)
            out[s, f] = np.array([np.corrcoef(d, dP)[0, 1] for d in dK])
    return out


early = (B.EPOCH_MS >= -375) & (B.EPOCH_MS < 120)
late = (B.EPOCH_MS >= 125) & (B.EPOCH_MS < 620)
RT = {k: feature_r(*k) for k in SS_READINGS}
fe = []
for (base, z, pj, cs), R in RT.items():
    for metric in ("euclidean", "hamming"):
        Rm = R if metric == "euclidean" else feature_r(base, z, pj, cs, "hamming")
        e = {f: np.concatenate([Rm[s, f][early] for s in B.SUBJECTS]) for f in FEATS}
        l = {f: np.concatenate([Rm[s, f][late] for s in B.SUBJECTS]) for f in FEATS}
        tests = {"early loc>deg": (e["location"], e["degree"]), "early deg>vow": (e["degree"], e["vowel"]),
                 "late vow>loc": (l["vowel"], l["location"]), "late vow>deg": (l["vowel"], l["degree"])}
        row = {"baseline": base, "z-scoring": z, "projection": pj, "CVs": cs, "distance": metric, "n": len(e["location"])}
        n_ok = 0
        for name, (a, b) in tests.items():
            p = stats.wilcoxon(a, b).pvalue
            ok = bool(np.median(a - b) > 0 and p < 1e-10)
            row[name] = f"{np.median(a - b):+.3f} p={p:.0e} {'Y' if ok else 'n'}"
            n_ok += ok
        row["med early L/D/V"] = "/".join(f"{np.median(e[f]):.2f}" for f in FEATS)
        row["med late L/D/V"] = "/".join(f"{np.median(l[f]):.2f}" for f in FEATS)
        row["outcome"] = "reproduced" if n_ok == 4 else ("partially" if n_ok else "not reproduced")
        fe.append(row)
fe = pd.DataFrame(fe)
print(fe.to_string(index=False))
print("Outcome over readings (Euclidean; Hamming is a variant):", overall(fe[fe.distance == "euclidean"].outcome))
by_factor(fe[fe.distance == "euclidean"], ["baseline", "z-scoring", "projection", "CVs"])
baseline z-scoring projection CVs  distance   n    early loc>deg    early deg>vow     late vow>loc     late vow>deg med early L/D/V  med late L/D/V    outcome
     pre       row          i all euclidean 297 +0.100 p=1e-32 Y +0.047 p=2e-41 Y -0.039 p=1e-02 n +0.011 p=8e-03 n  0.13/0.06/0.00  0.05/0.07/0.03  partially
     pre       row          i all   hamming 297 +0.083 p=3e-24 Y +0.043 p=4e-38 Y -0.031 p=1e-01 n -0.007 p=9e-03 n 0.10/0.04/-0.00  0.04/0.08/0.02  partially
     pre       row          i 15+ euclidean 297 +0.083 p=5e-16 Y +0.061 p=3e-46 Y +0.080 p=4e-20 Y +0.020 p=1e-06 n  0.14/0.08/0.01  0.02/0.09/0.08  partially
     pre       row          i 15+   hamming 297 +0.059 p=2e-07 n +0.057 p=3e-41 Y +0.066 p=8e-15 Y +0.012 p=2e-01 n  0.11/0.07/0.00  0.02/0.09/0.08  partially
     pre       row         ii all euclidean 297 +0.141 p=3e-43 Y +0.045 p=4e-36 Y -0.027 p=2e-07 n +0.026 p=6e-20 Y  0.18/0.06/0.00  0.05/0.07/0.06  partially
     pre       row         ii all   hamming 297 +0.113 p=2e-40 Y +0.044 p=4e-31 Y -0.025 p=2e-06 n +0.006 p=2e-05 n 0.14/0.04/-0.00  0.04/0.07/0.04  partially
     pre       row         ii 15+ euclidean 297 +0.145 p=6e-40 Y +0.063 p=7e-40 Y +0.147 p=3e-33 Y +0.082 p=7e-31 Y  0.21/0.07/0.00  0.02/0.08/0.14 reproduced
     pre       row         ii 15+   hamming 297 +0.110 p=1e-35 Y +0.055 p=1e-32 Y +0.136 p=7e-29 Y +0.070 p=1e-17 Y  0.16/0.06/0.00  0.02/0.08/0.13 reproduced
     pre      time          i all euclidean 297 +0.097 p=6e-36 Y +0.043 p=3e-41 Y -0.029 p=9e-07 n +0.020 p=1e-12 Y  0.12/0.06/0.01  0.05/0.07/0.05  partially
     pre      time          i all   hamming 297 +0.073 p=2e-28 Y +0.043 p=1e-37 Y -0.027 p=1e-05 n +0.003 p=1e-03 n 0.10/0.04/-0.00  0.04/0.08/0.04  partially
     pre      time          i 15+ euclidean 297 +0.052 p=8e-16 Y +0.069 p=5e-45 Y +0.114 p=2e-29 Y +0.052 p=5e-21 Y  0.13/0.09/0.01  0.02/0.09/0.11 reproduced
     pre      time          i 15+   hamming 297 +0.029 p=2e-08 n +0.057 p=7e-40 Y +0.101 p=1e-23 Y +0.045 p=2e-10 n  0.11/0.08/0.01  0.02/0.09/0.10  partially
     pre      time         ii all euclidean 297 +0.147 p=8e-44 Y +0.043 p=1e-34 Y -0.023 p=1e-07 n +0.027 p=3e-24 Y  0.18/0.06/0.00  0.05/0.06/0.06  partially
     pre      time         ii all   hamming 297 +0.117 p=2e-41 Y +0.044 p=5e-29 Y -0.020 p=8e-07 n +0.006 p=7e-07 n 0.14/0.04/-0.00  0.04/0.06/0.05  partially
     pre      time         ii 15+ euclidean 297 +0.151 p=2e-40 Y +0.063 p=1e-37 Y +0.144 p=1e-32 Y +0.084 p=2e-32 Y  0.22/0.08/0.00  0.02/0.07/0.14 reproduced
     pre      time         ii 15+   hamming 297 +0.117 p=6e-37 Y +0.052 p=4e-30 Y +0.136 p=2e-28 Y +0.070 p=2e-18 Y  0.17/0.07/0.00  0.02/0.08/0.13 reproduced
   whole       row          i all euclidean 297 +0.101 p=1e-32 Y +0.044 p=2e-40 Y -0.043 p=1e-02 n +0.013 p=9e-03 n  0.13/0.05/0.00  0.05/0.07/0.03  partially
   whole       row          i all   hamming 297 +0.082 p=4e-24 Y +0.043 p=5e-37 Y -0.036 p=1e-01 n -0.004 p=9e-03 n 0.10/0.03/-0.00  0.04/0.08/0.02  partially
   whole       row          i 15+ euclidean 297 +0.075 p=8e-15 Y +0.063 p=1e-45 Y +0.083 p=9e-21 Y +0.027 p=6e-07 n  0.15/0.08/0.01  0.02/0.09/0.08  partially
   whole       row          i 15+   hamming 297 +0.051 p=2e-07 n +0.057 p=3e-40 Y +0.066 p=1e-15 Y +0.019 p=1e-01 n  0.11/0.07/0.00  0.02/0.09/0.08  partially
   whole       row         ii all euclidean 297 +0.135 p=2e-44 Y +0.043 p=6e-35 Y -0.030 p=3e-07 n +0.027 p=9e-21 Y  0.17/0.06/0.00  0.05/0.06/0.05  partially
   whole       row         ii all   hamming 297 +0.105 p=6e-42 Y +0.040 p=2e-29 Y -0.028 p=4e-06 n +0.007 p=5e-06 n 0.13/0.04/-0.00  0.04/0.07/0.04  partially
   whole       row         ii 15+ euclidean 297 +0.146 p=7e-41 Y +0.065 p=6e-40 Y +0.146 p=4e-33 Y +0.089 p=5e-33 Y  0.21/0.08/0.00  0.02/0.07/0.14 reproduced
   whole       row         ii 15+   hamming 297 +0.114 p=9e-38 Y +0.047 p=2e-31 Y +0.136 p=1e-28 Y +0.082 p=7e-21 Y  0.16/0.07/0.00  0.02/0.07/0.14 reproduced
   whole      time          i all euclidean 297 +0.096 p=4e-36 Y +0.042 p=3e-40 Y -0.029 p=2e-06 n +0.023 p=2e-13 Y  0.12/0.06/0.00  0.05/0.07/0.05  partially
   whole      time          i all   hamming 297 +0.076 p=2e-29 Y +0.039 p=2e-36 Y -0.028 p=2e-05 n +0.005 p=2e-04 n 0.10/0.04/-0.00  0.04/0.08/0.04  partially
   whole      time          i 15+ euclidean 297 +0.060 p=3e-14 Y +0.067 p=1e-44 Y +0.120 p=2e-29 Y +0.063 p=2e-23 Y  0.13/0.10/0.01  0.02/0.09/0.11 reproduced
   whole      time          i 15+   hamming 297 +0.034 p=6e-08 n +0.053 p=4e-39 Y +0.110 p=7e-24 Y +0.054 p=4e-12 Y  0.11/0.08/0.01  0.02/0.09/0.11  partially
   whole      time         ii all euclidean 297 +0.137 p=8e-45 Y +0.040 p=3e-32 Y -0.030 p=2e-07 n +0.027 p=6e-25 Y  0.17/0.06/0.00  0.05/0.06/0.06  partially
   whole      time         ii all   hamming 297 +0.109 p=7e-43 Y +0.039 p=1e-26 Y -0.026 p=2e-06 n +0.007 p=1e-07 n 0.13/0.04/-0.00  0.04/0.06/0.05  partially
   whole      time         ii 15+ euclidean 297 +0.145 p=3e-41 Y +0.067 p=3e-37 Y +0.147 p=9e-33 Y +0.085 p=4e-35 Y  0.22/0.08/0.00  0.02/0.07/0.14 reproduced
   whole      time         ii 15+   hamming 297 +0.116 p=5e-39 Y +0.045 p=3e-28 Y +0.138 p=4e-28 Y +0.074 p=9e-22 Y  0.17/0.07/0.00  0.02/0.07/0.13 reproduced
    rest       row          i all euclidean 297 +0.066 p=2e-19 Y +0.047 p=7e-35 Y +0.022 p=8e-05 n +0.021 p=3e-02 n  0.10/0.06/0.01  0.02/0.07/0.02  partially
    rest       row          i all   hamming 297 +0.039 p=2e-10 n +0.040 p=1e-30 Y +0.017 p=5e-04 n -0.000 p=2e-02 n 0.07/0.05/-0.00  0.02/0.08/0.02  partially
    rest       row          i 15+ euclidean 297 +0.032 p=3e-05 n +0.053 p=1e-38 Y +0.075 p=5e-18 Y +0.028 p=1e-03 n  0.09/0.07/0.01  0.01/0.08/0.04  partially
    rest       row          i 15+   hamming 297 +0.011 p=9e-02 n +0.049 p=4e-31 Y +0.078 p=3e-15 Y +0.018 p=9e-01 n  0.07/0.06/0.00 -0.00/0.09/0.04  partially
    rest       row         ii all euclidean 297 +0.111 p=2e-33 Y +0.036 p=3e-23 Y +0.043 p=1e-13 Y +0.035 p=7e-22 Y  0.13/0.05/0.00  0.02/0.06/0.05 reproduced
    rest       row         ii all   hamming 297 +0.091 p=5e-26 Y +0.029 p=3e-17 Y +0.037 p=2e-12 Y +0.018 p=3e-06 n 0.10/0.04/-0.00  0.02/0.06/0.04  partially
    rest       row         ii 15+ euclidean 297 +0.109 p=4e-23 Y +0.038 p=6e-24 Y +0.111 p=9e-32 Y +0.045 p=3e-25 Y  0.13/0.06/0.00  0.01/0.07/0.05 reproduced
    rest       row         ii 15+   hamming 297 +0.073 p=1e-16 Y +0.027 p=4e-15 Y +0.109 p=3e-27 Y +0.036 p=5e-11 Y  0.10/0.04/0.00  0.01/0.06/0.05 reproduced
    rest      time          i all euclidean 297 +0.054 p=6e-23 Y +0.045 p=2e-36 Y +0.027 p=2e-10 n +0.034 p=3e-16 Y  0.10/0.06/0.01  0.03/0.07/0.04  partially
    rest      time          i all   hamming 297 +0.037 p=1e-13 Y +0.040 p=1e-31 Y +0.020 p=1e-09 n +0.018 p=1e-05 n  0.08/0.05/0.00  0.02/0.07/0.04  partially
    rest      time          i 15+ euclidean 297 +0.003 p=3e-04 n +0.056 p=4e-39 Y +0.107 p=9e-29 Y +0.059 p=4e-22 Y  0.10/0.07/0.01  0.01/0.09/0.06  partially
    rest      time          i 15+   hamming 297 -0.009 p=5e-02 n +0.045 p=5e-32 Y +0.103 p=8e-24 Y +0.049 p=8e-10 n  0.08/0.07/0.01  0.00/0.09/0.06  partially
    rest      time         ii all euclidean 297 +0.118 p=1e-34 Y +0.043 p=2e-21 Y +0.042 p=8e-15 Y +0.037 p=2e-26 Y  0.14/0.06/0.00  0.02/0.05/0.05 reproduced
    rest      time         ii all   hamming 297 +0.097 p=5e-28 Y +0.034 p=3e-15 Y +0.035 p=1e-13 Y +0.018 p=8e-09 n 0.10/0.05/-0.00  0.01/0.06/0.04  partially
    rest      time         ii 15+ euclidean 297 +0.114 p=3e-24 Y +0.044 p=2e-22 Y +0.112 p=1e-31 Y +0.050 p=2e-29 Y  0.14/0.06/0.00  0.00/0.06/0.05 reproduced
    rest      time         ii 15+   hamming 297 +0.082 p=8e-19 Y +0.033 p=1e-13 Y +0.109 p=2e-27 Y +0.038 p=6e-13 Y  0.10/0.05/0.00  0.00/0.06/0.04 reproduced
Outcome over readings (Euclidean; Hamming is a variant): differ by reading: partially 14, reproduced 10
Outcome counts by reading factor (24 readings):
  baseline: {'pre': {'partially': 5, 'reproduced': 3}, 'whole': {'partially': 5, 'reproduced': 3}, 'rest': {'partially': 4, 'reproduced': 4}}
  z-scoring: {'row': {'partially': 8, 'reproduced': 4}, 'time': {'partially': 6, 'reproduced': 6}}
  projection: {'i': {'partially': 10, 'reproduced': 2}, 'ii': {'reproduced': 8, 'partially': 4}}
  CVs: {'all': {'partially': 10, 'reproduced': 2}, '15+': {'reproduced': 8, 'partially': 4}}

Result: blocked (methods_underspecified). In the early window, constriction location correlates with the state-space distances more than constriction degree, and degree more than the vowel, with p < 1e-10 under every reading with Euclidean distances except two (rest, projection (i), 15+ CVs, where location over degree has p = 3e-05 and 3e-04). In the late window the vowel features correlate more than both other sets with p < 1e-10 in 10 of the 24 readings (reproduced): every 15+ reading with projection (ii), pre and whole with time, projection (i) and 15+ CVs, and rest with projection (ii) and every CV. In the other 14 the late comparisons fail in part (partially reproduced), mostly with every CV, where location correlates as much as or more than the vowel features. By reading factor, projection (ii) gives 8 of the 10 reproduced readings and the 15+ CVs 8 of 10. Hamming distances, a variant, are in the table and are not judged.

fig5c-separability-timing¶

Cluster separability, averaged over subjects, rises from about -300 ms and peaks about 200 ms before the C-V transition for consonants, and rises from about 50 ms and peaks at +250 ms for vowels.

In [24]:
rng5 = np.random.default_rng(5)
N_BOOT = 1000


def cluster_labels(s, cs, K, which, kind):
    """Labels per CV (per time and CV for k-means); -1 for CVs without a label."""
    cvs = CVS[s, cs]
    if kind == "kmeans":
        return np.array([B.kmeans(K[:, :, t], 3, seed=1000 + t, n_init=10) for t in range(K.shape[2])])
    if which == "vowel":
        return np.array(["aiu".index(v) for c, v in cvs])
    lr = kind[-1]
    names = {"labial": 0, "coronal": 1, "dorsal": 2}
    out = []
    for c, v in cvs:
        m = B.MAJOR[lr].get(c)
        out.append(3 if kind.startswith("four") and c in B.SIBILANTS else (names[m] if m else -1))
    return np.array(out)


SEP_KINDS = {"consonant": ["groups a", "groups b", "four a", "four b", "kmeans"], "vowel": ["groups", "kmeans"]}


def separability_curves(base, z, pj, cs):
    out = {}
    kmeans_cache = {}
    for which, kinds in SEP_KINDS.items():
        for kind in kinds:
            curves, boots = [], []
            for s in B.SUBJECTS:
                K = KS[s, base, z, pj, cs]
                if kind == "kmeans":
                    if s not in kmeans_cache:
                        kmeans_cache[s] = cluster_labels(s, cs, K, which, kind)
                    lab = kmeans_cache[s]
                else:
                    lab = cluster_labels(s, cs, K, which, kind)
                keep = (lab >= 0) if lab.ndim == 1 else np.ones(K.shape[0], bool)
                Ks = K[keep]
                labk = lab[keep] if lab.ndim == 1 else lab[:, keep]
                D = np.array([squareform(pdist(Ks[:, :, t])) for t in range(Ks.shape[2])])
                curves.append(B.separability(D, labk)[0])
                wts = rng5.multinomial(len(Ks), np.ones(len(Ks)) / len(Ks), size=N_BOOT)
                boots.append(B.separability(D, labk, wts))
            out[which, kind] = (np.mean(curves, 0), np.mean(boots, 0).std(0), curves)
    return out


SEP = {k: separability_curves(*k) for k in SS_READINGS}


def onset_peak(curve, se):
    """Peak time, onset (a) first time above the level at -500 ms by 2 bootstrap s.e., onset (b)
    first time of the run up to the peak above half the peak value."""
    p = int(np.argmax(curve))
    above = np.where(curve[:p + 1] > curve[0] + 2 * se[:p + 1])[0]
    on_a = B.EPOCH_MS[above[0]] if len(above) else np.nan
    below = np.where(curve[:p + 1] < curve[p] / 2)[0]
    on_b = B.EPOCH_MS[below[-1] + 1] if len(below) else np.nan
    return B.EPOCH_MS[p], on_a, on_b


sp = []
for (base, z, pj, cs), d in SEP.items():
    for ck in SEP_KINDS["consonant"]:
        vk = "kmeans" if ck == "kmeans" else "groups"
        cpk, con_a, con_b = onset_peak(d["consonant", ck][0], d["consonant", ck][1])
        vpk, von_a, von_b = onset_peak(d["vowel", vk][0], d["vowel", vk][1])
        peaks_ok = abs(cpk + 200) <= 20 and abs(vpk - 250) <= 25
        ons_ok = {"a": abs(con_a + 300) <= 30 and abs(von_a - 50) <= 10, "b": abs(con_b + 300) <= 30 and abs(von_b - 50) <= 10}
        sp.append({"baseline": base, "z-scoring": z, "projection": pj, "CVs": cs, "clusters": f"{ck} | {vk}",
                   "cons peak": cpk, "cons onset a": con_a, "cons onset b": con_b,
                   "vowel peak": vpk, "vowel onset a": von_a, "vowel onset b": von_b,
                   "peaks ok": peaks_ok, "onset ok a": ons_ok["a"], "onset ok b": ons_ok["b"],
                   "outcome": "reproduced" if peaks_ok and any(ons_ok.values()) else ("partially" if peaks_ok else "not reproduced")})
sp = pd.DataFrame(sp)
print(sp.to_string(index=False))
print("Expected: consonant peak -200 +- 20, onset -300 +- 30; vowel peak 250 +- 25, onset 50 +- 10 ms")
print("Outcome over readings:", overall(sp.outcome))
by_factor(sp, ["baseline", "z-scoring", "projection", "CVs", "clusters"])
g = sp[~sp.clusters.str.startswith("kmeans")]
print("Phonetic-group readings: consonant peak", g["cons peak"].min(), "to", g["cons peak"].max(), "| vowel peak", g["vowel peak"].min(), "to", g["vowel peak"].max(),
      "| consonant onset (a)", g["cons onset a"].min(), "to", g["cons onset a"].max(), "| (b)", g["cons onset b"].min(), "to", g["cons onset b"].max(),
      "| vowel onset (a)", g["vowel onset a"].min(), "to", g["vowel onset a"].max(), "| (b)", g["vowel onset b"].min(), "to", g["vowel onset b"].max())
g = sp[sp.clusters.str.startswith("kmeans")]
print("k-means readings: peak of the single curve", g["cons peak"].min(), "to", g["cons peak"].max())
fig, axes = plt.subplots(1, 2, figsize=(11, 3))
for ax, key in zip(axes, [("pre", "row", "i", "all"), ("pre", "time", "i", "all")]):
    for (which, kind), (c, se, _) in SEP[key].items():
        if kind != "kmeans":
            ax.plot(B.EPOCH_MS, c, label=f"{which} {kind}")
    ax.axvline(0, color="k", lw=0.5); ax.set_title(", ".join(key)); ax.set_xlabel("ms")
axes[0].legend(fontsize=7); axes[0].set_ylabel("separability")
plt.show()
for key, d in SEP.items():
    print(key, "curve ranges:", {f"{w} {k}": (round(float(c.min()), 2), round(float(c.max()), 2)) for (w, k), (c, se, _) in d.items()})
baseline z-scoring projection CVs          clusters  cons peak  cons onset a  cons onset b  vowel peak  vowel onset a  vowel onset b  peaks ok  onset ok a  onset ok b        outcome
     pre       row          i all groups a | groups          5        -240.0        -185.0         200          105.0           95.0     False       False       False not reproduced
     pre       row          i all groups b | groups          5        -260.0        -195.0         200          105.0           95.0     False       False       False not reproduced
     pre       row          i all   four a | groups        -65        -260.0        -210.0         200          105.0           95.0     False       False       False not reproduced
     pre       row          i all   four b | groups        -65        -270.0        -230.0         200          105.0           95.0     False       False       False not reproduced
     pre       row          i all   kmeans | kmeans        290        -165.0         240.0         290         -165.0          240.0     False       False       False not reproduced
     pre       row          i 15+ groups a | groups          5        -260.0        -190.0         205           80.0           90.0     False       False       False not reproduced
     pre       row          i 15+ groups b | groups          5        -275.0        -200.0         205           80.0           90.0     False       False       False not reproduced
     pre       row          i 15+   four a | groups        -60        -270.0        -220.0         205           80.0           90.0     False       False       False not reproduced
     pre       row          i 15+   four b | groups        -60        -275.0        -235.0         205           80.0           90.0     False       False       False not reproduced
     pre       row          i 15+   kmeans | kmeans       -135        -375.0        -395.0        -135         -375.0         -395.0     False       False       False not reproduced
     pre       row         ii all groups a | groups        -60        -275.0        -195.0         200           75.0           95.0     False       False       False not reproduced
     pre       row         ii all groups b | groups        -60        -295.0        -205.0         200           75.0           95.0     False       False       False not reproduced
     pre       row         ii all   four a | groups        -70        -300.0        -220.0         200           75.0           95.0     False       False       False not reproduced
     pre       row         ii all   four b | groups        -70        -325.0        -235.0         200           75.0           95.0     False       False       False not reproduced
     pre       row         ii all   kmeans | kmeans        285        -280.0         240.0         285         -280.0          240.0     False       False       False not reproduced
     pre       row         ii 15+ groups a | groups        -60        -290.0        -200.0         205           65.0           95.0     False       False       False not reproduced
     pre       row         ii 15+ groups b | groups        -60        -320.0        -210.0         205           65.0           95.0     False       False       False not reproduced
     pre       row         ii 15+   four a | groups        -70        -330.0        -225.0         205           65.0           95.0     False       False       False not reproduced
     pre       row         ii 15+   four b | groups        -70        -365.0        -235.0         205           65.0           95.0     False       False       False not reproduced
     pre       row         ii 15+   kmeans | kmeans       -120        -375.0        -375.0        -120         -375.0         -375.0     False       False       False not reproduced
     pre      time          i all groups a | groups          5        -235.0        -230.0         225           75.0          100.0     False       False       False not reproduced
     pre      time          i all groups b | groups         10        -260.0        -255.0         225           75.0          100.0     False       False       False not reproduced
     pre      time          i all   four a | groups        -95        -270.0        -270.0         225           75.0          100.0     False       False       False not reproduced
     pre      time          i all   four b | groups       -145        -280.0        -275.0         225           75.0          100.0     False       False       False not reproduced
     pre      time          i all   kmeans | kmeans        310           NaN         240.0         310            NaN          240.0     False       False       False not reproduced
     pre      time          i 15+ groups a | groups          5        -255.0        -240.0         235           60.0          100.0     False       False       False not reproduced
     pre      time          i 15+ groups b | groups        -65        -280.0        -265.0         235           60.0          100.0     False        True       False not reproduced
     pre      time          i 15+   four a | groups        -90        -290.0        -280.0         235           60.0          100.0     False        True       False not reproduced
     pre      time          i 15+   four b | groups        -95        -295.0        -285.0         235           60.0          100.0     False        True       False not reproduced
     pre      time          i 15+   kmeans | kmeans        330         325.0           NaN         330          325.0            NaN     False       False       False not reproduced
     pre      time         ii all groups a | groups        -60        -280.0        -200.0         220           70.0           95.0     False       False       False not reproduced
     pre      time         ii all groups b | groups        -60        -300.0        -210.0         220           70.0           95.0     False       False       False not reproduced
     pre      time         ii all   four a | groups        -65        -305.0        -225.0         220           70.0           95.0     False       False       False not reproduced
     pre      time         ii all   four b | groups        -65        -325.0        -235.0         220           70.0           95.0     False       False       False not reproduced
     pre      time         ii all   kmeans | kmeans        290        -275.0         240.0         290         -275.0          240.0     False       False       False not reproduced
     pre      time         ii 15+ groups a | groups        -60        -300.0        -205.0         215           60.0           95.0     False        True       False not reproduced
     pre      time         ii 15+ groups b | groups        -60        -325.0        -215.0         215           60.0           95.0     False        True       False not reproduced
     pre      time         ii 15+   four a | groups        -70        -345.0        -225.0         215           60.0           95.0     False       False       False not reproduced
     pre      time         ii 15+   four b | groups        -70        -375.0        -240.0         215           60.0           95.0     False       False       False not reproduced
     pre      time         ii 15+   kmeans | kmeans       -120        -375.0        -375.0        -120         -375.0         -375.0     False       False       False not reproduced
   whole       row          i all groups a | groups          5        -230.0        -180.0         205          105.0           95.0     False       False       False not reproduced
   whole       row          i all groups b | groups          5        -255.0        -195.0         205          105.0           95.0     False       False       False not reproduced
   whole       row          i all   four a | groups        -70        -255.0        -210.0         205          105.0           95.0     False       False       False not reproduced
   whole       row          i all   four b | groups        -75        -265.0        -230.0         205          105.0           95.0     False       False       False not reproduced
   whole       row          i all   kmeans | kmeans        290         -50.0         245.0         290          -50.0          245.0     False       False       False not reproduced
   whole       row          i 15+ groups a | groups          5        -260.0        -190.0         205           80.0           90.0     False       False       False not reproduced
   whole       row          i 15+ groups b | groups          5        -275.0        -200.0         205           80.0           90.0     False       False       False not reproduced
   whole       row          i 15+   four a | groups        -70        -265.0        -220.0         205           80.0           90.0     False       False       False not reproduced
   whole       row          i 15+   four b | groups        -75        -275.0        -235.0         205           80.0           90.0     False       False       False not reproduced
   whole       row          i 15+   kmeans | kmeans         10        -365.0        -410.0          10         -365.0         -410.0     False       False       False not reproduced
   whole       row         ii all groups a | groups        -60        -270.0        -195.0         205           75.0           95.0     False       False       False not reproduced
   whole       row         ii all groups b | groups        -60        -285.0        -205.0         205           75.0           95.0     False       False       False not reproduced
   whole       row         ii all   four a | groups        -75        -290.0        -220.0         205           75.0           95.0     False       False       False not reproduced
   whole       row         ii all   four b | groups        -75        -310.0        -230.0         205           75.0           95.0     False       False       False not reproduced
   whole       row         ii all   kmeans | kmeans        300        -260.0         245.0         300         -260.0          245.0     False       False       False not reproduced
   whole       row         ii 15+ groups a | groups        -60        -285.0        -200.0         210           65.0           95.0     False       False       False not reproduced
   whole       row         ii 15+ groups b | groups        -65        -315.0        -210.0         210           65.0           95.0     False       False       False not reproduced
   whole       row         ii 15+   four a | groups        -75        -315.0        -220.0         210           65.0           95.0     False       False       False not reproduced
   whole       row         ii 15+   four b | groups        -75        -365.0        -230.0         210           65.0           95.0     False       False       False not reproduced
   whole       row         ii 15+   kmeans | kmeans         10        -375.0        -390.0          10         -365.0         -390.0     False       False       False not reproduced
   whole      time          i all groups a | groups          5        -225.0        -225.0         230           80.0          105.0     False       False       False not reproduced
   whole      time          i all groups b | groups         10        -260.0        -250.0         230           80.0          105.0     False       False       False not reproduced
   whole      time          i all   four a | groups        -90        -270.0        -270.0         230           80.0          105.0     False       False       False not reproduced
   whole      time          i all   four b | groups       -145        -280.0        -270.0         230           80.0          105.0     False       False       False not reproduced
   whole      time          i all   kmeans | kmeans        285           NaN         245.0         285            NaN          245.0     False       False       False not reproduced
   whole      time          i 15+ groups a | groups          5        -255.0        -235.0         235           60.0          100.0     False       False       False not reproduced
   whole      time          i 15+ groups b | groups          5        -280.0        -260.0         235           60.0          100.0     False        True       False not reproduced
   whole      time          i 15+   four a | groups        -90        -290.0        -275.0         235           60.0          100.0     False        True       False not reproduced
   whole      time          i 15+   four b | groups        -90        -305.0        -280.0         235           60.0          100.0     False        True       False not reproduced
   whole      time          i 15+   kmeans | kmeans        360        -365.0           NaN         360         -365.0            NaN     False       False       False not reproduced
   whole      time         ii all groups a | groups        -60        -275.0        -195.0         220           65.0           95.0     False       False       False not reproduced
   whole      time         ii all groups b | groups        -60        -290.0        -210.0         220           65.0           95.0     False       False       False not reproduced
   whole      time         ii all   four a | groups        -75        -295.0        -220.0         220           65.0           95.0     False       False       False not reproduced
   whole      time         ii all   four b | groups        -75        -310.0        -235.0         220           65.0           95.0     False       False       False not reproduced
   whole      time         ii all   kmeans | kmeans        300        -265.0         245.0         300         -265.0          245.0     False       False       False not reproduced
   whole      time         ii 15+ groups a | groups        -60        -290.0        -200.0         215           60.0           95.0     False        True       False not reproduced
   whole      time         ii 15+ groups b | groups        -65        -315.0        -215.0         215           60.0           95.0     False        True       False not reproduced
   whole      time         ii 15+   four a | groups        -80        -330.0        -225.0         215           60.0           95.0     False        True       False not reproduced
   whole      time         ii 15+   four b | groups        -75        -370.0        -235.0         215           60.0           95.0     False       False       False not reproduced
   whole      time         ii 15+   kmeans | kmeans         10        -375.0        -375.0          10         -375.0         -375.0     False       False       False not reproduced
    rest       row          i all groups a | groups          5        -185.0        -175.0         160          100.0          100.0     False       False       False not reproduced
    rest       row          i all groups b | groups         10        -205.0        -195.0         160          100.0          100.0     False       False       False not reproduced
    rest       row          i all   four a | groups        -70        -215.0        -210.0         160          100.0          100.0     False       False       False not reproduced
    rest       row          i all   four b | groups        -70        -235.0        -225.0         160          100.0          100.0     False       False       False not reproduced
    rest       row          i all   kmeans | kmeans        370           NaN         335.0         370            NaN          335.0     False       False       False not reproduced
    rest       row          i 15+ groups a | groups         10        -190.0        -170.0         155           90.0           95.0     False       False       False not reproduced
    rest       row          i 15+ groups b | groups         10        -205.0        -195.0         155           90.0           95.0     False       False       False not reproduced
    rest       row          i 15+   four a | groups        -70        -220.0        -210.0         155           90.0           95.0     False       False       False not reproduced
    rest       row          i 15+   four b | groups        -75        -235.0        -225.0         155           90.0           95.0     False       False       False not reproduced
    rest       row          i 15+   kmeans | kmeans       -170           NaN        -170.0        -170            NaN         -170.0     False       False       False not reproduced
    rest       row         ii all groups a | groups         -5        -220.0        -185.0         165           70.0           95.0     False       False       False not reproduced
    rest       row         ii all groups b | groups          5        -235.0        -200.0         165           70.0           95.0     False       False       False not reproduced
    rest       row         ii all   four a | groups        -70        -260.0        -215.0         165           70.0           95.0     False       False       False not reproduced
    rest       row         ii all   four b | groups        -70        -275.0        -230.0         165           70.0           95.0     False       False       False not reproduced
    rest       row         ii all   kmeans | kmeans        375           NaN         215.0         375            NaN          215.0     False       False       False not reproduced
    rest       row         ii 15+ groups a | groups          0        -215.0        -185.0         210           65.0           95.0     False       False       False not reproduced
    rest       row         ii 15+ groups b | groups          5        -240.0        -200.0         210           65.0           95.0     False       False       False not reproduced
    rest       row         ii 15+   four a | groups        -70        -270.0        -215.0         210           65.0           95.0     False       False       False not reproduced
    rest       row         ii 15+   four b | groups        -75        -285.0        -230.0         210           65.0           95.0     False       False       False not reproduced
    rest       row         ii 15+   kmeans | kmeans       -155           NaN        -165.0        -155            NaN         -165.0     False       False       False not reproduced
    rest      time          i all groups a | groups          5        -180.0        -215.0         230           80.0          100.0     False       False       False not reproduced
    rest      time          i all groups b | groups         15        -205.0        -235.0         230           80.0          100.0     False       False       False not reproduced
    rest      time          i all   four a | groups       -150        -245.0        -260.0         230           80.0          100.0     False       False       False not reproduced
    rest      time          i all   four b | groups       -155        -255.0        -260.0         230           80.0          100.0     False       False       False not reproduced
    rest      time          i all   kmeans | kmeans        375           NaN         320.0         375            NaN          320.0     False       False       False not reproduced
    rest      time          i 15+ groups a | groups          5        -180.0        -225.0         235           70.0          100.0     False       False       False not reproduced
    rest      time          i 15+ groups b | groups        -65        -215.0        -250.0         235           70.0          100.0     False       False       False not reproduced
    rest      time          i 15+   four a | groups        -85        -250.0        -265.0         235           70.0          100.0     False       False       False not reproduced
    rest      time          i 15+   four b | groups       -150        -265.0        -270.0         235           70.0          100.0     False       False       False not reproduced
    rest      time          i 15+   kmeans | kmeans        345           NaN         235.0         345            NaN          235.0     False       False       False not reproduced
    rest      time         ii all groups a | groups        -10        -225.0        -195.0         220           60.0           95.0     False       False       False not reproduced
    rest      time         ii all groups b | groups        -65        -245.0        -205.0         220           60.0           95.0     False       False       False not reproduced
    rest      time         ii all   four a | groups        -70        -270.0        -220.0         220           60.0           95.0     False        True       False not reproduced
    rest      time         ii all   four b | groups        -70        -280.0        -235.0         220           60.0           95.0     False        True       False not reproduced
    rest      time         ii all   kmeans | kmeans        370           NaN         215.0         370            NaN          215.0     False       False       False not reproduced
    rest      time         ii 15+ groups a | groups         -5        -225.0        -195.0         220           55.0           90.0     False       False       False not reproduced
    rest      time         ii 15+ groups b | groups        -65        -250.0        -205.0         220           55.0           90.0     False       False       False not reproduced
    rest      time         ii 15+   four a | groups        -70        -280.0        -220.0         220           55.0           90.0     False        True       False not reproduced
    rest      time         ii 15+   four b | groups        -75        -290.0        -235.0         220           55.0           90.0     False        True       False not reproduced
    rest      time         ii 15+   kmeans | kmeans       -150           NaN        -160.0        -150            NaN         -160.0     False       False       False not reproduced
Expected: consonant peak -200 +- 20, onset -300 +- 30; vowel peak 250 +- 25, onset 50 +- 10 ms
Outcome over readings: not reproduced
Outcome counts by reading factor (120 readings):
  baseline: {'pre': {'not reproduced': 40}, 'whole': {'not reproduced': 40}, 'rest': {'not reproduced': 40}}
  z-scoring: {'row': {'not reproduced': 60}, 'time': {'not reproduced': 60}}
  projection: {'i': {'not reproduced': 60}, 'ii': {'not reproduced': 60}}
  CVs: {'all': {'not reproduced': 60}, '15+': {'not reproduced': 60}}
  clusters: {'groups a | groups': {'not reproduced': 24}, 'groups b | groups': {'not reproduced': 24}, 'four a | groups': {'not reproduced': 24}, 'four b | groups': {'not reproduced': 24}, 'kmeans | kmeans': {'not reproduced': 24}}
Phonetic-group readings: consonant peak -155 to 15 | vowel peak 155 to 235 | consonant onset (a) -375.0 to -180.0 | (b) -285.0 to -170.0 | vowel onset (a) 55.0 to 105.0 | (b) 90.0 to 105.0
k-means readings: peak of the single curve -170 to 375
No description has been provided for this image
('pre', 'row', 'i', 'all') curve ranges: {'consonant groups a': (-0.54, 2.61), 'consonant groups b': (-0.43, 2.25), 'consonant four a': (-0.35, 2.66), 'consonant four b': (-0.34, 2.3), 'consonant kmeans': (2.38, 13.86), 'vowel groups': (-0.04, 0.82), 'vowel kmeans': (2.38, 13.86)}
('pre', 'row', 'i', '15+') curve ranges: {'consonant groups a': (-0.13, 3.12), 'consonant groups b': (-0.15, 2.67), 'consonant four a': (-0.27, 2.96), 'consonant four b': (-0.25, 2.57), 'consonant kmeans': (1.85, 4.19), 'vowel groups': (-0.0, 0.88), 'vowel kmeans': (1.85, 4.19)}
('pre', 'row', 'ii', 'all') curve ranges: {'consonant groups a': (-0.12, 1.14), 'consonant groups b': (-0.09, 0.96), 'consonant four a': (-0.07, 1.21), 'consonant four b': (-0.06, 1.04), 'consonant kmeans': (0.57, 2.93), 'vowel groups': (-0.02, 0.39), 'vowel kmeans': (0.57, 2.93)}
('pre', 'row', 'ii', '15+') curve ranges: {'consonant groups a': (-0.03, 1.22), 'consonant groups b': (-0.03, 1.02), 'consonant four a': (-0.04, 1.25), 'consonant four b': (-0.03, 1.07), 'consonant kmeans': (0.44, 1.38), 'vowel groups': (-0.01, 0.4), 'vowel kmeans': (0.44, 1.38)}
('pre', 'time', 'i', 'all') curve ranges: {'consonant groups a': (-0.51, 1.77), 'consonant groups b': (-0.41, 1.57), 'consonant four a': (-0.34, 2.0), 'consonant four b': (-0.3, 1.83), 'consonant kmeans': (2.66, 12.63), 'vowel groups': (-0.04, 1.3), 'vowel kmeans': (2.66, 12.63)}
('pre', 'time', 'i', '15+') curve ranges: {'consonant groups a': (-0.13, 2.14), 'consonant groups b': (-0.13, 1.87), 'consonant four a': (-0.22, 2.28), 'consonant four b': (-0.16, 2.06), 'consonant kmeans': (2.17, 4.51), 'vowel groups': (0.0, 1.41), 'vowel kmeans': (2.17, 4.51)}
('pre', 'time', 'ii', 'all') curve ranges: {'consonant groups a': (-0.11, 1.16), 'consonant groups b': (-0.09, 0.98), 'consonant four a': (-0.07, 1.19), 'consonant four b': (-0.06, 1.03), 'consonant kmeans': (0.57, 2.97), 'vowel groups': (-0.02, 0.45), 'vowel kmeans': (0.57, 2.97)}
('pre', 'time', 'ii', '15+') curve ranges: {'consonant groups a': (-0.03, 1.22), 'consonant groups b': (-0.03, 1.03), 'consonant four a': (-0.04, 1.24), 'consonant four b': (-0.03, 1.07), 'consonant kmeans': (0.43, 1.36), 'vowel groups': (-0.01, 0.46), 'vowel kmeans': (0.43, 1.36)}
('whole', 'row', 'i', 'all') curve ranges: {'consonant groups a': (-0.58, 2.56), 'consonant groups b': (-0.46, 2.22), 'consonant four a': (-0.33, 2.66), 'consonant four b': (-0.33, 2.3), 'consonant kmeans': (2.34, 13.98), 'vowel groups': (-0.04, 0.81), 'vowel kmeans': (2.34, 13.98)}
('whole', 'row', 'i', '15+') curve ranges: {'consonant groups a': (-0.13, 3.16), 'consonant groups b': (-0.16, 2.71), 'consonant four a': (-0.22, 3.0), 'consonant four b': (-0.22, 2.61), 'consonant kmeans': (1.81, 4.07), 'vowel groups': (-0.01, 0.87), 'vowel kmeans': (1.81, 4.07)}
('whole', 'row', 'ii', 'all') curve ranges: {'consonant groups a': (-0.12, 1.04), 'consonant groups b': (-0.09, 0.87), 'consonant four a': (-0.06, 1.13), 'consonant four b': (-0.05, 0.96), 'consonant kmeans': (0.56, 2.86), 'vowel groups': (-0.02, 0.36), 'vowel kmeans': (0.56, 2.86)}
('whole', 'row', 'ii', '15+') curve ranges: {'consonant groups a': (-0.03, 1.13), 'consonant groups b': (-0.03, 0.94), 'consonant four a': (-0.03, 1.17), 'consonant four b': (-0.02, 1.0), 'consonant kmeans': (0.41, 1.26), 'vowel groups': (-0.01, 0.37), 'vowel kmeans': (0.41, 1.26)}
('whole', 'time', 'i', 'all') curve ranges: {'consonant groups a': (-0.53, 1.76), 'consonant groups b': (-0.44, 1.57), 'consonant four a': (-0.32, 2.04), 'consonant four b': (-0.29, 1.85), 'consonant kmeans': (2.74, 12.29), 'vowel groups': (-0.04, 1.3), 'vowel kmeans': (2.74, 12.29)}
('whole', 'time', 'i', '15+') curve ranges: {'consonant groups a': (-0.12, 2.19), 'consonant groups b': (-0.14, 1.91), 'consonant four a': (-0.19, 2.36), 'consonant four b': (-0.15, 2.13), 'consonant kmeans': (2.19, 4.31), 'vowel groups': (-0.01, 1.42), 'vowel kmeans': (2.19, 4.31)}
('whole', 'time', 'ii', 'all') curve ranges: {'consonant groups a': (-0.11, 1.05), 'consonant groups b': (-0.09, 0.89), 'consonant four a': (-0.06, 1.11), 'consonant four b': (-0.05, 0.95), 'consonant kmeans': (0.56, 2.88), 'vowel groups': (-0.02, 0.42), 'vowel kmeans': (0.56, 2.88)}
('whole', 'time', 'ii', '15+') curve ranges: {'consonant groups a': (-0.03, 1.13), 'consonant groups b': (-0.03, 0.95), 'consonant four a': (-0.03, 1.16), 'consonant four b': (-0.02, 1.0), 'consonant kmeans': (0.4, 1.22), 'vowel groups': (-0.01, 0.43), 'vowel kmeans': (0.4, 1.22)}
('rest', 'row', 'i', 'all') curve ranges: {'consonant groups a': (-0.48, 2.53), 'consonant groups b': (-0.44, 2.16), 'consonant four a': (-0.28, 2.63), 'consonant four b': (-0.28, 2.36), 'consonant kmeans': (3.24, 14.11), 'vowel groups': (-0.02, 0.77), 'vowel kmeans': (3.24, 14.11)}
('rest', 'row', 'i', '15+') curve ranges: {'consonant groups a': (-0.31, 3.03), 'consonant groups b': (-0.24, 2.56), 'consonant four a': (-0.23, 2.9), 'consonant four b': (-0.22, 2.66), 'consonant kmeans': (2.85, 11.31), 'vowel groups': (-0.01, 0.79), 'vowel kmeans': (2.85, 11.31)}
('rest', 'row', 'ii', 'all') curve ranges: {'consonant groups a': (-0.13, 1.19), 'consonant groups b': (-0.1, 1.0), 'consonant four a': (-0.07, 1.3), 'consonant four b': (-0.07, 1.13), 'consonant kmeans': (0.94, 4.14), 'vowel groups': (-0.02, 0.41), 'vowel kmeans': (0.94, 4.14)}
('rest', 'row', 'ii', '15+') curve ranges: {'consonant groups a': (-0.06, 1.27), 'consonant groups b': (-0.05, 1.05), 'consonant four a': (-0.05, 1.35), 'consonant four b': (-0.06, 1.18), 'consonant kmeans': (0.82, 3.63), 'vowel groups': (-0.01, 0.42), 'vowel kmeans': (0.82, 3.63)}
('rest', 'time', 'i', 'all') curve ranges: {'consonant groups a': (-0.45, 1.74), 'consonant groups b': (-0.39, 1.53), 'consonant four a': (-0.25, 2.06), 'consonant four b': (-0.24, 2.04), 'consonant kmeans': (3.09, 13.65), 'vowel groups': (-0.02, 1.21), 'vowel kmeans': (3.09, 13.65)}
('rest', 'time', 'i', '15+') curve ranges: {'consonant groups a': (-0.27, 2.08), 'consonant groups b': (-0.17, 1.79), 'consonant four a': (-0.2, 2.23), 'consonant four b': (-0.17, 2.14), 'consonant kmeans': (2.48, 7.98), 'vowel groups': (-0.01, 1.3), 'vowel kmeans': (2.48, 7.98)}
('rest', 'time', 'ii', 'all') curve ranges: {'consonant groups a': (-0.12, 1.17), 'consonant groups b': (-0.1, 0.99), 'consonant four a': (-0.07, 1.32), 'consonant four b': (-0.07, 1.16), 'consonant kmeans': (0.95, 4.37), 'vowel groups': (-0.02, 0.51), 'vowel kmeans': (0.95, 4.37)}
('rest', 'time', 'ii', '15+') curve ranges: {'consonant groups a': (-0.06, 1.24), 'consonant groups b': (-0.05, 1.04), 'consonant four a': (-0.06, 1.36), 'consonant four b': (-0.06, 1.2), 'consonant kmeans': (0.88, 3.56), 'vowel groups': (-0.02, 0.52), 'vowel kmeans': (0.88, 3.56)}

Result: not reproduced. Under none of the 120 readings (24 baseline, z-scoring, projection and CV readings by five cluster readings) are both peaks within tolerance. With the phonetic groups the consonant separability peaks at -155 to +15 ms (paper -200 +- 20) and the vowel separability at 155 to 235 ms (paper 250 +- 25, within it in some readings); with k-means at each time one curve serves both, peaking anywhere from -170 to 375 ms. The consonant onsets (reading a, -375 to -180 ms) reach the paper's -300 +- 30 ms under some readings, and the vowel onsets (55 to 105 ms) are mostly later than its 50 +- 10 ms. The bootstrap no longer pairs a token with its own copies, which changes only the s.e. used by onset reading (a); no reading gives both peaks within tolerance under any reading factor (table of counts).

fig5d-separability-coupling¶

Cluster separability and the correlation of the state-space with phonetic features are tightly linked over time for consonants and vowels in each subject (R2 0.42 to 0.98, all P < 1e-10).

In [25]:
c5 = []
for (base, z, pj, cs), d in SEP.items():
    R = RT[base, z, pj, cs]
    for ck in SEP_KINDS["consonant"]:
        vk = "kmeans" if ck == "kmeans" else "groups"
        for rmode in ("(a) matching set", "(b) mean of three"):
            vals = []
            for i, s in enumerate(B.SUBJECTS):
                for which, kind, fset in (("consonant", ck, "location"), ("vowel", vk, "vowel")):
                    r = R[s, fset] if rmode.startswith("(a)") else np.mean([R[s, f] for f in FEATS], 0)
                    res = stats.pearsonr(d[which, kind][2][i], r)
                    vals.append((res.statistic ** 2, res.pvalue, res.statistic))
            r2 = np.array([v[0] for v in vals]); ps = np.array([v[1] for v in vals]); rs = np.array([v[2] for v in vals])
            ok = bool((r2 >= 0.378).all() and (ps < 1e-10).all() and (rs > 0).all())
            part = bool((rs > 0).all() and (ps < 1e-10).all())
            c5.append({"baseline": base, "z-scoring": z, "projection": pj, "CVs": cs, "clusters": f"{ck} | {vk}", "R": rmode,
                       "R2 (EC2 c,v GP31 c,v GP33 c,v)": " ".join(f"{x:.2f}" for x in r2),
                       "max p": ps.max(), "min r": round(rs.min(), 2),
                       "outcome": "reproduced" if ok else ("partially" if part else "not reproduced")})
c5 = pd.DataFrame(c5)
print(c5.to_string(index=False))
print("\nOutcome over readings:", overall(c5.outcome))
by_factor(c5, ["baseline", "z-scoring", "projection", "CVs", "clusters", "R"])
print("Outcomes by reading of the clusters and of R:")
print(c5.groupby(["clusters", "R"]).outcome.value_counts().unstack(fill_value=0).to_string())
baseline z-scoring projection CVs          clusters                 R R2 (EC2 c,v GP31 c,v GP33 c,v)        max p  min r        outcome
     pre       row          i all groups a | groups  (a) matching set  0.90 0.95 0.69 0.97 0.57 0.88 8.557880e-48   0.76     reproduced
     pre       row          i all groups a | groups (b) mean of three  0.18 0.29 0.83 0.31 0.12 0.13 2.801544e-08  -0.56 not reproduced
     pre       row          i all groups b | groups  (a) matching set  0.89 0.95 0.67 0.97 0.48 0.88 1.350045e-37   0.70     reproduced
     pre       row          i all groups b | groups (b) mean of three  0.16 0.29 0.84 0.31 0.09 0.13 1.873684e-06  -0.56 not reproduced
     pre       row          i all   four a | groups  (a) matching set  0.85 0.95 0.79 0.97 0.67 0.88 2.200816e-61   0.82     reproduced
     pre       row          i all   four a | groups (b) mean of three  0.12 0.29 0.81 0.31 0.09 0.13 1.769221e-06  -0.56 not reproduced
     pre       row          i all   four b | groups  (a) matching set  0.84 0.95 0.73 0.97 0.59 0.88 1.428680e-49   0.77     reproduced
     pre       row          i all   four b | groups (b) mean of three  0.12 0.29 0.83 0.31 0.08 0.13 7.360150e-06  -0.56 not reproduced
     pre       row          i all   kmeans | kmeans  (a) matching set  0.66 0.02 0.12 0.01 0.07 0.01 1.423802e-01  -0.34 not reproduced
     pre       row          i all   kmeans | kmeans (b) mean of three  0.31 0.31 0.00 0.00 0.06 0.06 3.588361e-01  -0.25 not reproduced
     pre       row          i 15+ groups a | groups  (a) matching set  0.93 0.95 0.51 0.85 0.57 0.88 1.757800e-40   0.71     reproduced
     pre       row          i 15+ groups a | groups (b) mean of three  0.20 0.27 0.37 0.11 0.12 0.13 1.159030e-07  -0.33 not reproduced
     pre       row          i 15+ groups b | groups  (a) matching set  0.92 0.95 0.50 0.85 0.48 0.88 1.350045e-37   0.70     reproduced
     pre       row          i 15+ groups b | groups (b) mean of three  0.19 0.27 0.38 0.11 0.09 0.13 1.873684e-06  -0.33 not reproduced
     pre       row          i 15+   four a | groups  (a) matching set  0.88 0.95 0.58 0.85 0.67 0.88 2.037010e-49   0.76     reproduced
     pre       row          i 15+   four a | groups (b) mean of three  0.13 0.27 0.41 0.11 0.09 0.13 1.769221e-06  -0.33 not reproduced
     pre       row          i 15+   four b | groups  (a) matching set  0.87 0.95 0.52 0.85 0.59 0.88 5.230691e-42   0.72     reproduced
     pre       row          i 15+   four b | groups (b) mean of three  0.14 0.27 0.39 0.11 0.08 0.13 7.360150e-06  -0.33 not reproduced
     pre       row          i 15+   kmeans | kmeans  (a) matching set  0.73 0.04 0.04 0.32 0.07 0.01 1.231100e-01  -0.56 not reproduced
     pre       row          i 15+   kmeans | kmeans (b) mean of three  0.34 0.34 0.02 0.02 0.06 0.06 2.047243e-02  -0.25 not reproduced
     pre       row         ii all groups a | groups  (a) matching set  0.91 0.91 0.86 0.98 0.65 0.94 4.364097e-59   0.81     reproduced
     pre       row         ii all groups a | groups (b) mean of three  0.02 0.59 0.89 0.48 0.02 0.37 2.163991e-02  -0.69 not reproduced
     pre       row         ii all groups b | groups  (a) matching set  0.90 0.91 0.86 0.98 0.66 0.94 6.388438e-60   0.81     reproduced
     pre       row         ii all groups b | groups (b) mean of three  0.03 0.59 0.91 0.48 0.02 0.37 1.276696e-02  -0.69 not reproduced
     pre       row         ii all   four a | groups  (a) matching set  0.88 0.91 0.88 0.98 0.74 0.94 1.230339e-74   0.86     reproduced
     pre       row         ii all   four a | groups (b) mean of three  0.01 0.59 0.88 0.48 0.04 0.37 1.680837e-01  -0.69 not reproduced
     pre       row         ii all   four b | groups  (a) matching set  0.87 0.91 0.87 0.98 0.73 0.94 8.405368e-72   0.85     reproduced
     pre       row         ii all   four b | groups (b) mean of three  0.01 0.59 0.90 0.48 0.04 0.37 1.459390e-01  -0.69 not reproduced
     pre       row         ii all   kmeans | kmeans  (a) matching set  0.81 0.06 0.02 0.02 0.08 0.07 1.754536e-02  -0.26 not reproduced
     pre       row         ii all   kmeans | kmeans (b) mean of three  0.12 0.12 0.00 0.00 0.01 0.01 5.605257e-01  -0.11 not reproduced
     pre       row         ii 15+ groups a | groups  (a) matching set  0.91 0.91 0.58 0.90 0.65 0.94 2.117134e-49   0.76     reproduced
     pre       row         ii 15+ groups a | groups (b) mean of three  0.02 0.60 0.27 0.14 0.02 0.37 3.835496e-02  -0.37 not reproduced
     pre       row         ii 15+ groups b | groups  (a) matching set  0.90 0.91 0.61 0.90 0.66 0.94 2.740828e-53   0.78     reproduced
     pre       row         ii 15+ groups b | groups (b) mean of three  0.02 0.60 0.30 0.14 0.02 0.37 2.315223e-02  -0.37 not reproduced
     pre       row         ii 15+   four a | groups  (a) matching set  0.88 0.91 0.62 0.90 0.74 0.94 2.572838e-54   0.79     reproduced
     pre       row         ii 15+   four a | groups (b) mean of three  0.00 0.60 0.30 0.14 0.04 0.37 3.599467e-01  -0.37 not reproduced
     pre       row         ii 15+   four b | groups  (a) matching set  0.88 0.91 0.62 0.90 0.73 0.94 7.186415e-55   0.79     reproduced
     pre       row         ii 15+   four b | groups (b) mean of three  0.00 0.60 0.31 0.14 0.04 0.37 3.074522e-01  -0.37 not reproduced
     pre       row         ii 15+   kmeans | kmeans  (a) matching set  0.80 0.07 0.29 0.47 0.08 0.07 3.217501e-05  -0.69 not reproduced
     pre       row         ii 15+   kmeans | kmeans (b) mean of three  0.11 0.11 0.08 0.08 0.01 0.01 8.226222e-02  -0.11 not reproduced
     pre      time          i all groups a | groups  (a) matching set  0.92 0.97 0.67 0.97 0.45 0.92 8.814722e-34   0.67     reproduced
     pre      time          i all groups a | groups (b) mean of three  0.00 0.64 0.72 0.19 0.02 0.29 3.573545e-01  -0.44 not reproduced
     pre      time          i all groups b | groups  (a) matching set  0.92 0.97 0.65 0.97 0.40 0.92 4.407971e-29   0.63     reproduced
     pre      time          i all groups b | groups (b) mean of three  0.00 0.64 0.72 0.19 0.02 0.29 5.124998e-01  -0.44 not reproduced
     pre      time          i all   four a | groups  (a) matching set  0.78 0.97 0.72 0.97 0.59 0.92 9.214609e-50   0.77     reproduced
     pre      time          i all   four a | groups (b) mean of three  0.04 0.64 0.73 0.19 0.02 0.29 4.232537e-02  -0.44 not reproduced
     pre      time          i all   four b | groups  (a) matching set  0.78 0.97 0.68 0.97 0.52 0.92 2.242277e-41   0.72     reproduced
     pre      time          i all   four b | groups (b) mean of three  0.03 0.64 0.72 0.19 0.02 0.29 3.959789e-02  -0.44 not reproduced
     pre      time          i all   kmeans | kmeans  (a) matching set  0.25 0.01 0.20 0.03 0.15 0.01 2.145276e-01  -0.45 not reproduced
     pre      time          i all   kmeans | kmeans (b) mean of three  0.14 0.14 0.07 0.07 0.07 0.07 2.471032e-05  -0.27 not reproduced
     pre      time          i 15+ groups a | groups  (a) matching set  0.95 0.98 0.49 0.91 0.45 0.92 8.814722e-34   0.67     reproduced
     pre      time          i 15+ groups a | groups (b) mean of three  0.00 0.64 0.36 0.08 0.02 0.29 8.787047e-01  -0.29 not reproduced
     pre      time          i 15+ groups b | groups  (a) matching set  0.94 0.98 0.48 0.91 0.40 0.92 4.407971e-29   0.63     reproduced
     pre      time          i 15+ groups b | groups (b) mean of three  0.00 0.64 0.34 0.08 0.02 0.29 9.157462e-01  -0.29 not reproduced
     pre      time          i 15+   four a | groups  (a) matching set  0.80 0.98 0.53 0.91 0.59 0.92 1.002650e-42   0.73     reproduced
     pre      time          i 15+   four a | groups (b) mean of three  0.03 0.64 0.36 0.08 0.02 0.29 4.232537e-02  -0.29 not reproduced
     pre      time          i 15+   four b | groups  (a) matching set  0.79 0.98 0.46 0.91 0.52 0.92 3.803138e-35   0.68     reproduced
     pre      time          i 15+   four b | groups (b) mean of three  0.02 0.64 0.30 0.08 0.02 0.29 4.329357e-02  -0.29 not reproduced
     pre      time          i 15+   kmeans | kmeans  (a) matching set  0.26 0.01 0.00 0.32 0.15 0.01 6.795617e-01  -0.57 not reproduced
     pre      time          i 15+   kmeans | kmeans (b) mean of three  0.16 0.16 0.00 0.00 0.07 0.07 4.054647e-01  -0.26 not reproduced
     pre      time         ii all groups a | groups  (a) matching set  0.93 0.91 0.86 0.99 0.67 0.94 3.756906e-62   0.82     reproduced
     pre      time         ii all groups a | groups (b) mean of three  0.01 0.65 0.89 0.48 0.04 0.34 1.247366e-01  -0.69 not reproduced
     pre      time         ii all groups b | groups  (a) matching set  0.92 0.91 0.86 0.99 0.68 0.94 2.465903e-63   0.82     reproduced
     pre      time         ii all groups b | groups (b) mean of three  0.01 0.65 0.91 0.48 0.04 0.34 8.902795e-02  -0.69 not reproduced
     pre      time         ii all   four a | groups  (a) matching set  0.91 0.91 0.88 0.99 0.76 0.94 4.797057e-78   0.87     reproduced
     pre      time         ii all   four a | groups (b) mean of three  0.00 0.65 0.88 0.48 0.05 0.34 7.438878e-01  -0.69 not reproduced
     pre      time         ii all   four b | groups  (a) matching set  0.91 0.91 0.87 0.99 0.74 0.94 1.894696e-75   0.86     reproduced
     pre      time         ii all   four b | groups (b) mean of three  0.00 0.65 0.91 0.48 0.05 0.34 6.413088e-01  -0.69 not reproduced
     pre      time         ii all   kmeans | kmeans  (a) matching set  0.72 0.02 0.03 0.02 0.05 0.07 3.285534e-02  -0.27 not reproduced
     pre      time         ii all   kmeans | kmeans (b) mean of three  0.16 0.16 0.00 0.00 0.01 0.01 3.960150e-01  -0.11 not reproduced
     pre      time         ii 15+ groups a | groups  (a) matching set  0.93 0.91 0.60 0.91 0.67 0.94 3.818786e-51   0.77     reproduced
     pre      time         ii 15+ groups a | groups (b) mean of three  0.01 0.67 0.28 0.13 0.04 0.34 2.359537e-01  -0.36 not reproduced
     pre      time         ii 15+ groups b | groups  (a) matching set  0.92 0.91 0.63 0.91 0.68 0.94 3.704163e-55   0.79     reproduced
     pre      time         ii 15+ groups b | groups (b) mean of three  0.01 0.67 0.30 0.13 0.04 0.34 1.782315e-01  -0.36 not reproduced
     pre      time         ii 15+   four a | groups  (a) matching set  0.90 0.91 0.63 0.91 0.76 0.94 5.111766e-56   0.80     reproduced
     pre      time         ii 15+   four a | groups (b) mean of three  0.00 0.67 0.30 0.13 0.05 0.34 9.717886e-01  -0.36 not reproduced
     pre      time         ii 15+   four b | groups  (a) matching set  0.90 0.91 0.64 0.91 0.74 0.94 8.707229e-57   0.80     reproduced
     pre      time         ii 15+   four b | groups (b) mean of three  0.00 0.67 0.31 0.13 0.05 0.34 8.936653e-01  -0.36 not reproduced
     pre      time         ii 15+   kmeans | kmeans  (a) matching set  0.70 0.01 0.31 0.47 0.05 0.07 8.133747e-02  -0.69 not reproduced
     pre      time         ii 15+   kmeans | kmeans (b) mean of three  0.16 0.16 0.09 0.09 0.01 0.01 7.499047e-02  -0.11 not reproduced
   whole       row          i all groups a | groups  (a) matching set  0.89 0.94 0.87 0.97 0.56 0.87 9.930735e-47   0.75     reproduced
   whole       row          i all groups a | groups (b) mean of three  0.17 0.27 0.82 0.30 0.14 0.12 2.172713e-08  -0.55 not reproduced
   whole       row          i all groups b | groups  (a) matching set  0.87 0.94 0.86 0.97 0.48 0.87 1.024428e-36   0.69     reproduced
   whole       row          i all groups b | groups (b) mean of three  0.16 0.27 0.85 0.30 0.10 0.12 2.374137e-07  -0.55 not reproduced
   whole       row          i all   four a | groups  (a) matching set  0.84 0.94 0.87 0.97 0.67 0.87 4.037112e-61   0.82     reproduced
   whole       row          i all   four a | groups (b) mean of three  0.12 0.27 0.82 0.30 0.10 0.12 2.758712e-07  -0.55 not reproduced
   whole       row          i all   four b | groups  (a) matching set  0.83 0.94 0.84 0.97 0.58 0.87 4.945629e-49   0.76     reproduced
   whole       row          i all   four b | groups (b) mean of three  0.12 0.27 0.85 0.30 0.09 0.12 2.074469e-06  -0.55 not reproduced
   whole       row          i all   kmeans | kmeans  (a) matching set  0.65 0.02 0.09 0.06 0.07 0.01 6.554510e-02  -0.29 not reproduced
   whole       row          i all   kmeans | kmeans (b) mean of three  0.30 0.30 0.05 0.05 0.08 0.08 5.225319e-04  -0.29 not reproduced
   whole       row          i 15+ groups a | groups  (a) matching set  0.92 0.95 0.62 0.88 0.56 0.87 9.930735e-47   0.75     reproduced
   whole       row          i 15+ groups a | groups (b) mean of three  0.20 0.26 0.45 0.13 0.14 0.12 2.172713e-08  -0.36 not reproduced
   whole       row          i 15+ groups b | groups  (a) matching set  0.91 0.95 0.61 0.88 0.48 0.87 1.024428e-36   0.69     reproduced
   whole       row          i 15+ groups b | groups (b) mean of three  0.19 0.26 0.47 0.13 0.10 0.12 2.374137e-07  -0.36 not reproduced
   whole       row          i 15+   four a | groups  (a) matching set  0.87 0.95 0.60 0.88 0.67 0.87 9.137639e-52   0.78     reproduced
   whole       row          i 15+   four a | groups (b) mean of three  0.14 0.26 0.44 0.13 0.10 0.12 2.758712e-07  -0.36 not reproduced
   whole       row          i 15+   four b | groups  (a) matching set  0.86 0.95 0.56 0.88 0.58 0.87 7.965225e-46   0.75     reproduced
   whole       row          i 15+   four b | groups (b) mean of three  0.14 0.26 0.44 0.13 0.09 0.12 2.074469e-06  -0.36 not reproduced
   whole       row          i 15+   kmeans | kmeans  (a) matching set  0.74 0.04 0.16 0.36 0.07 0.01 6.554510e-02  -0.60 not reproduced
   whole       row          i 15+   kmeans | kmeans (b) mean of three  0.34 0.34 0.08 0.08 0.08 0.08 6.258169e-06  -0.29 not reproduced
   whole       row         ii all groups a | groups  (a) matching set  0.90 0.91 0.92 0.98 0.65 0.94 1.501843e-58   0.81     reproduced
   whole       row         ii all groups a | groups (b) mean of three  0.03 0.57 0.86 0.45 0.04 0.32 9.793249e-03  -0.67 not reproduced
   whole       row         ii all groups b | groups  (a) matching set  0.90 0.91 0.93 0.98 0.65 0.94 1.646605e-58   0.81     reproduced
   whole       row         ii all groups b | groups (b) mean of three  0.03 0.57 0.88 0.45 0.04 0.32 6.432049e-03  -0.67 not reproduced
   whole       row         ii all   four a | groups  (a) matching set  0.87 0.91 0.92 0.98 0.74 0.94 2.599212e-75   0.86     reproduced
   whole       row         ii all   four a | groups (b) mean of three  0.01 0.57 0.86 0.45 0.06 0.32 1.312153e-01  -0.67 not reproduced
   whole       row         ii all   four b | groups  (a) matching set  0.87 0.91 0.92 0.98 0.72 0.94 1.168611e-71   0.85     reproduced
   whole       row         ii all   four b | groups (b) mean of three  0.01 0.57 0.89 0.45 0.06 0.32 1.146401e-01  -0.67 not reproduced
   whole       row         ii all   kmeans | kmeans  (a) matching set  0.81 0.07 0.02 0.04 0.04 0.06 1.458139e-02  -0.27 not reproduced
   whole       row         ii all   kmeans | kmeans (b) mean of three  0.12 0.12 0.01 0.01 0.01 0.01 2.212496e-01  -0.11 not reproduced
   whole       row         ii 15+ groups a | groups  (a) matching set  0.91 0.91 0.68 0.91 0.65 0.94 1.501843e-58   0.81     reproduced
   whole       row         ii 15+ groups a | groups (b) mean of three  0.02 0.59 0.35 0.17 0.04 0.32 2.686008e-02  -0.41 not reproduced
   whole       row         ii 15+ groups b | groups  (a) matching set  0.90 0.91 0.71 0.91 0.65 0.94 1.646605e-58   0.81     reproduced
   whole       row         ii 15+ groups b | groups (b) mean of three  0.02 0.59 0.40 0.17 0.04 0.32 1.726786e-02  -0.41 not reproduced
   whole       row         ii 15+   four a | groups  (a) matching set  0.88 0.91 0.68 0.91 0.74 0.94 1.264664e-63   0.82     reproduced
   whole       row         ii 15+   four a | groups (b) mean of three  0.00 0.59 0.37 0.17 0.06 0.32 3.017194e-01  -0.41 not reproduced
   whole       row         ii 15+   four b | groups  (a) matching set  0.88 0.91 0.70 0.91 0.72 0.94 2.141893e-66   0.83     reproduced
   whole       row         ii 15+   four b | groups (b) mean of three  0.01 0.59 0.40 0.17 0.06 0.32 2.571645e-01  -0.41 not reproduced
   whole       row         ii 15+   kmeans | kmeans  (a) matching set  0.81 0.07 0.47 0.48 0.04 0.06 1.207573e-03  -0.69 not reproduced
   whole       row         ii 15+   kmeans | kmeans (b) mean of three  0.11 0.11 0.19 0.19 0.01 0.01 7.273542e-02  -0.11 not reproduced
   whole      time          i all groups a | groups  (a) matching set  0.91 0.97 0.75 0.98 0.45 0.91 2.275136e-34   0.67     reproduced
   whole      time          i all groups a | groups (b) mean of three  0.00 0.64 0.73 0.17 0.04 0.26 2.853585e-01  -0.41 not reproduced
   whole      time          i all groups b | groups  (a) matching set  0.91 0.97 0.73 0.98 0.40 0.91 4.645786e-29   0.63     reproduced
   whole      time          i all groups b | groups (b) mean of three  0.00 0.64 0.75 0.17 0.03 0.26 3.914154e-01  -0.41 not reproduced
   whole      time          i all   four a | groups  (a) matching set  0.78 0.97 0.74 0.98 0.59 0.91 2.295098e-50   0.77     reproduced
   whole      time          i all   four a | groups (b) mean of three  0.04 0.64 0.75 0.17 0.03 0.26 9.102167e-03  -0.41 not reproduced
   whole      time          i all   four b | groups  (a) matching set  0.78 0.97 0.70 0.98 0.52 0.91 1.865308e-41   0.72     reproduced
   whole      time          i all   four b | groups (b) mean of three  0.03 0.64 0.74 0.17 0.03 0.26 1.197155e-02  -0.41 not reproduced
   whole      time          i all   kmeans | kmeans  (a) matching set  0.26 0.01 0.15 0.05 0.11 0.01 2.030027e-01  -0.39 not reproduced
   whole      time          i all   kmeans | kmeans (b) mean of three  0.14 0.14 0.08 0.08 0.05 0.05 2.083728e-04  -0.28 not reproduced
   whole      time          i 15+ groups a | groups  (a) matching set  0.94 0.98 0.55 0.92 0.45 0.91 2.275136e-34   0.67     reproduced
   whole      time          i 15+ groups a | groups (b) mean of three  0.00 0.64 0.40 0.07 0.04 0.26 8.694233e-01  -0.26 not reproduced
   whole      time          i 15+ groups b | groups  (a) matching set  0.94 0.98 0.53 0.92 0.40 0.91 4.645786e-29   0.63     reproduced
   whole      time          i 15+ groups b | groups (b) mean of three  0.00 0.64 0.38 0.07 0.03 0.26 9.740930e-01  -0.26 not reproduced
   whole      time          i 15+   four a | groups  (a) matching set  0.80 0.98 0.51 0.92 0.59 0.91 5.534198e-41   0.72     reproduced
   whole      time          i 15+   four a | groups (b) mean of three  0.02 0.64 0.36 0.07 0.03 0.26 1.269556e-02  -0.26 not reproduced
   whole      time          i 15+   four b | groups  (a) matching set  0.79 0.98 0.45 0.92 0.52 0.91 7.923060e-34   0.67     reproduced
   whole      time          i 15+   four b | groups (b) mean of three  0.02 0.64 0.31 0.07 0.03 0.26 5.135526e-02  -0.26 not reproduced
   whole      time          i 15+   kmeans | kmeans  (a) matching set  0.28 0.02 0.00 0.33 0.11 0.01 2.946195e-01  -0.57 not reproduced
   whole      time          i 15+   kmeans | kmeans (b) mean of three  0.23 0.23 0.00 0.00 0.05 0.05 9.145159e-01  -0.23 not reproduced
   whole      time         ii all groups a | groups  (a) matching set  0.93 0.91 0.93 0.99 0.67 0.94 1.621938e-61   0.82     reproduced
   whole      time         ii all groups a | groups (b) mean of three  0.01 0.63 0.86 0.45 0.06 0.29 1.166388e-01  -0.67 not reproduced
   whole      time         ii all groups b | groups  (a) matching set  0.92 0.91 0.93 0.99 0.67 0.94 1.164756e-61   0.82     reproduced
   whole      time         ii all groups b | groups (b) mean of three  0.01 0.63 0.89 0.45 0.06 0.29 8.983255e-02  -0.67 not reproduced
   whole      time         ii all   four a | groups  (a) matching set  0.91 0.91 0.92 0.99 0.76 0.94 1.177567e-78   0.87     reproduced
   whole      time         ii all   four a | groups (b) mean of three  0.00 0.63 0.86 0.45 0.08 0.29 6.795010e-01  -0.67 not reproduced
   whole      time         ii all   four b | groups  (a) matching set  0.91 0.91 0.92 0.99 0.74 0.94 4.557709e-75   0.86     reproduced
   whole      time         ii all   four b | groups (b) mean of three  0.00 0.63 0.90 0.45 0.07 0.29 5.904175e-01  -0.67 not reproduced
   whole      time         ii all   kmeans | kmeans  (a) matching set  0.73 0.02 0.02 0.04 0.03 0.06 2.452778e-02  -0.24 not reproduced
   whole      time         ii all   kmeans | kmeans (b) mean of three  0.16 0.16 0.01 0.01 0.01 0.01 2.075319e-01  -0.12 not reproduced
   whole      time         ii 15+ groups a | groups  (a) matching set  0.93 0.91 0.69 0.92 0.67 0.94 1.621938e-61   0.82     reproduced
   whole      time         ii 15+ groups a | groups (b) mean of three  0.01 0.66 0.36 0.16 0.06 0.29 2.144277e-01  -0.40 not reproduced
   whole      time         ii 15+ groups b | groups  (a) matching set  0.92 0.91 0.72 0.92 0.67 0.94 1.164756e-61   0.82     reproduced
   whole      time         ii 15+ groups b | groups (b) mean of three  0.01 0.66 0.40 0.16 0.06 0.29 1.717178e-01  -0.40 not reproduced
   whole      time         ii 15+   four a | groups  (a) matching set  0.90 0.91 0.70 0.92 0.76 0.94 2.342622e-66   0.83     reproduced
   whole      time         ii 15+   four a | groups (b) mean of three  0.00 0.66 0.38 0.16 0.08 0.29 9.741504e-01  -0.40 not reproduced
   whole      time         ii 15+   four b | groups  (a) matching set  0.90 0.91 0.71 0.92 0.74 0.94 3.103412e-69   0.84     reproduced
   whole      time         ii 15+   four b | groups (b) mean of three  0.00 0.66 0.41 0.16 0.07 0.29 8.482887e-01  -0.40 not reproduced
   whole      time         ii 15+   kmeans | kmeans  (a) matching set  0.70 0.01 0.49 0.48 0.03 0.06 8.021031e-02  -0.70 not reproduced
   whole      time         ii 15+   kmeans | kmeans (b) mean of three  0.16 0.16 0.20 0.20 0.01 0.01 5.312232e-02  -0.12 not reproduced
    rest       row          i all groups a | groups  (a) matching set  0.88 0.94 0.42 0.70 0.55 0.82 2.133976e-31   0.65     reproduced
    rest       row          i all groups a | groups (b) mean of three  0.20 0.26 0.38 0.19 0.18 0.10 2.424806e-07  -0.44 not reproduced
    rest       row          i all groups b | groups  (a) matching set  0.86 0.94 0.30 0.70 0.47 0.82 5.445767e-21   0.55      partially
    rest       row          i all groups b | groups (b) mean of three  0.18 0.26 0.35 0.19 0.13 0.10 2.424806e-07  -0.44 not reproduced
    rest       row          i all   four a | groups  (a) matching set  0.82 0.94 0.27 0.70 0.65 0.82 8.925815e-19   0.52      partially
    rest       row          i all   four a | groups (b) mean of three  0.14 0.26 0.28 0.19 0.12 0.10 2.424806e-07  -0.44 not reproduced
    rest       row          i all   four b | groups  (a) matching set  0.81 0.94 0.14 0.70 0.57 0.82 9.019966e-10   0.37 not reproduced
    rest       row          i all   four b | groups (b) mean of three  0.14 0.26 0.21 0.19 0.10 0.10 3.396701e-07  -0.44 not reproduced
    rest       row          i all   kmeans | kmeans  (a) matching set  0.59 0.01 0.29 0.06 0.13 0.00 2.895399e-01  -0.53 not reproduced
    rest       row          i all   kmeans | kmeans (b) mean of three  0.31 0.31 0.22 0.22 0.08 0.08 6.103611e-06  -0.46 not reproduced
    rest       row          i 15+ groups a | groups  (a) matching set  0.91 0.95 0.63 0.73 0.55 0.82 4.888179e-45   0.74     reproduced
    rest       row          i 15+ groups a | groups (b) mean of three  0.20 0.26 0.51 0.23 0.18 0.10 2.424806e-07  -0.48 not reproduced
    rest       row          i 15+ groups b | groups  (a) matching set  0.89 0.95 0.49 0.73 0.47 0.82 6.667915e-36   0.68     reproduced
    rest       row          i 15+ groups b | groups (b) mean of three  0.20 0.26 0.44 0.23 0.13 0.10 2.424806e-07  -0.48 not reproduced
    rest       row          i 15+   four a | groups  (a) matching set  0.83 0.95 0.49 0.73 0.65 0.82 3.743932e-38   0.70     reproduced
    rest       row          i 15+   four a | groups (b) mean of three  0.14 0.26 0.42 0.23 0.12 0.10 2.424806e-07  -0.48 not reproduced
    rest       row          i 15+   four b | groups  (a) matching set  0.82 0.95 0.33 0.73 0.57 0.82 3.621067e-23   0.57      partially
    rest       row          i 15+   four b | groups (b) mean of three  0.14 0.26 0.31 0.23 0.10 0.10 3.396701e-07  -0.48 not reproduced
    rest       row          i 15+   kmeans | kmeans  (a) matching set  0.69 0.03 0.18 0.00 0.13 0.00 6.365091e-01  -0.42 not reproduced
    rest       row          i 15+   kmeans | kmeans (b) mean of three  0.35 0.35 0.15 0.15 0.08 0.08 6.103611e-06  -0.39 not reproduced
    rest       row         ii all groups a | groups  (a) matching set  0.91 0.91 0.48 0.72 0.65 0.92 1.641750e-37   0.69     reproduced
    rest       row         ii all groups a | groups (b) mean of three  0.02 0.63 0.36 0.18 0.08 0.27 4.289733e-02  -0.42 not reproduced
    rest       row         ii all groups b | groups  (a) matching set  0.91 0.91 0.37 0.72 0.65 0.92 1.370849e-26   0.61      partially
    rest       row         ii all groups b | groups (b) mean of three  0.02 0.63 0.32 0.18 0.08 0.27 2.176771e-02  -0.42 not reproduced
    rest       row         ii all   four a | groups  (a) matching set  0.88 0.91 0.28 0.72 0.74 0.92 1.801708e-19   0.53      partially
    rest       row         ii all   four a | groups (b) mean of three  0.00 0.63 0.24 0.18 0.09 0.27 2.970818e-01  -0.42 not reproduced
    rest       row         ii all   four b | groups  (a) matching set  0.88 0.91 0.16 0.72 0.72 0.92 5.747181e-11   0.40      partially
    rest       row         ii all   four b | groups (b) mean of three  0.01 0.63 0.17 0.18 0.09 0.27 2.617314e-01  -0.42 not reproduced
    rest       row         ii all   kmeans | kmeans  (a) matching set  0.80 0.05 0.26 0.13 0.01 0.06 2.359165e-01  -0.51 not reproduced
    rest       row         ii all   kmeans | kmeans (b) mean of three  0.12 0.12 0.18 0.18 0.02 0.02 1.517899e-02  -0.43 not reproduced
    rest       row         ii 15+ groups a | groups  (a) matching set  0.90 0.90 0.65 0.71 0.65 0.92 1.708128e-58   0.81     reproduced
    rest       row         ii 15+ groups a | groups (b) mean of three  0.01 0.65 0.44 0.20 0.08 0.27 2.355117e-01  -0.44 not reproduced
    rest       row         ii 15+ groups b | groups  (a) matching set  0.90 0.90 0.52 0.71 0.65 0.92 1.349821e-41   0.72     reproduced
    rest       row         ii 15+ groups b | groups (b) mean of three  0.01 0.65 0.38 0.20 0.08 0.27 1.351648e-01  -0.44 not reproduced
    rest       row         ii 15+   four a | groups  (a) matching set  0.86 0.90 0.45 0.71 0.74 0.92 5.407298e-34   0.67     reproduced
    rest       row         ii 15+   four a | groups (b) mean of three  0.00 0.65 0.32 0.20 0.09 0.27 9.881077e-01  -0.44 not reproduced
    rest       row         ii 15+   four b | groups  (a) matching set  0.86 0.90 0.31 0.71 0.72 0.92 1.040219e-21   0.56      partially
    rest       row         ii 15+   four b | groups (b) mean of three  0.00 0.65 0.23 0.20 0.09 0.27 9.072754e-01  -0.44 not reproduced
    rest       row         ii 15+   kmeans | kmeans  (a) matching set  0.80 0.06 0.13 0.01 0.01 0.06 2.359165e-01  -0.36 not reproduced
    rest       row         ii 15+   kmeans | kmeans (b) mean of three  0.08 0.08 0.11 0.11 0.02 0.02 1.517899e-02  -0.34 not reproduced
    rest      time          i all groups a | groups  (a) matching set  0.89 0.97 0.42 0.89 0.46 0.89 1.450655e-31   0.65     reproduced
    rest      time          i all groups a | groups (b) mean of three  0.00 0.63 0.36 0.23 0.06 0.23 4.883826e-01  -0.48 not reproduced
    rest      time          i all groups b | groups  (a) matching set  0.89 0.97 0.31 0.89 0.40 0.89 5.519352e-22   0.56      partially
    rest      time          i all groups b | groups (b) mean of three  0.00 0.63 0.30 0.23 0.05 0.23 6.321657e-01  -0.48 not reproduced
    rest      time          i all   four a | groups  (a) matching set  0.74 0.97 0.28 0.89 0.57 0.89 1.225408e-19   0.53      partially
    rest      time          i all   four a | groups (b) mean of three  0.03 0.63 0.27 0.23 0.04 0.23 8.108904e-03  -0.48 not reproduced
    rest      time          i all   four b | groups  (a) matching set  0.73 0.97 0.18 0.89 0.49 0.89 1.903761e-12   0.43      partially
    rest      time          i all   four b | groups (b) mean of three  0.02 0.63 0.21 0.23 0.03 0.23 2.544771e-02  -0.48 not reproduced
    rest      time          i all   kmeans | kmeans  (a) matching set  0.26 0.01 0.15 0.10 0.17 0.01 1.828130e-01  -0.41 not reproduced
    rest      time          i all   kmeans | kmeans (b) mean of three  0.14 0.14 0.16 0.16 0.09 0.09 1.097735e-06  -0.40 not reproduced
    rest      time          i 15+ groups a | groups  (a) matching set  0.93 0.97 0.52 0.90 0.46 0.89 3.594869e-35   0.68     reproduced
    rest      time          i 15+ groups a | groups (b) mean of three  0.00 0.63 0.35 0.19 0.06 0.23 8.856142e-01  -0.44 not reproduced
    rest      time          i 15+ groups b | groups  (a) matching set  0.92 0.97 0.39 0.90 0.40 0.89 7.883490e-29   0.63     reproduced
    rest      time          i 15+ groups b | groups (b) mean of three  0.00 0.63 0.27 0.19 0.05 0.23 7.093804e-01  -0.44 not reproduced
    rest      time          i 15+   four a | groups  (a) matching set  0.77 0.97 0.40 0.90 0.57 0.89 1.670712e-29   0.63     reproduced
    rest      time          i 15+   four a | groups (b) mean of three  0.02 0.63 0.26 0.19 0.04 0.23 3.629098e-02  -0.44 not reproduced
    rest      time          i 15+   four b | groups  (a) matching set  0.76 0.97 0.28 0.90 0.49 0.89 1.776402e-19   0.53      partially
    rest      time          i 15+   four b | groups (b) mean of three  0.01 0.63 0.19 0.19 0.03 0.23 1.175378e-01  -0.44 not reproduced
    rest      time          i 15+   kmeans | kmeans  (a) matching set  0.26 0.02 0.15 0.01 0.17 0.01 2.170003e-01  -0.41 not reproduced
    rest      time          i 15+   kmeans | kmeans (b) mean of three  0.20 0.20 0.17 0.17 0.09 0.09 1.097735e-06  -0.41 not reproduced
    rest      time         ii all groups a | groups  (a) matching set  0.94 0.91 0.49 0.71 0.67 0.92 4.199108e-38   0.70     reproduced
    rest      time         ii all groups a | groups (b) mean of three  0.00 0.71 0.37 0.18 0.10 0.24 5.469896e-01  -0.43 not reproduced
    rest      time         ii all groups b | groups  (a) matching set  0.93 0.91 0.37 0.71 0.67 0.92 4.244516e-27   0.61      partially
    rest      time         ii all groups b | groups (b) mean of three  0.00 0.71 0.33 0.18 0.10 0.24 3.958366e-01  -0.43 not reproduced
    rest      time         ii all   four a | groups  (a) matching set  0.92 0.91 0.29 0.71 0.76 0.92 4.376317e-20   0.54      partially
    rest      time         ii all   four a | groups (b) mean of three  0.00 0.71 0.25 0.18 0.12 0.24 6.499623e-01  -0.43 not reproduced
    rest      time         ii all   four b | groups  (a) matching set  0.92 0.91 0.17 0.71 0.74 0.92 2.070404e-11   0.41      partially
    rest      time         ii all   four b | groups (b) mean of three  0.00 0.71 0.17 0.18 0.11 0.24 7.481806e-01  -0.43 not reproduced
    rest      time         ii all   kmeans | kmeans  (a) matching set  0.70 0.00 0.26 0.15 0.00 0.05 3.184273e-01  -0.51 not reproduced
    rest      time         ii all   kmeans | kmeans (b) mean of three  0.17 0.17 0.19 0.19 0.02 0.02 1.686258e-02  -0.43 not reproduced
    rest      time         ii 15+ groups a | groups  (a) matching set  0.93 0.89 0.64 0.71 0.67 0.92 2.402508e-57   0.80     reproduced
    rest      time         ii 15+ groups a | groups (b) mean of three  0.00 0.71 0.43 0.19 0.10 0.24 8.321848e-01  -0.43 not reproduced
    rest      time         ii 15+ groups b | groups  (a) matching set  0.92 0.89 0.51 0.71 0.67 0.92 5.433325e-41   0.72     reproduced
    rest      time         ii 15+ groups b | groups (b) mean of three  0.00 0.71 0.38 0.19 0.10 0.24 6.531606e-01  -0.43 not reproduced
    rest      time         ii 15+   four a | groups  (a) matching set  0.91 0.89 0.44 0.71 0.76 0.92 1.461749e-33   0.67     reproduced
    rest      time         ii 15+   four a | groups (b) mean of three  0.00 0.71 0.32 0.19 0.12 0.24 3.754385e-01  -0.43 not reproduced
    rest      time         ii 15+   four b | groups  (a) matching set  0.91 0.89 0.31 0.71 0.74 0.92 1.914441e-21   0.55      partially
    rest      time         ii 15+   four b | groups (b) mean of three  0.00 0.71 0.23 0.19 0.11 0.24 4.641456e-01  -0.43 not reproduced
    rest      time         ii 15+   kmeans | kmeans  (a) matching set  0.68 0.00 0.14 0.00 0.00 0.05 3.409214e-01  -0.37 not reproduced
    rest      time         ii 15+   kmeans | kmeans (b) mean of three  0.15 0.15 0.13 0.13 0.02 0.02 1.686258e-02  -0.36 not reproduced

Outcome over readings: differ by reading: not reproduced 145, partially 15, reproduced 80
Outcome counts by reading factor (240 readings):
  baseline: {'pre': {'not reproduced': 48, 'reproduced': 32}, 'whole': {'not reproduced': 48, 'reproduced': 32}, 'rest': {'not reproduced': 49, 'reproduced': 16, 'partially': 15}}
  z-scoring: {'row': {'not reproduced': 73, 'reproduced': 40, 'partially': 7}, 'time': {'not reproduced': 72, 'reproduced': 40, 'partially': 8}}
  projection: {'i': {'not reproduced': 73, 'reproduced': 40, 'partially': 7}, 'ii': {'not reproduced': 72, 'reproduced': 40, 'partially': 8}}
  CVs: {'all': {'not reproduced': 73, 'reproduced': 36, 'partially': 11}, '15+': {'not reproduced': 72, 'reproduced': 44, 'partially': 4}}
  clusters: {'groups a | groups': {'reproduced': 24, 'not reproduced': 24}, 'groups b | groups': {'not reproduced': 24, 'reproduced': 20, 'partially': 4}, 'four a | groups': {'not reproduced': 24, 'reproduced': 20, 'partially': 4}, 'four b | groups': {'not reproduced': 25, 'reproduced': 16, 'partially': 7}, 'kmeans | kmeans': {'not reproduced': 48}}
  R: {'(a) matching set': {'reproduced': 80, 'not reproduced': 25, 'partially': 15}, '(b) mean of three': {'not reproduced': 120}}
Outcomes by reading of the clusters and of R:
outcome                              not reproduced  partially  reproduced
clusters          R                                                       
four a | groups   (a) matching set                0          4          20
                  (b) mean of three              24          0           0
four b | groups   (a) matching set                1          7          16
                  (b) mean of three              24          0           0
groups a | groups (a) matching set                0          0          24
                  (b) mean of three              24          0           0
groups b | groups (a) matching set                0          4          20
                  (b) mean of three              24          0           0
kmeans | kmeans   (a) matching set               24          0           0
                  (b) mean of three              24          0           0

Result: blocked (methods_underspecified). With the phonetic groups as clusters and the matching feature set for R (constriction location for consonants, vowel features for vowels), the six R2 values lie within 0.38 to 1 with p < 1e-10 in 80 of 96 readings, are positive and significant with some below 0.38 in 15, and fail in 1 (R2 0.14 to 0.99 over these readings). With the mean of the three feature sets, or with k-means clusters at each time, the coupling fails in every reading. The readings of the claim give different outcomes, and two of them decide the split: the reading of R (with the mean of three feature sets all 120 readings fail) and the reading of the clusters (with k-means clusters all 48 readings fail, the 24 with the matching feature set among them). Every level of the baseline, z-scoring, projection and CV set has both reproduced and not reproduced readings.

suppfig13-consonant-vowel-distance¶

Consonant and vowel representations occupy distinct regions of the state-space; consonant-vowel distances are larger than consonant-consonant and vowel-vowel distances, and consonant-consonant distances are larger than vowel-vowel ones.

In [26]:
cvd = []
for base, z, pj, cs in SS_READINGS:
    for reading in ("(a) mean of cross pairings", "(b) i at -25, j at +250"):
        CC, VV, CVd = [], [], []
        for s in B.SUBJECTS:
            K = KS[s, base, z, pj, cs]
            Kc, Kv = K[:, :, tc], K[:, :, tv]
            i, j = np.triu_indices(len(Kc), 1)
            CC.append(np.linalg.norm(Kc[i] - Kc[j], axis=1))
            VV.append(np.linalg.norm(Kv[i] - Kv[j], axis=1))
            d1 = np.linalg.norm(Kc[i] - Kv[j], axis=1)
            d2 = np.linalg.norm(Kc[j] - Kv[i], axis=1)
            CVd.append((d1 + d2) / 2 if reading.startswith("(a)") else d1)
        CC, VV, CVd = map(np.concatenate, (CC, VV, CVd))
        row = {"baseline": base, "z-scoring": z, "projection": pj, "CVs": cs, "CV distance": reading, "pairs": len(CC),
               "median CC": round(np.median(CC), 2), "median VV": round(np.median(VV), 2), "median CV": round(np.median(CVd), 2)}
        ok = True
        for name, (a, b) in {"CV>CC": (CVd, CC), "CV>VV": (CVd, VV), "CC>VV": (CC, VV)}.items():
            p = min(1.0, 3 * stats.wilcoxon(a, b).pvalue)
            row[name] = f"{np.median(a - b):+.2f} p={p:.0e}"
            ok &= bool(np.median(a - b) > 0 and p < 1e-10)
        row["orderings hold"] = ok
        # The criterion defines only reproduced. A reading where the orderings hold and only the pair
        # count differs is counted as partially reproduced (the effect holds, the data differ), by the
        # protocol's general definition; one where an ordering fails, as not reproduced.
        row["outcome"] = ("reproduced" if ok and len(CC) == 4623 else "partially" if ok else "not reproduced")
        cvd.append(row)
cvd = pd.DataFrame(cvd)
print(cvd.to_string(index=False))
print("Pairs within subjects (all CVs):", {s: len(CVS[s, 'all']) * (len(CVS[s, 'all']) - 1) // 2 for s in B.SUBJECTS},
      "| 15+ CVs:", {s: len(CVS[s, '15+']) * (len(CVS[s, '15+']) - 1) // 2 for s in B.SUBJECTS}, "(paper n = 4623)")
print("Outcome over readings:", overall(cvd.outcome))
print("Readings meeting the criterion as written (orderings and n = 4623):", int(((cvd.outcome == "reproduced")).sum()), "of", len(cvd),
      "| orderings hold:", int(cvd["orderings hold"].sum()))
by_factor(cvd, ["baseline", "z-scoring", "projection", "CVs", "CV distance"])
baseline z-scoring projection CVs                CV distance  pairs  median CC  median VV  median CV         CV>CC         CV>VV         CC>VV  orderings hold        outcome
     pre       row          i all (a) mean of cross pairings   4677       8.78       5.88      10.39 +1.17 p=0e+00 +3.98 p=0e+00 +2.44 p=0e+00            True      partially
     pre       row          i all    (b) i at -25, j at +250   4677       8.78       5.88      10.28 +1.25 p=0e+00 +3.59 p=0e+00 +2.44 p=0e+00            True      partially
     pre       row          i 15+ (a) mean of cross pairings   4567       9.33       6.37      11.11 +1.33 p=0e+00 +4.33 p=0e+00 +2.65 p=0e+00            True      partially
     pre       row          i 15+    (b) i at -25, j at +250   4567       9.33       6.37      10.80 +1.41 p=0e+00 +3.87 p=0e+00 +2.65 p=0e+00            True      partially
     pre       row         ii all (a) mean of cross pairings   4677       2.53       1.45       3.27 +0.38 p=0e+00 +1.59 p=0e+00 +0.98 p=0e+00            True      partially
     pre       row         ii all    (b) i at -25, j at +250   4677       2.53       1.45       3.18 +0.46 p=0e+00 +1.45 p=0e+00 +0.98 p=0e+00            True      partially
     pre       row         ii 15+ (a) mean of cross pairings   4567       2.48       1.44       3.23 +0.37 p=0e+00 +1.58 p=0e+00 +0.97 p=0e+00            True      partially
     pre       row         ii 15+    (b) i at -25, j at +250   4567       2.48       1.44       3.13 +0.46 p=0e+00 +1.45 p=0e+00 +0.97 p=0e+00            True      partially
     pre      time          i all (a) mean of cross pairings   4677       8.52       7.38       7.97 -0.46 p=4e-38 +0.58 p=0e+00 +0.96 p=0e+00           False not reproduced
     pre      time          i all    (b) i at -25, j at +250   4677       8.52       7.38       7.96 -0.43 p=2e-18 +0.65 p=0e+00 +0.96 p=0e+00           False not reproduced
     pre      time          i 15+ (a) mean of cross pairings   4567       9.02       7.93       8.50 -0.46 p=4e-34 +0.49 p=2e-37 +0.84 p=0e+00           False not reproduced
     pre      time          i 15+    (b) i at -25, j at +250   4567       9.02       7.93       8.47 -0.41 p=9e-18 +0.58 p=9e-40 +0.84 p=0e+00           False not reproduced
     pre      time         ii all (a) mean of cross pairings   4677       2.55       1.53       3.18 +0.30 p=0e+00 +1.44 p=0e+00 +0.95 p=0e+00            True      partially
     pre      time         ii all    (b) i at -25, j at +250   4677       2.55       1.53       3.10 +0.39 p=0e+00 +1.32 p=0e+00 +0.95 p=0e+00            True      partially
     pre      time         ii 15+ (a) mean of cross pairings   4567       2.51       1.51       3.14 +0.31 p=0e+00 +1.44 p=0e+00 +0.94 p=0e+00            True      partially
     pre      time         ii 15+    (b) i at -25, j at +250   4567       2.51       1.51       3.05 +0.40 p=0e+00 +1.33 p=0e+00 +0.94 p=0e+00            True      partially
   whole       row          i all (a) mean of cross pairings   4677       8.68       5.84      10.31 +1.14 p=0e+00 +3.94 p=0e+00 +2.41 p=0e+00            True      partially
   whole       row          i all    (b) i at -25, j at +250   4677       8.68       5.84      10.18 +1.22 p=0e+00 +3.58 p=0e+00 +2.41 p=0e+00            True      partially
   whole       row          i 15+ (a) mean of cross pairings   4567       9.38       6.41      11.16 +1.33 p=0e+00 +4.34 p=0e+00 +2.67 p=0e+00            True      partially
   whole       row          i 15+    (b) i at -25, j at +250   4567       9.38       6.41      10.86 +1.41 p=0e+00 +3.90 p=0e+00 +2.67 p=0e+00            True      partially
   whole       row         ii all (a) mean of cross pairings   4677       2.33       1.36       3.06 +0.35 p=0e+00 +1.46 p=0e+00 +0.90 p=0e+00            True      partially
   whole       row         ii all    (b) i at -25, j at +250   4677       2.33       1.36       2.94 +0.43 p=0e+00 +1.34 p=0e+00 +0.90 p=0e+00            True      partially
   whole       row         ii 15+ (a) mean of cross pairings   4567       2.29       1.35       3.03 +0.34 p=0e+00 +1.45 p=0e+00 +0.89 p=0e+00            True      partially
   whole       row         ii 15+    (b) i at -25, j at +250   4567       2.29       1.35       2.89 +0.42 p=0e+00 +1.34 p=0e+00 +0.89 p=0e+00            True      partially
   whole      time          i all (a) mean of cross pairings   4677       8.47       7.39       7.93 -0.47 p=1e-36 +0.55 p=0e+00 +0.94 p=0e+00           False not reproduced
   whole      time          i all    (b) i at -25, j at +250   4677       8.47       7.39       7.95 -0.43 p=2e-17 +0.62 p=0e+00 +0.94 p=0e+00           False not reproduced
   whole      time          i 15+ (a) mean of cross pairings   4567       9.03       8.01       8.53 -0.43 p=4e-31 +0.46 p=2e-32 +0.78 p=8e-45           False not reproduced
   whole      time          i 15+    (b) i at -25, j at +250   4567       9.03       8.01       8.50 -0.38 p=2e-15 +0.56 p=2e-36 +0.78 p=8e-45           False not reproduced
   whole      time         ii all (a) mean of cross pairings   4677       2.34       1.44       2.97 +0.29 p=0e+00 +1.31 p=0e+00 +0.86 p=0e+00            True      partially
   whole      time         ii all    (b) i at -25, j at +250   4677       2.34       1.44       2.86 +0.36 p=0e+00 +1.21 p=0e+00 +0.86 p=0e+00            True      partially
   whole      time         ii 15+ (a) mean of cross pairings   4567       2.31       1.43       2.94 +0.29 p=0e+00 +1.31 p=0e+00 +0.85 p=0e+00            True      partially
   whole      time         ii 15+    (b) i at -25, j at +250   4567       2.31       1.43       2.82 +0.37 p=0e+00 +1.21 p=0e+00 +0.85 p=0e+00            True      partially
    rest       row          i all (a) mean of cross pairings   4677       9.02       6.05      10.62 +0.95 p=0e+00 +3.86 p=0e+00 +2.48 p=0e+00            True      partially
    rest       row          i all    (b) i at -25, j at +250   4677       9.02       6.05      10.38 +1.12 p=0e+00 +3.40 p=0e+00 +2.48 p=0e+00            True      partially
    rest       row          i 15+ (a) mean of cross pairings   4567       9.47       6.22      11.02 +1.09 p=0e+00 +4.13 p=0e+00 +2.70 p=0e+00            True      partially
    rest       row          i 15+    (b) i at -25, j at +250   4567       9.47       6.22      10.73 +1.19 p=0e+00 +3.66 p=0e+00 +2.70 p=0e+00            True      partially
    rest       row         ii all (a) mean of cross pairings   4677       2.78       1.65       3.62 +0.43 p=0e+00 +1.75 p=0e+00 +1.02 p=0e+00            True      partially
    rest       row         ii all    (b) i at -25, j at +250   4677       2.78       1.65       3.47 +0.54 p=0e+00 +1.54 p=0e+00 +1.02 p=0e+00            True      partially
    rest       row         ii 15+ (a) mean of cross pairings   4567       2.75       1.65       3.58 +0.41 p=0e+00 +1.75 p=0e+00 +1.03 p=0e+00            True      partially
    rest       row         ii 15+    (b) i at -25, j at +250   4567       2.75       1.65       3.43 +0.52 p=0e+00 +1.55 p=0e+00 +1.03 p=0e+00            True      partially
    rest      time          i all (a) mean of cross pairings   4677       8.66       7.58       8.25 -0.44 p=3e-33 +0.42 p=1e-35 +0.77 p=0e+00           False not reproduced
    rest      time          i all    (b) i at -25, j at +250   4677       8.66       7.58       8.16 -0.37 p=7e-15 +0.57 p=3e-42 +0.77 p=0e+00           False not reproduced
    rest      time          i 15+ (a) mean of cross pairings   4567       8.99       7.92       8.55 -0.40 p=1e-27 +0.35 p=1e-25 +0.67 p=2e-35           False not reproduced
    rest      time          i 15+    (b) i at -25, j at +250   4567       8.99       7.92       8.49 -0.32 p=1e-11 +0.46 p=2e-30 +0.67 p=2e-35           False not reproduced
    rest      time         ii all (a) mean of cross pairings   4677       2.81       1.77       3.52 +0.34 p=0e+00 +1.56 p=0e+00 +0.98 p=0e+00            True      partially
    rest      time         ii all    (b) i at -25, j at +250   4677       2.81       1.77       3.40 +0.45 p=0e+00 +1.34 p=0e+00 +0.98 p=0e+00            True      partially
    rest      time         ii 15+ (a) mean of cross pairings   4567       2.78       1.76       3.48 +0.34 p=0e+00 +1.55 p=0e+00 +0.97 p=0e+00            True      partially
    rest      time         ii 15+    (b) i at -25, j at +250   4567       2.78       1.76       3.35 +0.44 p=0e+00 +1.34 p=0e+00 +0.97 p=0e+00            True      partially
Pairs within subjects (all CVs): {'EC2': 1596, 'GP31': 1485, 'GP33': 1596} | 15+ CVs: {'EC2': 1540, 'GP31': 1431, 'GP33': 1596} (paper n = 4623)
Outcome over readings: differ by reading: not reproduced 12, partially 36
Readings meeting the criterion as written (orderings and n = 4623): 0 of 48 | orderings hold: 36
Outcome counts by reading factor (48 readings):
  baseline: {'pre': {'partially': 12, 'not reproduced': 4}, 'whole': {'partially': 12, 'not reproduced': 4}, 'rest': {'partially': 12, 'not reproduced': 4}}
  z-scoring: {'row': {'partially': 24}, 'time': {'not reproduced': 12, 'partially': 12}}
  projection: {'i': {'partially': 12, 'not reproduced': 12}, 'ii': {'partially': 24}}
  CVs: {'all': {'partially': 18, 'not reproduced': 6}, '15+': {'partially': 18, 'not reproduced': 6}}
  CV distance: {'(a) mean of cross pairings': {'partially': 18, 'not reproduced': 6}, '(b) i at -25, j at +250': {'partially': 18, 'not reproduced': 6}}

Result: blocked (methods_underspecified). Under row z-scoring, and under time z-scoring with projection (ii), consonant-vowel distances exceed consonant-consonant ones, which exceed vowel-vowel ones, with corrected p < 1e-10. Under time z-scoring with projection (i) the consonant-vowel distances are shorter than the consonant-consonant ones, in every baseline and CV set (12 of 12 readings). The number of pairs is 4677 with every CV and 4567 with CVs of 15 or more renditions, never the paper's 4623, so no reading meets the criterion as written (0 of 48). The criterion defines only reproduced; this attempt counts a reading where all orderings hold and only the pair count differs as partially reproduced (36 of 48), by the protocol's general definition of an effect that holds in part, and one where an ordering fails as not reproduced (12). The pair count is fixed by the dataset's syllables (data-composition), while the orderings depend on the z-scoring and projection readings, which the paper does not fix; the outcome is blocked for that.

suppfig9-pc-articulator-weights¶

The first three PCs are weighted toward tongue over lips, and toward lips over jaw and larynx, while jaw and larynx do not differ.

Note on the method: by Methods Eq. 6, log10|PCw_ij| = log10|M_ij| + log10|W_jA|, so for a given electrode the PC term is the same for every articulator and cancels in the paired comparisons; the tests give the same result in every PC.

In [27]:
pairs6 = list(itertools.combinations(range(4), 2))
s9 = []
for (base, cs, reading, pmode) in W_READINGS:
    for z in ZMODES:
        for eset in ("all vSMC", "GLM electrodes"):
            if eset == "all vSMC" and pmode == "t-test":
                continue    # the p-value reading only changes which electrodes are kept
            vals = []
            for s in B.SUBJECTS:
                w = WEIGHTS[base, cs, reading, pmode][s]
                M = STATE[s, base, z, cs, EP][0]
                sel = w["keep"] if eset == "GLM electrodes" else np.ones(len(w["keep"]), bool)
                vals.append(np.log10(np.abs(M[sel, :3, None] * w["W"][sel, None, :])))
            V = np.concatenate(vals)            # (electrode, PC, articulator)
            n_in = len(V)
            V = V[np.isfinite(V).all(axis=(1, 2))]   # electrodes without a window T_A for an articulator are dropped
            per_pc, meds = [], []
            for pci in range(3):
                p = {(a, b): (np.median(V[:, pci, a] - V[:, pci, b]), min(1.0, 6 * stats.wilcoxon(V[:, pci, a], V[:, pci, b]).pvalue))
                     for a, b in pairs6}

                def greater(a, b, alpha):
                    m, pv = p[(a, b)] if (a, b) in p else (-p[(b, a)][0], p[(b, a)][1])
                    return bool(m > 0 and pv < alpha)
                L, T, X, J = 0, 1, 2, 3
                ra = greater(L, J, 0.001) and greater(L, X, 0.001)
                rb = ra and greater(T, J, 0.001) and greater(T, X, 0.001)
                per_pc.append(greater(T, L, 0.05) and (ra or rb) and p[(X, J)][1] > 0.05)
                meds.append("/".join(f"{np.median(V[:, pci, a]):.2f}" for a in range(4)))
            n_ok = sum(per_pc)
            s9.append({"baseline": base, "CVs": cs, "timing reading": " / ".join(reading), "p-value": pmode, "z-scoring": z,
                       "electrodes": eset, "n": len(V), "dropped": n_in - len(V), "PC1 medians L/T/X/J": meds[0], "PCs holding": "".join("Y" if x else "n" for x in per_pc),
                       "outcome": "reproduced" if n_ok == 3 else ("partially" if n_ok else "not reproduced")})
s9 = pd.DataFrame(s9)
print(s9.to_string(index=False))
print("\nOutcome over readings:", overall(s9.outcome))
print("Electrodes dropped for lack of a window T_A: 0 in", int((s9.dropped == 0).sum()), "readings, up to", int(s9.dropped.max()),
      "| n from", int(s9.n.min()), "to", int(s9.n.max()))
base, cs, reading, pmode, z = "pre", "all", TIMING_READINGS[2], "F-test", "row"
V = np.concatenate([np.log10(np.abs(STATE[s, base, z, cs, EP][0][:, :3, None] * WEIGHTS[base, cs, reading, pmode][s]["W"][:, None, :])) for s in B.SUBJECTS])
V = V[np.isfinite(V).all(axis=(1, 2))]
for pci in range(3):
    ps = {f"{B.ARTICULATORS[a][:2]}-{B.ARTICULATORS[b][:2]}": f"{np.median(V[:, pci, a] - V[:, pci, b]):+.2f} p={min(1, 6 * stats.wilcoxon(V[:, pci, a], V[:, pci, b]).pvalue):.0e}" for a, b in pairs6}
    print(f"PC{pci + 1} ({base}, {cs}, {reading}, all vSMC, n={len(V)}): median paired differences and corrected p {ps}")
baseline CVs                            timing reading p-value z-scoring     electrodes   n  dropped     PC1 medians L/T/X/J PCs holding        outcome
     pre all         per subject / all six / threshold  F-test       row       all vSMC 185       83 -2.27/-2.47/-2.56/-2.22         nnn not reproduced
     pre all         per subject / all six / threshold  F-test       row GLM electrodes  67       36 -1.59/-2.13/-1.93/-1.42         nnn not reproduced
     pre all         per subject / all six / threshold  F-test      time       all vSMC 185       83 -2.22/-2.40/-2.47/-2.19         nnn not reproduced
     pre all         per subject / all six / threshold  F-test      time GLM electrodes  67       36 -1.64/-2.16/-1.94/-1.45         nnn not reproduced
     pre all         per subject / all six / threshold  t-test       row GLM electrodes  68       35 -1.61/-2.13/-1.99/-1.40         nnn not reproduced
     pre all         per subject / all six / threshold  t-test      time GLM electrodes  68       35 -1.66/-2.16/-1.95/-1.45         nnn not reproduced
     pre all         per subject / all six / half peak  F-test       row       all vSMC 185       83 -2.37/-2.48/-2.55/-2.33         nnn not reproduced
     pre all         per subject / all six / half peak  F-test       row GLM electrodes  55       27 -1.56/-2.06/-2.04/-1.42         nnn not reproduced
     pre all         per subject / all six / half peak  F-test      time       all vSMC 185       83 -2.29/-2.40/-2.44/-2.27         nnn not reproduced
     pre all         per subject / all six / half peak  F-test      time GLM electrodes  55       27 -1.61/-2.06/-2.09/-1.47         nnn not reproduced
     pre all         per subject / all six / half peak  t-test       row GLM electrodes  36       26 -1.38/-2.07/-2.11/-1.25         nnn not reproduced
     pre all         per subject / all six / half peak  t-test      time GLM electrodes  36       26 -1.43/-2.03/-2.14/-1.30         nnn not reproduced
     pre all per subject / per articulator / threshold  F-test       row       all vSMC 268        0 -2.34/-2.36/-2.50/-2.19         nnn not reproduced
     pre all per subject / per articulator / threshold  F-test       row GLM electrodes 110        0 -1.91/-2.10/-2.29/-1.74         nnn not reproduced
     pre all per subject / per articulator / threshold  F-test      time       all vSMC 268        0 -2.29/-2.33/-2.48/-2.19         nnn not reproduced
     pre all per subject / per articulator / threshold  F-test      time GLM electrodes 110        0 -1.89/-2.07/-2.26/-1.76         nnn not reproduced
     pre all per subject / per articulator / threshold  t-test       row GLM electrodes  92        0 -1.92/-2.08/-2.12/-1.60         nnn not reproduced
     pre all per subject / per articulator / threshold  t-test      time GLM electrodes  92        0 -1.90/-2.05/-2.10/-1.60         nnn not reproduced
     pre all per subject / per articulator / half peak  F-test       row       all vSMC 268        0 -2.37/-2.40/-2.53/-2.23         nnn not reproduced
     pre all per subject / per articulator / half peak  F-test       row GLM electrodes  75        0 -1.73/-2.00/-2.26/-1.65         nnn not reproduced
     pre all per subject / per articulator / half peak  F-test      time       all vSMC 268        0 -2.33/-2.37/-2.49/-2.21         nnn not reproduced
     pre all per subject / per articulator / half peak  F-test      time GLM electrodes  75        0 -1.78/-1.99/-2.23/-1.68         nnn not reproduced
     pre all per subject / per articulator / half peak  t-test       row GLM electrodes  58        0 -1.80/-1.99/-2.12/-1.63         nnn not reproduced
     pre all per subject / per articulator / half peak  t-test      time GLM electrodes  58        0 -1.85/-2.03/-2.16/-1.68         nnn not reproduced
     pre all              pooled / all six / threshold  F-test       row       all vSMC 185       83 -2.34/-2.43/-2.55/-2.23         nnn not reproduced
     pre all              pooled / all six / threshold  F-test       row GLM electrodes  67       34 -1.44/-2.17/-2.05/-1.41         nnn not reproduced
     pre all              pooled / all six / threshold  F-test      time       all vSMC 185       83 -2.19/-2.36/-2.50/-2.21         nnn not reproduced
     pre all              pooled / all six / threshold  F-test      time GLM electrodes  67       34 -1.48/-2.20/-2.04/-1.44         nnn not reproduced
     pre all              pooled / all six / threshold  t-test       row GLM electrodes  60       39 -1.44/-2.17/-2.02/-1.37         nnn not reproduced
     pre all              pooled / all six / threshold  t-test      time GLM electrodes  60       39 -1.46/-2.20/-2.03/-1.35         nnn not reproduced
     pre all              pooled / all six / half peak  F-test       row       all vSMC 185       83 -2.39/-2.51/-2.59/-2.30         nnn not reproduced
     pre all              pooled / all six / half peak  F-test       row GLM electrodes  51       25 -1.40/-2.20/-2.08/-1.42         nnn not reproduced
     pre all              pooled / all six / half peak  F-test      time       all vSMC 185       83 -2.25/-2.42/-2.54/-2.28         nnn not reproduced
     pre all              pooled / all six / half peak  F-test      time GLM electrodes  51       25 -1.46/-2.24/-2.12/-1.45         nnn not reproduced
     pre all              pooled / all six / half peak  t-test       row GLM electrodes  37       25 -1.39/-2.21/-2.13/-1.26         nnn not reproduced
     pre all              pooled / all six / half peak  t-test      time GLM electrodes  37       25 -1.46/-2.25/-2.16/-1.31         nnn not reproduced
     pre all      pooled / per articulator / threshold  F-test       row       all vSMC 268        0 -2.30/-2.33/-2.44/-2.20         nnn not reproduced
     pre all      pooled / per articulator / threshold  F-test       row GLM electrodes 108        0 -1.73/-2.12/-2.26/-1.63         nnn not reproduced
     pre all      pooled / per articulator / threshold  F-test      time       all vSMC 268        0 -2.23/-2.28/-2.44/-2.20         nnn not reproduced
     pre all      pooled / per articulator / threshold  F-test      time GLM electrodes 108        0 -1.77/-2.13/-2.24/-1.68         nnn not reproduced
     pre all      pooled / per articulator / threshold  t-test       row GLM electrodes 101        0 -1.77/-2.15/-2.10/-1.58         nnn not reproduced
     pre all      pooled / per articulator / threshold  t-test      time GLM electrodes 101        0 -1.81/-2.18/-2.05/-1.57         nnn not reproduced
     pre all      pooled / per articulator / half peak  F-test       row       all vSMC 268        0 -2.36/-2.38/-2.48/-2.23         nnn not reproduced
     pre all      pooled / per articulator / half peak  F-test       row GLM electrodes  73        0 -1.53/-2.07/-2.24/-1.61         nnn not reproduced
     pre all      pooled / per articulator / half peak  F-test      time       all vSMC 268        0 -2.34/-2.32/-2.47/-2.22         nnn not reproduced
     pre all      pooled / per articulator / half peak  F-test      time GLM electrodes  73        0 -1.57/-2.07/-2.26/-1.62         nnn not reproduced
     pre all      pooled / per articulator / half peak  t-test       row GLM electrodes  60        0 -1.53/-2.10/-2.10/-1.55         nnn not reproduced
     pre all      pooled / per articulator / half peak  t-test      time GLM electrodes  60        0 -1.57/-2.12/-2.13/-1.60         nnn not reproduced
     pre 15+         per subject / all six / threshold  F-test       row       all vSMC 185       83 -2.31/-2.50/-2.55/-2.25         nnn not reproduced
     pre 15+         per subject / all six / threshold  F-test       row GLM electrodes  67       47 -1.59/-2.13/-1.93/-1.41         nnn not reproduced
     pre 15+         per subject / all six / threshold  F-test      time       all vSMC 185       83 -2.21/-2.43/-2.48/-2.26         nnn not reproduced
     pre 15+         per subject / all six / threshold  F-test      time GLM electrodes  67       47 -1.64/-2.17/-1.94/-1.46         nnn not reproduced
     pre 15+         per subject / all six / threshold  t-test       row GLM electrodes  68       30 -1.62/-2.15/-1.97/-1.41         nnn not reproduced
     pre 15+         per subject / all six / threshold  t-test      time GLM electrodes  68       30 -1.65/-2.17/-1.94/-1.45         nnn not reproduced
     pre 15+         per subject / all six / half peak  F-test       row       all vSMC 185       83 -2.40/-2.48/-2.63/-2.38         nnn not reproduced
     pre 15+         per subject / all six / half peak  F-test       row GLM electrodes  55       35 -1.58/-2.06/-2.06/-1.42         nnn not reproduced
     pre 15+         per subject / all six / half peak  F-test      time       all vSMC 185       83 -2.35/-2.42/-2.47/-2.39         nnn not reproduced
     pre 15+         per subject / all six / half peak  F-test      time GLM electrodes  55       35 -1.62/-2.10/-2.10/-1.47         nnn not reproduced
     pre 15+         per subject / all six / half peak  t-test       row GLM electrodes  36       20 -1.38/-2.06/-2.08/-1.28         nnn not reproduced
     pre 15+         per subject / all six / half peak  t-test      time GLM electrodes  36       20 -1.43/-2.06/-2.16/-1.29         nnn not reproduced
     pre 15+ per subject / per articulator / threshold  F-test       row       all vSMC 268        0 -2.34/-2.39/-2.58/-2.31         nnn not reproduced
     pre 15+ per subject / per articulator / threshold  F-test       row GLM electrodes 116        0 -1.92/-2.10/-2.30/-1.72         nnn not reproduced
     pre 15+ per subject / per articulator / threshold  F-test      time       all vSMC 268        0 -2.28/-2.36/-2.55/-2.30         nnn not reproduced
     pre 15+ per subject / per articulator / threshold  F-test      time GLM electrodes 116        0 -1.89/-2.15/-2.29/-1.75         nnn not reproduced
     pre 15+ per subject / per articulator / threshold  t-test       row GLM electrodes  97        0 -1.89/-2.12/-2.23/-1.61         nnn not reproduced
     pre 15+ per subject / per articulator / threshold  t-test      time GLM electrodes  97        0 -1.86/-2.15/-2.23/-1.66         nnn not reproduced
     pre 15+ per subject / per articulator / half peak  F-test       row       all vSMC 268        0 -2.38/-2.48/-2.62/-2.38         nnn not reproduced
     pre 15+ per subject / per articulator / half peak  F-test       row GLM electrodes  81        0 -1.73/-2.09/-2.28/-1.66         nnn not reproduced
     pre 15+ per subject / per articulator / half peak  F-test      time       all vSMC 268        0 -2.36/-2.41/-2.59/-2.38         nnn not reproduced
     pre 15+ per subject / per articulator / half peak  F-test      time GLM electrodes  81        0 -1.74/-2.12/-2.34/-1.70         nnn not reproduced
     pre 15+ per subject / per articulator / half peak  t-test       row GLM electrodes  58        0 -1.67/-2.08/-2.28/-1.56         nnn not reproduced
     pre 15+ per subject / per articulator / half peak  t-test      time GLM electrodes  58        0 -1.68/-2.09/-2.30/-1.60         nnn not reproduced
     pre 15+              pooled / all six / threshold  F-test       row       all vSMC 185       83 -2.27/-2.42/-2.53/-2.27         nnn not reproduced
     pre 15+              pooled / all six / threshold  F-test       row GLM electrodes  71       44 -1.49/-2.04/-1.98/-1.41         nnn not reproduced
     pre 15+              pooled / all six / threshold  F-test      time       all vSMC 185       83 -2.18/-2.39/-2.51/-2.23         nnn not reproduced
     pre 15+              pooled / all six / threshold  F-test      time GLM electrodes  71       44 -1.48/-2.08/-2.02/-1.45         nnn not reproduced
     pre 15+              pooled / all six / threshold  t-test       row GLM electrodes  71       36 -1.55/-2.08/-1.98/-1.41         nnn not reproduced
     pre 15+              pooled / all six / threshold  t-test      time GLM electrodes  71       36 -1.53/-2.13/-2.01/-1.45         nnn not reproduced
     pre 15+              pooled / all six / half peak  F-test       row       all vSMC 185       83 -2.40/-2.46/-2.61/-2.36         nnn not reproduced
     pre 15+              pooled / all six / half peak  F-test       row GLM electrodes  58       32 -1.44/-2.16/-2.05/-1.43         nnn not reproduced
     pre 15+              pooled / all six / half peak  F-test      time       all vSMC 185       83 -2.30/-2.42/-2.50/-2.38         nnn not reproduced
     pre 15+              pooled / all six / half peak  F-test      time GLM electrodes  58       32 -1.49/-2.16/-2.08/-1.49         nnn not reproduced
     pre 15+              pooled / all six / half peak  t-test       row GLM electrodes  39       24 -1.35/-2.03/-2.06/-1.24         nnn not reproduced
     pre 15+              pooled / all six / half peak  t-test      time GLM electrodes  39       24 -1.44/-2.06/-2.18/-1.28         nnn not reproduced
     pre 15+      pooled / per articulator / threshold  F-test       row       all vSMC 268        0 -2.32/-2.31/-2.56/-2.33         nnn not reproduced
     pre 15+      pooled / per articulator / threshold  F-test       row GLM electrodes 117        0 -1.59/-2.07/-2.19/-1.66         nnn not reproduced
     pre 15+      pooled / per articulator / threshold  F-test      time       all vSMC 268        0 -2.26/-2.27/-2.51/-2.30         nnn not reproduced
     pre 15+      pooled / per articulator / threshold  F-test      time GLM electrodes 117        0 -1.67/-2.06/-2.20/-1.71         nnn not reproduced
     pre 15+      pooled / per articulator / threshold  t-test       row GLM electrodes 100        0 -1.51/-2.07/-2.00/-1.59         nnn not reproduced
     pre 15+      pooled / per articulator / threshold  t-test      time GLM electrodes 100        0 -1.56/-2.06/-2.01/-1.63         nnn not reproduced
     pre 15+      pooled / per articulator / half peak  F-test       row       all vSMC 268        0 -2.39/-2.39/-2.58/-2.37         nnn not reproduced
     pre 15+      pooled / per articulator / half peak  F-test       row GLM electrodes  86        0 -1.53/-2.04/-2.12/-1.59         nnn not reproduced
     pre 15+      pooled / per articulator / half peak  F-test      time       all vSMC 268        0 -2.29/-2.33/-2.55/-2.38         nnn not reproduced
     pre 15+      pooled / per articulator / half peak  F-test      time GLM electrodes  86        0 -1.53/-1.99/-2.16/-1.62         nnn not reproduced
     pre 15+      pooled / per articulator / half peak  t-test       row GLM electrodes  61        0 -1.45/-2.09/-2.16/-1.56         nnn not reproduced
     pre 15+      pooled / per articulator / half peak  t-test      time GLM electrodes  61        0 -1.46/-2.11/-2.13/-1.60         nnn not reproduced
   whole all         per subject / all six / threshold  F-test       row       all vSMC 185       83 -2.31/-2.52/-2.57/-2.25         nnn not reproduced
   whole all         per subject / all six / threshold  F-test       row GLM electrodes  71       36 -1.63/-2.16/-2.06/-1.44         nnn not reproduced
   whole all         per subject / all six / threshold  F-test      time       all vSMC 185       83 -2.26/-2.40/-2.53/-2.26         nnn not reproduced
   whole all         per subject / all six / threshold  F-test      time GLM electrodes  71       36 -1.75/-2.17/-2.07/-1.50         nnn not reproduced
   whole all         per subject / all six / threshold  t-test       row GLM electrodes  65       30 -1.62/-2.14/-2.06/-1.42         nnn not reproduced
   whole all         per subject / all six / threshold  t-test      time GLM electrodes  65       30 -1.72/-2.16/-2.05/-1.42         nnn not reproduced
   whole all         per subject / all six / half peak  F-test       row       all vSMC 185       83 -2.40/-2.47/-2.61/-2.34         nnn not reproduced
   whole all         per subject / all six / half peak  F-test       row GLM electrodes  48       29 -1.54/-2.06/-2.22/-1.44         nnn not reproduced
   whole all         per subject / all six / half peak  F-test      time       all vSMC 185       83 -2.36/-2.41/-2.52/-2.30         nnn not reproduced
   whole all         per subject / all six / half peak  F-test      time GLM electrodes  48       29 -1.56/-2.07/-2.26/-1.47         nnn not reproduced
   whole all         per subject / all six / half peak  t-test       row GLM electrodes  32       26 -1.39/-2.08/-2.29/-1.26         nnn not reproduced
   whole all         per subject / all six / half peak  t-test      time GLM electrodes  32       26 -1.40/-2.05/-2.32/-1.30         nnn not reproduced
   whole all per subject / per articulator / threshold  F-test       row       all vSMC 268        0 -2.32/-2.37/-2.51/-2.18         nnn not reproduced
   whole all per subject / per articulator / threshold  F-test       row GLM electrodes 105        0 -1.80/-2.10/-2.28/-1.64         nnn not reproduced
   whole all per subject / per articulator / threshold  F-test      time       all vSMC 268        0 -2.30/-2.28/-2.50/-2.15         nnn not reproduced
   whole all per subject / per articulator / threshold  F-test      time GLM electrodes 105        0 -1.85/-2.11/-2.24/-1.68         nnn not reproduced
   whole all per subject / per articulator / threshold  t-test       row GLM electrodes  93        0 -1.80/-2.16/-2.18/-1.51         nnn not reproduced
   whole all per subject / per articulator / threshold  t-test      time GLM electrodes  93        0 -1.85/-2.12/-2.15/-1.57         nnn not reproduced
   whole all per subject / per articulator / half peak  F-test       row       all vSMC 268        0 -2.39/-2.36/-2.59/-2.29         nnn not reproduced
   whole all per subject / per articulator / half peak  F-test       row GLM electrodes  72        0 -1.59/-2.12/-2.32/-1.60         nnn not reproduced
   whole all per subject / per articulator / half peak  F-test      time       all vSMC 268        0 -2.36/-2.34/-2.55/-2.24         nnn not reproduced
   whole all per subject / per articulator / half peak  F-test      time GLM electrodes  72        0 -1.64/-2.11/-2.36/-1.66         nnn not reproduced
   whole all per subject / per articulator / half peak  t-test       row GLM electrodes  53        0 -1.59/-2.17/-2.31/-1.59         nnn not reproduced
   whole all per subject / per articulator / half peak  t-test      time GLM electrodes  53        0 -1.64/-2.20/-2.28/-1.57         nnn not reproduced
   whole all              pooled / all six / threshold  F-test       row       all vSMC 185       83 -2.38/-2.43/-2.57/-2.26         nnn not reproduced
   whole all              pooled / all six / threshold  F-test       row GLM electrodes  71       35 -1.45/-2.16/-2.06/-1.46         nnn not reproduced
   whole all              pooled / all six / threshold  F-test      time       all vSMC 185       83 -2.27/-2.34/-2.52/-2.26         nnn not reproduced
   whole all              pooled / all six / threshold  F-test      time GLM electrodes  71       35 -1.53/-2.16/-2.09/-1.51         nnn not reproduced
   whole all              pooled / all six / threshold  t-test       row GLM electrodes  61       35 -1.44/-2.18/-2.05/-1.39         nnn not reproduced
   whole all              pooled / all six / threshold  t-test      time GLM electrodes  61       35 -1.45/-2.20/-2.03/-1.38         nnn not reproduced
   whole all              pooled / all six / half peak  F-test       row       all vSMC 185       83 -2.39/-2.49/-2.61/-2.32         nnn not reproduced
   whole all              pooled / all six / half peak  F-test       row GLM electrodes  58       27 -1.47/-2.21/-2.05/-1.45         nnn not reproduced
   whole all              pooled / all six / half peak  F-test      time       all vSMC 185       83 -2.31/-2.43/-2.56/-2.30         nnn not reproduced
   whole all              pooled / all six / half peak  F-test      time GLM electrodes  58       27 -1.54/-2.24/-2.13/-1.48         nnn not reproduced
   whole all              pooled / all six / half peak  t-test       row GLM electrodes  38       23 -1.41/-2.21/-2.03/-1.28         nnn not reproduced
   whole all              pooled / all six / half peak  t-test      time GLM electrodes  38       23 -1.47/-2.23/-2.15/-1.32         nnn not reproduced
   whole all      pooled / per articulator / threshold  F-test       row       all vSMC 268        0 -2.34/-2.38/-2.49/-2.24         nnn not reproduced
   whole all      pooled / per articulator / threshold  F-test       row GLM electrodes 106        0 -1.78/-2.12/-2.26/-1.65         nnn not reproduced
   whole all      pooled / per articulator / threshold  F-test      time       all vSMC 268        0 -2.27/-2.35/-2.50/-2.20         nnn not reproduced
   whole all      pooled / per articulator / threshold  F-test      time GLM electrodes 106        0 -1.79/-2.13/-2.29/-1.70         nnn not reproduced
   whole all      pooled / per articulator / threshold  t-test       row GLM electrodes 100        0 -1.78/-2.14/-2.18/-1.61         nnn not reproduced
   whole all      pooled / per articulator / threshold  t-test      time GLM electrodes 100        0 -1.84/-2.16/-2.12/-1.60         nnn not reproduced
   whole all      pooled / per articulator / half peak  F-test       row       all vSMC 268        0 -2.39/-2.37/-2.53/-2.29         nnn not reproduced
   whole all      pooled / per articulator / half peak  F-test       row GLM electrodes  73        0 -1.57/-2.11/-2.20/-1.61         nnn not reproduced
   whole all      pooled / per articulator / half peak  F-test      time       all vSMC 268        0 -2.36/-2.36/-2.52/-2.25         nnn not reproduced
   whole all      pooled / per articulator / half peak  F-test      time GLM electrodes  73        0 -1.63/-2.09/-2.23/-1.68         nnn not reproduced
   whole all      pooled / per articulator / half peak  t-test       row GLM electrodes  60        0 -1.55/-2.07/-2.09/-1.56         nnn not reproduced
   whole all      pooled / per articulator / half peak  t-test      time GLM electrodes  60        0 -1.59/-2.08/-2.16/-1.58         nnn not reproduced
   whole 15+         per subject / all six / threshold  F-test       row       all vSMC 185       83 -2.36/-2.52/-2.61/-2.29         nnn not reproduced
   whole 15+         per subject / all six / threshold  F-test       row GLM electrodes  70       41 -1.64/-2.19/-2.08/-1.44         nnn not reproduced
   whole 15+         per subject / all six / threshold  F-test      time       all vSMC 185       83 -2.26/-2.44/-2.54/-2.29         nnn not reproduced
   whole 15+         per subject / all six / threshold  F-test      time GLM electrodes  70       41 -1.71/-2.17/-2.10/-1.49         nnn not reproduced
   whole 15+         per subject / all six / threshold  t-test       row GLM electrodes  63       25 -1.60/-2.19/-2.08/-1.41         nnn not reproduced
   whole 15+         per subject / all six / threshold  t-test      time GLM electrodes  63       25 -1.63/-2.17/-2.09/-1.42         nnn not reproduced
   whole 15+         per subject / all six / half peak  F-test       row       all vSMC 185       83 -2.45/-2.48/-2.66/-2.38         nnn not reproduced
   whole 15+         per subject / all six / half peak  F-test       row GLM electrodes  48       30 -1.54/-2.06/-2.24/-1.44         nnn not reproduced
   whole 15+         per subject / all six / half peak  F-test      time       all vSMC 185       83 -2.36/-2.43/-2.56/-2.40         nnn not reproduced
   whole 15+         per subject / all six / half peak  F-test      time GLM electrodes  48       30 -1.56/-2.10/-2.29/-1.46         nnn not reproduced
   whole 15+         per subject / all six / half peak  t-test       row GLM electrodes  32       21 -1.39/-2.08/-2.31/-1.27         nnn not reproduced
   whole 15+         per subject / all six / half peak  t-test      time GLM electrodes  32       21 -1.40/-2.08/-2.32/-1.30         nnn not reproduced
   whole 15+ per subject / per articulator / threshold  F-test       row       all vSMC 268        0 -2.30/-2.39/-2.64/-2.29         nnn not reproduced
   whole 15+ per subject / per articulator / threshold  F-test       row GLM electrodes 114        0 -1.89/-2.11/-2.34/-1.69         nnn not reproduced
   whole 15+ per subject / per articulator / threshold  F-test      time       all vSMC 268        0 -2.29/-2.35/-2.58/-2.30         nnn not reproduced
   whole 15+ per subject / per articulator / threshold  F-test      time GLM electrodes 114        0 -1.87/-2.15/-2.28/-1.77         nnn not reproduced
   whole 15+ per subject / per articulator / threshold  t-test       row GLM electrodes  95        0 -1.75/-2.18/-2.25/-1.57         nnn not reproduced
   whole 15+ per subject / per articulator / threshold  t-test      time GLM electrodes  95        0 -1.75/-2.26/-2.22/-1.63         nnn not reproduced
   whole 15+ per subject / per articulator / half peak  F-test       row       all vSMC 268        0 -2.38/-2.43/-2.65/-2.39         nnn not reproduced
   whole 15+ per subject / per articulator / half peak  F-test       row GLM electrodes  78        0 -1.59/-2.14/-2.32/-1.67         nnn not reproduced
   whole 15+ per subject / per articulator / half peak  F-test      time       all vSMC 268        0 -2.36/-2.42/-2.61/-2.40         nnn not reproduced
   whole 15+ per subject / per articulator / half peak  F-test      time GLM electrodes  78        0 -1.65/-2.15/-2.39/-1.71         nnn not reproduced
   whole 15+ per subject / per articulator / half peak  t-test       row GLM electrodes  54        0 -1.53/-2.15/-2.24/-1.59         nnn not reproduced
   whole 15+ per subject / per articulator / half peak  t-test      time GLM electrodes  54        0 -1.55/-2.17/-2.23/-1.62         nnn not reproduced
   whole 15+              pooled / all six / threshold  F-test       row       all vSMC 185       83 -2.28/-2.38/-2.56/-2.33         nnn not reproduced
   whole 15+              pooled / all six / threshold  F-test       row GLM electrodes  69       47 -1.49/-2.03/-2.02/-1.45         nnn not reproduced
   whole 15+              pooled / all six / threshold  F-test      time       all vSMC 185       83 -2.23/-2.31/-2.52/-2.31         nnn not reproduced
   whole 15+              pooled / all six / threshold  F-test      time GLM electrodes  69       47 -1.53/-2.08/-2.05/-1.49         nnn not reproduced
   whole 15+              pooled / all six / threshold  t-test       row GLM electrodes  72       39 -1.57/-2.03/-2.01/-1.45         nnn not reproduced
   whole 15+              pooled / all six / threshold  t-test      time GLM electrodes  72       39 -1.59/-2.10/-2.04/-1.49         nnn not reproduced
   whole 15+              pooled / all six / half peak  F-test       row       all vSMC 185       83 -2.41/-2.41/-2.64/-2.37         nnn not reproduced
   whole 15+              pooled / all six / half peak  F-test       row GLM electrodes  58       31 -1.46/-2.19/-2.07/-1.46         nnn not reproduced
   whole 15+              pooled / all six / half peak  F-test      time       all vSMC 185       83 -2.32/-2.45/-2.53/-2.40         nnn not reproduced
   whole 15+              pooled / all six / half peak  F-test      time GLM electrodes  58       31 -1.55/-2.14/-2.10/-1.51         nnn not reproduced
   whole 15+              pooled / all six / half peak  t-test       row GLM electrodes  34       22 -1.38/-2.10/-2.14/-1.36         nnn not reproduced
   whole 15+              pooled / all six / half peak  t-test      time GLM electrodes  34       22 -1.41/-2.09/-2.25/-1.36         nnn not reproduced
   whole 15+      pooled / per articulator / threshold  F-test       row       all vSMC 268        0 -2.34/-2.40/-2.59/-2.31         nnn not reproduced
   whole 15+      pooled / per articulator / threshold  F-test       row GLM electrodes 116        0 -1.60/-2.17/-2.25/-1.68         nnn not reproduced
   whole 15+      pooled / per articulator / threshold  F-test      time       all vSMC 268        0 -2.29/-2.33/-2.54/-2.27         nnn not reproduced
   whole 15+      pooled / per articulator / threshold  F-test      time GLM electrodes 116        0 -1.69/-2.19/-2.20/-1.76         nnn not reproduced
   whole 15+      pooled / per articulator / threshold  t-test       row GLM electrodes  99        0 -1.57/-2.18/-2.13/-1.60         nnn not reproduced
   whole 15+      pooled / per articulator / threshold  t-test      time GLM electrodes  99        0 -1.59/-2.21/-2.12/-1.64         nnn not reproduced
   whole 15+      pooled / per articulator / half peak  F-test       row       all vSMC 268        0 -2.38/-2.41/-2.58/-2.40         nnn not reproduced
   whole 15+      pooled / per articulator / half peak  F-test       row GLM electrodes  86        0 -1.54/-2.14/-2.17/-1.63         nnn not reproduced
   whole 15+      pooled / per articulator / half peak  F-test      time       all vSMC 268        0 -2.33/-2.38/-2.59/-2.40         nnn not reproduced
   whole 15+      pooled / per articulator / half peak  F-test      time GLM electrodes  86        0 -1.59/-2.11/-2.18/-1.68         nnn not reproduced
   whole 15+      pooled / per articulator / half peak  t-test       row GLM electrodes  55        0 -1.45/-2.24/-2.19/-1.59         nnn not reproduced
   whole 15+      pooled / per articulator / half peak  t-test      time GLM electrodes  55        0 -1.50/-2.27/-2.19/-1.63         nnn not reproduced
    rest all         per subject / all six / threshold  F-test       row       all vSMC 185       83 -2.31/-2.30/-2.54/-2.24         nnn not reproduced
    rest all         per subject / all six / threshold  F-test       row GLM electrodes  68       34 -1.54/-2.01/-2.00/-1.40         nnn not reproduced
    rest all         per subject / all six / threshold  F-test      time       all vSMC 185       83 -2.25/-2.28/-2.45/-2.15         nnn not reproduced
    rest all         per subject / all six / threshold  F-test      time GLM electrodes  68       34 -1.61/-2.06/-2.06/-1.45         nnn not reproduced
    rest all         per subject / all six / threshold  t-test       row GLM electrodes  70       33 -1.59/-2.00/-2.05/-1.39         nnn not reproduced
    rest all         per subject / all six / threshold  t-test      time GLM electrodes  70       33 -1.67/-2.00/-2.03/-1.44         nnn not reproduced
    rest all         per subject / all six / half peak  F-test       row       all vSMC 185       83 -2.36/-2.37/-2.57/-2.34         nnn not reproduced
    rest all         per subject / all six / half peak  F-test       row GLM electrodes  49       26 -1.48/-2.02/-2.12/-1.42         nnn not reproduced
    rest all         per subject / all six / half peak  F-test      time       all vSMC 185       83 -2.27/-2.32/-2.50/-2.28         nnn not reproduced
    rest all         per subject / all six / half peak  F-test      time GLM electrodes  49       26 -1.51/-2.09/-2.15/-1.42         nnn not reproduced
    rest all         per subject / all six / half peak  t-test       row GLM electrodes  33       20 -1.35/-1.99/-2.17/-1.21         nnn not reproduced
    rest all         per subject / all six / half peak  t-test      time GLM electrodes  33       20 -1.34/-2.08/-2.21/-1.29         nnn not reproduced
    rest all per subject / per articulator / threshold  F-test       row       all vSMC 268        0 -2.28/-2.37/-2.44/-2.16         nnn not reproduced
    rest all per subject / per articulator / threshold  F-test       row GLM electrodes  99        0 -1.81/-2.12/-2.13/-1.65         nnn not reproduced
    rest all per subject / per articulator / threshold  F-test      time       all vSMC 268        0 -2.22/-2.33/-2.42/-2.13         nnn not reproduced
    rest all per subject / per articulator / threshold  F-test      time GLM electrodes  99        0 -1.89/-2.13/-2.11/-1.69         nnn not reproduced
    rest all per subject / per articulator / threshold  t-test       row GLM electrodes  96        0 -1.94/-2.14/-2.10/-1.49         nnn not reproduced
    rest all per subject / per articulator / threshold  t-test      time GLM electrodes  96        0 -1.95/-2.17/-2.03/-1.59         nnn not reproduced
    rest all per subject / per articulator / half peak  F-test       row       all vSMC 268        0 -2.32/-2.38/-2.46/-2.20         nnn not reproduced
    rest all per subject / per articulator / half peak  F-test       row GLM electrodes  71        0 -1.65/-2.06/-2.10/-1.62         nnn not reproduced
    rest all per subject / per articulator / half peak  F-test      time       all vSMC 268        0 -2.30/-2.33/-2.45/-2.15         nnn not reproduced
    rest all per subject / per articulator / half peak  F-test      time GLM electrodes  71        0 -1.64/-2.09/-2.15/-1.62         nnn not reproduced
    rest all per subject / per articulator / half peak  t-test       row GLM electrodes  57        0 -1.57/-2.18/-2.09/-1.55         nnn not reproduced
    rest all per subject / per articulator / half peak  t-test      time GLM electrodes  57        0 -1.58/-2.15/-2.07/-1.60         nnn not reproduced
    rest all              pooled / all six / threshold  F-test       row       all vSMC 185       83 -2.28/-2.29/-2.48/-2.28         nnn not reproduced
    rest all              pooled / all six / threshold  F-test       row GLM electrodes  67       26 -1.45/-2.03/-1.98/-1.40         nnn not reproduced
    rest all              pooled / all six / threshold  F-test      time       all vSMC 185       83 -2.21/-2.24/-2.46/-2.21         nnn not reproduced
    rest all              pooled / all six / threshold  F-test      time GLM electrodes  67       26 -1.46/-2.11/-2.02/-1.43         nnn not reproduced
    rest all              pooled / all six / threshold  t-test       row GLM electrodes  66       28 -1.46/-2.05/-1.98/-1.38         nnn not reproduced
    rest all              pooled / all six / threshold  t-test      time GLM electrodes  66       28 -1.46/-2.14/-1.98/-1.40         nnn not reproduced
    rest all              pooled / all six / half peak  F-test       row       all vSMC 185       83 -2.37/-2.32/-2.53/-2.30         nnn not reproduced
    rest all              pooled / all six / half peak  F-test       row GLM electrodes  52       22 -1.40/-2.06/-2.00/-1.42         nnn not reproduced
    rest all              pooled / all six / half peak  F-test      time       all vSMC 185       83 -2.29/-2.28/-2.48/-2.24         nnn not reproduced
    rest all              pooled / all six / half peak  F-test      time GLM electrodes  52       22 -1.48/-2.10/-2.07/-1.43         nnn not reproduced
    rest all              pooled / all six / half peak  t-test       row GLM electrodes  37       20 -1.38/-2.03/-1.98/-1.23         nnn not reproduced
    rest all              pooled / all six / half peak  t-test      time GLM electrodes  37       20 -1.46/-2.05/-2.10/-1.34         nnn not reproduced
    rest all      pooled / per articulator / threshold  F-test       row       all vSMC 268        0 -2.31/-2.33/-2.48/-2.19         nnn not reproduced
    rest all      pooled / per articulator / threshold  F-test       row GLM electrodes 105        0 -1.92/-2.11/-2.17/-1.64         nnn not reproduced
    rest all      pooled / per articulator / threshold  F-test      time       all vSMC 268        0 -2.26/-2.27/-2.45/-2.14         nnn not reproduced
    rest all      pooled / per articulator / threshold  F-test      time GLM electrodes 105        0 -1.90/-2.12/-2.10/-1.67         nnn not reproduced
    rest all      pooled / per articulator / threshold  t-test       row GLM electrodes  95        0 -1.95/-2.13/-2.11/-1.48         nnn not reproduced
    rest all      pooled / per articulator / threshold  t-test      time GLM electrodes  95        0 -1.99/-2.15/-2.08/-1.58         nnn not reproduced
    rest all      pooled / per articulator / half peak  F-test       row       all vSMC 268        0 -2.31/-2.34/-2.49/-2.19         nnn not reproduced
    rest all      pooled / per articulator / half peak  F-test       row GLM electrodes  75        0 -1.70/-2.13/-2.15/-1.58         nnn not reproduced
    rest all      pooled / per articulator / half peak  F-test      time       all vSMC 268        0 -2.29/-2.29/-2.48/-2.14         nnn not reproduced
    rest all      pooled / per articulator / half peak  F-test      time GLM electrodes  75        0 -1.71/-2.13/-2.21/-1.63         nnn not reproduced
    rest all      pooled / per articulator / half peak  t-test       row GLM electrodes  52        0 -1.55/-2.18/-2.11/-1.44         nnn not reproduced
    rest all      pooled / per articulator / half peak  t-test      time GLM electrodes  52        0 -1.57/-2.16/-2.12/-1.55         nnn not reproduced
    rest 15+         per subject / all six / threshold  F-test       row       all vSMC 268        0 -2.30/-2.35/-2.54/-2.22         nnn not reproduced
    rest 15+         per subject / all six / threshold  F-test       row GLM electrodes 106        0 -1.60/-2.14/-2.12/-1.59         nnn not reproduced
    rest 15+         per subject / all six / threshold  F-test      time       all vSMC 268        0 -2.25/-2.30/-2.47/-2.19         nnn not reproduced
    rest 15+         per subject / all six / threshold  F-test      time GLM electrodes 106        0 -1.67/-2.19/-2.16/-1.67         nnn not reproduced
    rest 15+         per subject / all six / threshold  t-test       row GLM electrodes  93        0 -1.57/-2.01/-2.18/-1.52         nnn not reproduced
    rest 15+         per subject / all six / threshold  t-test      time GLM electrodes  93        0 -1.63/-2.06/-2.18/-1.61         nnn not reproduced
    rest 15+         per subject / all six / half peak  F-test       row       all vSMC 268        0 -2.36/-2.44/-2.57/-2.23         nnn not reproduced
    rest 15+         per subject / all six / half peak  F-test       row GLM electrodes  74        0 -1.52/-2.17/-2.20/-1.58         nnn not reproduced
    rest 15+         per subject / all six / half peak  F-test      time       all vSMC 268        0 -2.29/-2.41/-2.54/-2.24         nnn not reproduced
    rest 15+         per subject / all six / half peak  F-test      time GLM electrodes  74        0 -1.53/-2.20/-2.23/-1.65         nnn not reproduced
    rest 15+         per subject / all six / half peak  t-test       row GLM electrodes  52        0 -1.44/-2.12/-2.21/-1.47         nnn not reproduced
    rest 15+         per subject / all six / half peak  t-test      time GLM electrodes  52        0 -1.41/-2.15/-2.26/-1.53         nnn not reproduced
    rest 15+ per subject / per articulator / threshold  F-test       row       all vSMC 268        0 -2.28/-2.38/-2.50/-2.19         nnn not reproduced
    rest 15+ per subject / per articulator / threshold  F-test       row GLM electrodes  99        0 -1.78/-2.15/-2.26/-1.57         nnn not reproduced
    rest 15+ per subject / per articulator / threshold  F-test      time       all vSMC 268        0 -2.23/-2.31/-2.48/-2.16         nnn not reproduced
    rest 15+ per subject / per articulator / threshold  F-test      time GLM electrodes  99        0 -1.87/-2.15/-2.31/-1.61         nnn not reproduced
    rest 15+ per subject / per articulator / threshold  t-test       row GLM electrodes  94        0 -1.84/-2.16/-2.28/-1.49         nnn not reproduced
    rest 15+ per subject / per articulator / threshold  t-test      time GLM electrodes  94        0 -1.89/-2.16/-2.31/-1.58         nnn not reproduced
    rest 15+ per subject / per articulator / half peak  F-test       row       all vSMC 268        0 -2.35/-2.42/-2.51/-2.23         nnn not reproduced
    rest 15+ per subject / per articulator / half peak  F-test       row GLM electrodes  71        0 -1.61/-2.21/-2.20/-1.59         nnn not reproduced
    rest 15+ per subject / per articulator / half peak  F-test      time       all vSMC 268        0 -2.30/-2.36/-2.52/-2.24         nnn not reproduced
    rest 15+ per subject / per articulator / half peak  F-test      time GLM electrodes  71        0 -1.60/-2.16/-2.26/-1.65         nnn not reproduced
    rest 15+ per subject / per articulator / half peak  t-test       row GLM electrodes  52        0 -1.54/-2.27/-2.27/-1.47         nnn not reproduced
    rest 15+ per subject / per articulator / half peak  t-test      time GLM electrodes  52        0 -1.56/-2.28/-2.27/-1.54         nnn not reproduced
    rest 15+              pooled / all six / threshold  F-test       row       all vSMC 268        0 -2.26/-2.31/-2.50/-2.21         nnn not reproduced
    rest 15+              pooled / all six / threshold  F-test       row GLM electrodes 102        0 -1.52/-2.06/-2.11/-1.59         nnn not reproduced
    rest 15+              pooled / all six / threshold  F-test      time       all vSMC 268        0 -2.21/-2.27/-2.48/-2.20         nnn not reproduced
    rest 15+              pooled / all six / threshold  F-test      time GLM electrodes 102        0 -1.56/-2.11/-2.15/-1.64         nnn not reproduced
    rest 15+              pooled / all six / threshold  t-test       row GLM electrodes  96        0 -1.53/-1.96/-2.09/-1.58         nnn not reproduced
    rest 15+              pooled / all six / threshold  t-test      time GLM electrodes  96        0 -1.56/-2.08/-2.13/-1.63         nnn not reproduced
    rest 15+              pooled / all six / half peak  F-test       row       all vSMC 268        0 -2.35/-2.42/-2.54/-2.24         nnn not reproduced
    rest 15+              pooled / all six / half peak  F-test       row GLM electrodes  78        0 -1.49/-2.13/-2.14/-1.51         nnn not reproduced
    rest 15+              pooled / all six / half peak  F-test      time       all vSMC 268        0 -2.32/-2.35/-2.49/-2.21         nnn not reproduced
    rest 15+              pooled / all six / half peak  F-test      time GLM electrodes  78        0 -1.53/-2.14/-2.17/-1.60         nnn not reproduced
    rest 15+              pooled / all six / half peak  t-test       row GLM electrodes  57        0 -1.43/-2.12/-2.14/-1.48         nnn not reproduced
    rest 15+              pooled / all six / half peak  t-test      time GLM electrodes  57        0 -1.46/-2.12/-2.21/-1.60         nnn not reproduced
    rest 15+      pooled / per articulator / threshold  F-test       row       all vSMC 268        0 -2.29/-2.38/-2.51/-2.23         nnn not reproduced
    rest 15+      pooled / per articulator / threshold  F-test       row GLM electrodes  99        0 -1.50/-2.12/-2.17/-1.57         nnn not reproduced
    rest 15+      pooled / per articulator / threshold  F-test      time       all vSMC 268        0 -2.22/-2.30/-2.46/-2.20         nnn not reproduced
    rest 15+      pooled / per articulator / threshold  F-test      time GLM electrodes  99        0 -1.53/-2.14/-2.16/-1.61         nnn not reproduced
    rest 15+      pooled / per articulator / threshold  t-test       row GLM electrodes  90        0 -1.47/-2.15/-2.12/-1.48         nnn not reproduced
    rest 15+      pooled / per articulator / threshold  t-test      time GLM electrodes  90        0 -1.49/-2.13/-2.10/-1.59         nnn not reproduced
    rest 15+      pooled / per articulator / half peak  F-test       row       all vSMC 268        0 -2.35/-2.43/-2.54/-2.24         nnn not reproduced
    rest 15+      pooled / per articulator / half peak  F-test       row GLM electrodes  71        0 -1.44/-2.19/-2.25/-1.50         nnn not reproduced
    rest 15+      pooled / per articulator / half peak  F-test      time       all vSMC 268        0 -2.29/-2.37/-2.52/-2.21         nnn not reproduced
    rest 15+      pooled / per articulator / half peak  F-test      time GLM electrodes  71        0 -1.46/-2.21/-2.29/-1.60         nnn not reproduced
    rest 15+      pooled / per articulator / half peak  t-test       row GLM electrodes  49        0 -1.38/-2.25/-2.25/-1.44         nnn not reproduced
    rest 15+      pooled / per articulator / half peak  t-test      time GLM electrodes  49        0 -1.41/-2.28/-2.25/-1.45         nnn not reproduced

Outcome over readings: not reproduced
Electrodes dropped for lack of a window T_A: 0 in 168 readings, up to 83 | n from 32 to 268
PC1 (pre, all, ('per subject', 'per articulator', 'threshold'), all vSMC, n=268): median paired differences and corrected p {'Li-To': '+0.03 p=1e+00', 'Li-La': '+0.13 p=1e-03', 'Li-Ja': '-0.08 p=1e-01', 'To-La': '+0.09 p=3e-02', 'To-Ja': '-0.14 p=2e-04', 'La-Ja': '-0.28 p=5e-11'}
PC2 (pre, all, ('per subject', 'per articulator', 'threshold'), all vSMC, n=268): median paired differences and corrected p {'Li-To': '+0.03 p=1e+00', 'Li-La': '+0.13 p=1e-03', 'Li-Ja': '-0.08 p=1e-01', 'To-La': '+0.09 p=3e-02', 'To-Ja': '-0.14 p=2e-04', 'La-Ja': '-0.28 p=5e-11'}
PC3 (pre, all, ('per subject', 'per articulator', 'threshold'), all vSMC, n=268): median paired differences and corrected p {'Li-To': '+0.03 p=1e+00', 'Li-La': '+0.13 p=1e-03', 'Li-Ja': '-0.08 p=1e-01', 'To-La': '+0.09 p=3e-02', 'To-Ja': '-0.14 p=2e-04', 'La-Ja': '-0.28 p=5e-11'}

Result: not reproduced. Under all 288 readings the condition fails in all three PCs. In the reading printed in full (all 268 vSMC electrodes, pre, every CV), the tongue weights are not larger than the lips weights (median paired difference of log10 weights, lips minus tongue, +0.03, corrected p = 1), and jaw and larynx differ (corrected p = 5e-11). The input projected does not enter this test, which uses the PCs only. Electrodes without a window T_A for an articulator are dropped: none in 168 readings, up to 83 in the others (GP31 lacks a tongue window in some timing readings), leaving 32 to 268 electrodes.

Summary¶

Claim Outcome
data-composition partially reproduced
active-electrodes blocked: methods_underspecified
fig1c-e-articulator-electrodes blocked: metadata_insufficient
fig1f-h-phonetic-contrasts not reproduced
fig2a-lips-dorsal blocked: metadata_insufficient
fig2b-somatotopic-sequence blocked: metadata_insufficient
suppfig3b-spatial-clustering blocked: metadata_insufficient
suppfig3d-cross-subject blocked: metadata_insufficient
suppfig3f-dv-sequence blocked: metadata_insufficient
suppfig5-intermediate-organization blocked: metadata_insufficient
suppfig6-mixed-tuning reproduced
fig3d-timing-sequence not reproduced
suppfig7-no-latency-difference blocked: metadata_insufficient
pca-nine-components blocked: methods_underspecified
fig4a-consonant-clusters blocked: methods_underspecified
suppfig11-co-clustering blocked: methods_underspecified
fig4c-d-hierarchy blocked: methods_underspecified
fig4ef-feature-correlations blocked: methods_underspecified
fig5c-separability-timing not reproduced
fig5d-separability-coupling blocked: methods_underspecified
suppfig13-consonant-vowel-distance blocked: methods_underspecified
suppfig9-pc-articulator-weights not reproduced

A failure to reproduce here may be a failure of this attempt, not of the paper: see the reasoning and the differences from the paper's method.

How the analysis differs from the paper's. High gamma is computed here from the raw ECoG, as the Methods describe, with a filter bank whose widths the paper does not give (a standard choice) and with the dataset's bad-channel flags in place of the paper's inspection. The baseline for the z-scores is not given by the paper; the three readings of the claims file are run, the rest period the dataset marks among them. vSMC electrodes are those labelled precentral or postcentral (268, against the paper's 266). The acoustic onset of fig3d is the hand-marked syllable start, a substitute the criterion allows as a deviation since the audio is not in the dandiset; the result against t = 0 has the same outcome. The questions asked by this attempt were answered from the paper, which fixes none of the details asked about: whether CVs with fewer than 15 renditions are kept, how the state-space input is z-scored, and which input is projected onto the PCs are all left open, and every reading is run. The blocked outcomes of active-electrodes and of the state-space claims other than fig5d come from these readings giving different results; the paper cannot settle them. That of fig5d comes from the claims file's readings of R and of the clusters, which split it at every level of the readings above. The GLM weights used by fig1f-h, suppfig6 and suppfig9 come from claim fig2a-lips-dorsal, which is blocked for its spatial judgement only; the weights need no positions, so these claims are tested. Two variants that are not readings of the claims file are shown beside the results: leaving out trials that overlap intervals marked as ECoG artifacts (active-electrodes, fig3d), and the suppfig6 test on permuted weights.

What was found about the dataset. It holds four subjects; EC2, GP31 and GP33 fit the paper's EC2, EC31 and EC33 (assumed, not shown), and EC9 is not in the paper. The audio was removed. No electrode has a position relative to the central sulcus or the Sylvian fissure, and one of the three subjects (GP33) has no coordinates at all, so seven spatial findings cannot be tested. The coordinates of EC2 and GP31 have no unit or frame. GP31 has two renditions of /thi/ and none of /tha/ or /thu/, and up to 107 renditions of other CVs; EC2 has 10 of /thi/; the paper states 15 to 100 per CV. Two labels are misspelt (she, ha). Electrode ids start at 0 in EC2 and GP31 and at 1 in GP33 and EC9. 162 of the 9370 kept trials overlap intervals marked as ECoG artifacts, and leaving them out moves the active-electrode count of the one reading within tolerance out of it. The subject fields hold only species and id, and nothing links GP31 and GP33 to the paper's EC31 and EC33; GP33's electrode group is auto_group. One file (EC2 block 1) holds a power spectrum in a processing module.

In [28]:
print(f"notebook ran in {(time.time() - started) / 60:.1f} min")
notebook ran in 21.7 min