## 2 Materials and Methods
### Evaluation Metrics
#### Novel Contributions  
_Efficacy of graph kernels_: This study systematically investigates the robustness of different graph kernels (WL, Random Walk, Graphlet) in capturing latent metastable structures in EEG connectivity. _Koopman spectral operators for EEG_: The proposed integration of Koopman spectral operators with graph kernels is a novel approach, offering linear embeddings for complex EEG dynamics. _Cost-sensitive learning was found robust enough_ to handle class imbalance as it improved performance scores. _Explainability of features_: The workflow provides interpretable insights into brain connectivity patterns by visualising metastable clusters and Koopman eigenfunctions. **Significance and need for investigation--**The proposed workflow represents a significant advancement in EEG analysis. This methodology leverages advanced techniques in graph-based representation, Koopman operator theory, and cost-sensitive learning to address the challenges of EEG analysis, including class imbalance and the complexity of neural dynamics. Combining graph kernels and Koopman spectral operators, it addresses critical gaps in the literature, including the need for robust latent pattern learning and feature interpretability. The systematic evaluation of graph kernels for estimating metastructures of connectivity further contributes to the field, offering a novel and robust framework for EEG datasets. The proposed workflow is presented in Figure 1.  
Algorithm 1 presents the complete workflow implemented for the present work. 1. Compute top-k-connectivity for time-embedded vectors representing time-embedded graphs. 2. Conduct training of Connect. 3. Estimate Koopman features using graph Koopman kernel embedding described in Algorithm 2. 4. Perform ensemble learning of combinations of [Koopman-embedding graph kernels, classifiers] for M subjects. Analyse the average accuracy outcomes and recommend the optimal combination of the graph kernel and classifier. 5. Explain the metastable connectivity substructures using spectral analysis of the Koopman eigenfunctions and metastable clusters for samples from each cognitive-state category. Figure 1: The proposed workflow. For Step 1, the connectivity matrices were computed using the correlation coefficient measure. Top-k-correlation thresholding was applied following the workflow described in [24] to address the sparsity of connectivity. Graph Koopman kernel embedding for multivariate time series data-The Graph Koopman kernel embedding algorithm combines the dynamics of nonlinear systems represented by graphs with kernel methods to provide a linear perspective on the system's evolution. By approximating the Koopman operator and performing eigendecomposition, one can gain insights into the underlying dynamics and structure of the system. The steps typically involved are presented in Algorithm 2. ```
Step 1. Data preparation--For a given time-series \(X_{t}\in\mathbb{R}^{NXd}\), where \(N\) is the number of nodes and \(d\) is the dimension of features at time \(t\), compute the graph structure in terms of the adjacency matrix. Step 2. Kernel computation--Choose a kernel function \(k\big{(}x_{i,t},\ x_{j,t}\big{)}\) and calculate the kernel matrix \(K_{t}\) at each time \(t\) using the chosen kernel function. \[K_{t}(i,j)=k\big{(}x_{i,t},\ x_{j,t}\big{)}\] Step 3. Graph embedding-- i. Compute the graph Laplacian \(L=D-A\), where \(D\) is the degree matrix. ii. Compute the graph embedding \(Z_{t}\) by solving the generalised eigenvalue problem for \(L\) and \(K_{t}\) as \[LZ_{t}=\lambda K_{t}Z_{t}\] Step 4. Koopman operator approximation--Using DMD described in Algorithm 3. Step 5. Eigendecomposition of Koopman operator
6. Visual analysis--Graph embedding visualisation, eigenvalues visualisation, Dynamic Modes Visualisation.