2.5 Prediction model
We utilized a family of regularized Ridge Regression (RR) models to
predict brain activity during the immediate flanker task using the EEG
data collected during the preceding picture-naming trials. RR is a
widely employed parameter estimation technique for addressing linear
regression challenges characterized by multicollinearity, offering
robustness against noise (Engemann et al., 2020; Meir-Hasson et al.,
2014). Following EEG data preprocessing during language processing to
align with flanker task standards, a series of RR models were
implemented. Initially, 48 electrodes were retained and averaged after
removal of electrodes with high impedance from the outer circle.
Subsequently, EEG activity for each participant across
language-switching contexts (forced, natural, and voluntary switching)
and subsequent flanker tasks (congruent, incongruent) was isolated for
each trial, condition (switch-congruent, switch-incongruent,
non-switch-congruent, non-switch-incongruent), and time point (within
the 0-500 ms window).
Due to the absolute autonomy of language selection in the voluntary
switching context, the trial count under each condition was not uniform.
Thus, averaging was performed across the trial dimensions for the three
contexts, resulting in a three-dimensional matrix of 4 (conditions) × 29
(participants) × 500 (time points). Next, the condition and participant
dimensions were merged to yield a matrix of 116 × 500, with the initial
58 × 500 serving as the training set and the subsequent 58 × 500
constituting the test set. Model training involved employing
bootstrapping to determine the optimal alpha value for each response.
Specifically, 50 of the 58 matrix data were randomly sampled from the
training set for model training, and the remaining 8 were used for
validation. Fifteen rounds of cross-validation were executed to
ascertain the best alpha value for each response. Upon determining the
optimal alpha value, model weights were acquired. Utilizing the language
task test set 58 × 500 (independent variable X ) as input and the
weight multiplication of the trained model, the predicted EEG signal of
the flanker task (i.e., the predicted value, ŷ ) was obtained. To
validate the fit of the model, Pearson’s correlation analyses were
conducted between the predicted brain activity (i.e., ŷ ) during
the flanker task and the actual amplitude data (i.e., y ) of the
flanker task at each time point. A higher r -value indicates
better prediction performance. In essence, utilizing coding activity
from language-switching tasks as the independent variable X , we
predicted the corresponding processing of the flanker tasks (i.e.,
dependent variable y ), yielding ridge correlation coefficients.
These coefficients, reflecting the correlation between language
processing and executive control processing, address the second question
of this study: the influence of different switching modes on executive
control, particularly which type of executive advantage predominates.