Skip to main content
. Author manuscript; available in PMC: 2023 Sep 8.
Published in final edited form as: Nat Comput Sci. 2023 Mar 27;3(3):240–253. doi: 10.1038/s43588-023-00419-0

Fig. 4 |. HMM procedure and analysis.

Fig. 4 |

a, Nested cross-validation procedure for hyperparameter tuning. The HMM is trained on the average data for N2 subjects to find K stable patterns of voxel activation, where the voxel patterns P for each time point belong to a given hidden state S.K is tuned according to model fit on subject N1 (folding over all of the iterations of N1 train/test splits) and then the best K value across the folds is applied to the validation subject N. This procedure is repeated for all subjects (see the ‘Optimizing the number of neural events’ section in Methods for more information). Event boundaries (dashed lines) are identified by the model as time points at a transition between hidden states. For dimensionality-reduced approaches, M is learned with leave-one-subject-out cross-validation, within embedding method and ROI (see the ‘Optimizing the manifold dimensionality’ section in Methods for more information). b. Left: event boundaries are learned both from the data (by applying the HMM on voxel resolution or embedded time-series data and applying those boundaries either within or across subjects) and from independent sources such as human behavioral ratings. Right: representation of dynamic information in a latent space is quantified by applying event boundaries to embedded data. Data emphasize brain-state transitions if the boundaries maximize the difference between brain activity at time points within- versus between-events. For each time point t0 in the time-series, we correlated the activation pattern across features at t0 with that of t1 and t2 such that t1 is in the same event as t0 (within a dashed box) and t2 is in a different event. The within- versus between-event correlation difference score is the subtraction of corrt2,t0 from corrt0,t1. To account for intrinsically higher correlations of proximal time points, we restricted comparisons to where t0t1=t0t2. Here, corrt0,t1 is denoted by a darker colored box and its corresponding corrt2,t0 by a lighter shade, where both t2 and t1 are d time-steps from t0. Pink, green, and orange boxes indicate time points when d=1,2, and 3, repsectively.