## 2 Materials and Methods
### Non-Negative CCA and Estimation of Coefficients  
Figure 1 is an overview of the analysis of the relationships between the immune cell infiltration and mutational signatures. The basic methods and the estimation of the coefficients were proposed by [PERSON] et al., and the experiments were carried out using the R package nscancor 0.6.1-25 [25; 33], followed by regularization using L2-norm. The non-negative CCA approach to capture the relationships between mutational signatures and immune cell infiltration is outlined as follows: \begin{table}
\begin{tabular}{l c} \hline \hline
**Tumor Type** & **Samples** \\ \hline Bladder urothelial carcinoma (BLCA) & 409 \\ Breast invasive carcinoma (BRCA) & 974 \\ Cervical squamous cell carcinoma and endocervical adenocarcinoma (CESC) & 287 \\ Colon adenocarcinoma (COAD) & 397 \\ Esophageal carcinoma (ESCA) & 161 \\ Glioblastoma multiforme (GBM) & 150 \\ Head and neck squamous cell carcinoma (HNSC) & 494 \\ Kidney renal clear cell carcinoma (KIRC) & 333 \\ Kidney renal papillary cell carcinoma (KIRP) & 279 \\ Brain lower grade glioma (LGG) & 504 \\ Liver hepatocellular carcinoma (LIHC) & 360 \\ Lung adenocarcinoma (LUAD) & 510 \\ Lung squamous cell carcinoma (LUSC) & 490 \\ Ovarian serous cystadenocarcinoma (OV) & 273 \\ Pancreatic adenocarcinoma (PAAD) & 170 \\ Pheochromocytoma and paragaglioma (PCPG) & 179 \\ Prostate adenocarcinoma (PRAD) & 493 \\ Rectum adenocarcinoma (READ) & 134 \\ Sarcoma (SARC) & 236 \\ Skin cutaneous melanoma (SKCM) & 466 \\ Stomach adenocarcinoma (STAD) & 373 \\ Testicular germ cell tumors (TGCT) & 145 \\ Thyroid carcinoma (THCA) & 488 \\ Thymoma (THYM) & 119 \\ Uterine corpus endometrial carcinoma (UCEC) & 527 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Tumor types and the number of samples used in the experiments. The traditional CCA finds relationships between two multidimensional variables to maximize their correlation with the linear combination as follows:  
\[\underset{\omega,\beta}{\operatorname{argmax}}\,corr(\omega\text{A},\beta\text{M}) \tag{1}\]  
where A and M are the matrices of the cell subtype abundance and mutational signatures, respectively. \(\omega\) and \(\beta\) are coefficient vectors for the linear projections of the two variables. The main objective of the CCA is to detect the coefficient vectors \(\omega\) and \(\beta\) that maximize the correlation between \(\omega\)A and \(\beta\)M using linear projections. The optimal solution for CCA can be discovered by the direct transformation to a generalized eigenvalue problem [34]. However, in contrast to the conventional CCA, in this study, \(\omega\) and \(\beta\) must be equal to or larger than zero for the non-negative constraint. Thus, \(\omega\) and \(\beta\) were determined using an iterative regression solver based on a least-squares formulation that was extended using regularization techniques [25, 35, 36, 37]. The optimization problem in Equation (1) can be reformulated equivalently using the following equation:  
\[(\hat{\omega},\hat{\beta})=\underset{\omega,\beta}{\operatorname{argmin}}\,|| \omega\text{A}-\beta\text{M}||^{2}. \tag{2}\]  
Equation (1) was converted to a problem to search for a minimum distance in a projection space using the linear transformation of A and M, similar to finding the coefficients using the least-squares methods in a linear regression problem. For a given value of \(\hat{\omega}\), Equation (2) can be optimized by finding the minimum mean-squared error for the regression coefficients \(\beta\) as follows:  
\[\hat{\beta}=\underset{\beta}{\operatorname{argmin}}\,||\hat{\omega}\text{A}- \beta\text{M}||^{2}. \tag{3}\]  
In Equation (3), \(\hat{\beta}\) is estimated using the following rescaling step:  
\[\hat{\beta}:=\frac{\hat{\beta}}{||\hat{\beta}\text{M}||}. \tag{4}\]  
For example, at the (\(t\)+1)th iteration step, \(\hat{\omega}^{t}\) is a constant, and a regression step is performed to estimate the coefficient \(\hat{\beta}^{t+1}\).