text:
Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

# Development and validation of a prognostic and predictive 32-gene signature for gastric cancer

## Abstract

Genomic profiling can provide prognostic and predictive information to guide clinical care. Biomarkers that reliably predict patient response to chemotherapy and immune checkpoint inhibition in gastric cancer are lacking. In this retrospective analysis, we use our machine learning algorithm NTriPath to identify a gastric-cancer specific 32-gene signature. Using unsupervised clustering on expression levels of these 32 genes in tumors from 567 patients, we identify four molecular subtypes that are prognostic for survival. We then built a support vector machine with linear kernel to generate a risk score that is prognostic for five-year overall survival and validate the risk score using three independent datasets. We also find that the molecular subtypes predict response to adjuvant 5-fluorouracil and platinum therapy after gastrectomy and to immune checkpoint inhibitors in patients with metastatic or recurrent disease. In sum, we show that the 32-gene signature is a promising prognostic and predictive biomarker to guide the clinical care of gastric cancer patients and should be validated using large patient cohorts in a prospective manner.

## Background

Genomic profiling provides prognostic and predictive information about tumor biology that can guide clinical care and improve treatment selection for cancer patients1,2,3,4,5. Systemic therapies are an essential component of the treatment regimen for most gastric cancer patients. However, many patients do not derive benefit from the potentially toxic therapies. For example, fluoropyrimidine-platinum doublet is standard of care therapy in the adjuvant setting; however, it only confers an approximate 9% improvement in long-term survival6. Thus, biomarkers that predict patient response to chemotherapy are needed to improve treatment precision. We recently reported a single patient classifier system for resectable gastric cancer based on the expression of four genes that is prognostic and predictive of response to fluorouracil-based adjuvant chemotherapy7. However, refined risk and treatment stratification tools for gastric cancer are needed to include novel therapies for patients at advanced stage and in the palliative setting, such as immune checkpoint inhibitors.

Recent large-scale next-generation sequencing and molecular profiling efforts have elucidated the genomic landscape of gastric cancer8,9. However, the mutational cataloging of cancer genomes fails to incorporate functional analyses of gene-gene interaction and signaling pathway dynamics, and thus risks missing a potentially rich source of prognostic information10. We previously developed a machine learning algorithm, NTriPath, that integrates pan-cancer somatic mutation data, gene-gene interaction networks, and pathway databases to identify prognostic cancer-associated molecular pathways11. We have used NTriPath to identify prognostic gene signatures for renal cell carcinoma, bladder carcinoma, head and neck squamous cell carcinoma, and melanoma11.

In this study, we applied NTriPath to identify key gastric adenocarcinoma-specific pathways. Then, we generated gene expression profiles of gastric cancer and used the NTriPath genetic signatures to define four distinct molecular subtypes. We tested the prognostic utility of these genetic signatures and built a molecular subtype-based risk scoring model to predict overall survival and response to chemotherapy and immune checkpoint blockade. Finally, we validated our model in multiple independent cohorts.

## Results

### Identification of a prognostic 32-gene signature and molecular subtypes

The workflow to identify, test, and validate prognostic and predictive biomarkers in gastric cancer is presented in Fig. 1. The somatic mutation profiles of 6681 patients from 19 different cancer types published by The Cancer Genome Atlas (TCGA) were analyzed (Supplementary Table S1). This data was inputted into NTriPath and pathways that were specifically altered in gastric cancers were identified. To investigate the prognostic utility of these gastric-cancer-specific pathways, we generated microarray-based mRNA expression profiles from pre-treatment tumor samples from 567 patients who underwent resection at Severance Hospital, Yonsei University College of Medicine. 89% of the patients had stage II or III disease and the median duration of follow-up was 61 months (Supplementary Data 1).

We previously found that the top three pathways identified by NTriPath yielded the most prognostic utility11. The top three gastric cancer-specific pathways consisted of 32 genes including TP53, BRCA1, MSH6, PARP1, and ACTA2, which were enriched for DNA damage response, TGF-ß signaling, and cell proliferation pathways (Supplementary Fig. S1, Supplementary Table S2, and Supplementary Data 2). We performed consensus clustering of the 567-patient Yonsei cohort based on the expression level of the 32 genes and found four distinct molecular subtypes based on consensus cumulative distribution function (CDF) plot and delta area plot as well as manual inspection of the consensus matrices (Fig. 2A and Supplementary Fig. S2). Tumors from Group 1 patients overexpressed genes associated with the cell cycle and DNA repair while cancers from Group 4 patients overexpressed genes found in TGF-β, SMAD, estrogen signaling, and mesenchymal morphogenesis pathways. Tumors from Group 3 patients overexpressed genes found in apoptosis signaling and cell proliferation pathways. Tumors from Group 2 did not show a distinct pattern of overexpressed genes.

In univariate analysis, molecular subtypes correlated significantly with differences in age (P = 0.003), stage (P = 0.021), Lauren type (P < 0.001), and perineural invasion (P < 0.001) (Table 1). Patients in Group 1 and Group 2 were older and were more likely to have tumors with intestinal-type histology. Patients in Group 4 had tumors that were more likely to have diffuse-type histology and perineural invasion (Table 1). Finally, significant differences in overall survival were observed between groups; Group 1 patients had the best outcome with the group not reaching median overall survival, while Group 4 patients had the worst outcome with a median overall survival of 65 months (Fig. 2B; P < 0.001).

Previous studies showed that tumors associated with Epstein–Barr virus (EBV) infection and microsatellite instability (MSI) are associated with improved patient outcomes12,13. We found that there were no differences in the proportion of tumors by that were EBV-positive or MSI (Table 1). Multivariable Cox proportional-hazard analyses using variables that were significant on univariable analysis showed that age, stage, and molecular subtype were independently associated with risk of death (Table 2). To address possible bias resulting from variable selection, we also conducted a regularized Cox regression and found similar results (Supplementary Tables S3 and S4). These findings demonstrate that the 32-gene signature was prognostic independent of clinical and pathologic variables known to correlate with outcomes.

We previously identified 5 transcriptomic-based molecular subtypes that predicted survival7. In that report, the inflammatory subgroup had the best prognosis, the mesenchymal subgroup had the worst prognosis, and the other 3 groups had intermediate outcomes and overlapped with each other. We compared the two classification schemes and found that each of the 32-gene groups were generally represented in all 5 molecular subtypes (Supplementary Table S5). There was an enrichment of mesenchymal group patients, who had the worst prognosis, in Group 4, which also had the worst survival. However, even in this situation, only 45.7% of mesenchymal group patients were in Group 4. Finally, when we repeated the multivariate analysis that included the other classification scheme, we found that the 32-gene subtyping continued to associate with overall survival (Supplementary Table S6).

We also compared the 32-gene signature to the classification system published by the Asian Cancer Research Group (ACRG; n = 300)14. We found that Group 4 (worst survival) was particularly enriched in the MSS/EMT group (worst survival). Group 1 (best survival) was also enriched for MSI (best survival) but 45% of MSI samples were found in Groups 2–4, so it was not a direct correlation. Finally, the MSS/TP53+ and MSS/TP53− groups were even more evenly distributed across Groups 1–4. Thus, the 32-gene signature is not simply a recapitulation of previous classification systems and provides new prognostic information.

### Machine learning to identify a risk score to predict five-year overall survival

We then sought to leverage the prognostic capability of the 32-gene signature into a clinically relevant tool that will allow clinicians to estimate the probability of five-year overall survival for gastric cancer patients. Using the Yonsei cohort as a training set, we built a binary classifier using support vector machine (SVM) with linear kernel. The SVM model was trained using Groups 1 and 4. Group 1, which had the best prognosis, was given a negative label and Group 4, which had the worst prognosis, a positive label. We next sought the validate the SVM model using data published by the ACRG (Gene Expression Omnibus: GSE62254)14, Sohn et al. (n = 267; Gene Expression Omnibus: GSE13861 and GSE26942)13, and The Cancer Genome Atlas15. We found that risk score was prognostic of five-year overall survival (Fig. 2C, Supplementary Fig. S3, Supplementary Data 35). Importantly, we found that the risk score was prognostic independent of clinical and pathologic features known to be associated with worse outcomes across all datasets (Table 3 and Supplementary Tables S79). These results demonstrated that the machine learning-derived risk score based on the 32-gene signature predicts the probability of five-year overall survival in gastric cancer patients.

### Molecular subtypes predict responses to systemic therapies

We next investigated whether the molecular subtypes predict response to systemic therapies. The Yonsei cohort included patients who were treated prior to the establishment of adjuvant chemotherapy as standard of care. Thus, we were able to compare patients who underwent surgery alone to patients who received one of three adjuvant chemotherapy regimens: 5-fluorouracil (5-FU) monotherapy, 5-FU and platinum doublet, or 5-FU plus another class of systemic therapy. We performed multivariable Cox proportional hazard analyses of overall survival and included adjuvant chemotherapy regimens, cancer stage, age, lymphovascular invasion and perineural invasion as covariates, within each genetic subgroup (Supplementary Table S10). We found that the 18 Group 3 patients treated with 5-FU plus platinum showed significantly better overall survival compared to the 28 Group 3 patients who did not receive adjuvant chemotherapy (hazard ratio (HR), 0.28 (95% CI, 0.08–0.96), P = 0.043). In contrast, the 12 Group 1 patients treated with 5-FU plus platinum had worse survival than the 26 Group 1 patients who did not receive adjuvant therapy (HR, 6.80 (95% CI, 1.46–31.6), P = 0.015), (Fig. 3). Receipt of therapy was not associated with survival differences in Group 2 and 4 patients. This data suggests that molecular subtype predicts response to adjuvant chemotherapy.

To determine whether the molecular subtypes also predicted response to immune checkpoint inhibitors, we analyzed samples from patients with recurrent or metastatic gastric cancer treated with immune checkpoint inhibitors. We included 45 patients published by Kim et al.16 and 45 patients treated at our institutions for a final cohort of 90 patients. Response Evaluation Criteria in Solid Tumors (RECIST) criteria was used to group patients either as responders if they had a complete or partial radiographic response or non-responders if they had stable or progressive disease. The tumor sample from each patient was analyzed with RNA-sequencing. We built the multiclass classifier using SVMs with linear kernel trained with the Yonsei four molecular subtypes. Each patient was classified into one of the four molecular subtypes based on the 32-gene signature by the SVM model. We observed a much higher response rate to pembrolizumab in Group 1 (10 of 21; 48%) and Group 3 (7 of 14; 50%) than in Group 2 (2 of 24; 8%) and Group 5 (4 of 31; 13%) patients (P = 0.001; Fig. 4). This showed that molecular subtype also predicts response to immune checkpoint blockade in patients with recurrent or metastatic gastric cancer.

## Discussion

The use of next-generation sequencing has elucidated the genomic landscape of a wide variety of cancers17. In select tumor types, mutational profiling provides prognostic and predictive information that guides therapy1,2,3,4,5. However, the simple cataloging of somatic mutations fails to capture the downstream effects of gene-gene interactions and altered pathways that play essential functional roles in cancer biology. Thus, we postulated that a potentially rich source of prognostic and predictive information has largely been overlooked. We previously showed that the integration of known molecular interaction networks with somatic mutation data via the machine learning tool we developed, NTriPath, yields prognostic information for renal cell carcinoma, bladder carcinoma, head and neck squamous cell carcinoma, and melanoma11. In this study, we validated this approach for gastric cancer, a disease for which there are few biomarkers available. We generated a molecular subtyping scheme based on the expression of 32 genes that comprised the top three altered pathways specific to gastric cancer. We found that the 32-gene signature predicted both overall survival and response to treatments. Thus, generating the molecular signature from tissue samples obtained at the time of diagnosis may provide clinically important information for prognostication and treatment planning.

We used machine learning to develop a genetic risk score that predicted five-year overall survival. Significantly, the risk score was generated by training on a patient cohort from one of our institutions that allowed for the use of highly granular clinical data, with long-term follow-up. We then validated the risk score in multiple large independent cohorts of gastric cancer patients. The current gold standard for risk stratification of cancer patients is pathologic staging, which is only possible after surgical resection. To complement conventional staging modalities in the preoperative setting, our genetic risk score is an objective measure to estimate risk and represents a powerful new risk stratification tool that has the potential to optimize treatment choice and sequence, on an individualized basis. Our promising results should be validated in a prospective manner.

There are currently few predictive biomarkers to guide treatment choices for gastric cancer patients. Patients with gastric cancers with HER2 amplification benefit from trastuzumab, but this is only applicable for a small proportion of patients18. Similarly, while Pietrantonio et al. recently showed that patients with resectable gastric cancer with MSI tumors did not benefit from chemotherapy as compared to surgery alone19, only 5–10% of gastric cancers are MSI8. In terms of checkpoint inhibitors, therapy is most often guided by MSI status and PD-L1 expression, but their predictive capability is modest20. For example, the KEYNOTE-061 study found that pembrolizumab did not improve the overall survival of gastric cancer patients, including patients whose tumors had high PD-L1 expression21. Our 32-gene assay has the potential to augment currently available biomarkers and improve the precision of gastric cancer care. We found that Group 3 patients were the only ones who demonstrated improved survival associated with adjuvant 5-FU and platinum-based chemotherapy, while Group 1 patients had worse survival associated with adjuvant 5-FU and platinum. Our findings are potentially widely applicable as fluoropyridine and platinum-based regimens are first-line therapy for patients with regional and metastatic disease, with which most patients present, especially in the West6,12,22,23.

Significantly, we also found that the molecular classification is associated with response to immune checkpoint inhibitors as Groups 1 and 3 patients demonstrated significantly higher response rates than patients in Groups 2 and 4. Importantly, we did not find that MSI-H tumors were overrepresented in Groups 1 and 3. Intriguingly, Group 3 patients demonstrated a good response rate to both 5-FU and platinum doublet chemotherapy as well as anti-PD-1 treatments. Consideration may be given to a clinical trial combining all three agents in this patient population. Meanwhile, even though Group 1 patients had the best prognosis, the use of 5-FU and platinum therapy was associated with worse outcomes. For these patients, consideration may be given to treatment with immune checkpoint blockade, to which these patients demonstrated significant response.

Our findings build upon our previous work that identified a genetic classifier that was prognostic and predictive of response to adjuvant chemotherapy in stage II and III patients7. Thus, our previous study and current report demonstrate that comprehensive genomic profiling of gastric cancer can provide clinically impactful information to guide therapy. However, our current study is limited by the retrospective nature of our analysis that may be confounded by selection bias. For example, our training set was based on samples obtained before adjuvant chemotherapy was standard of care. Thus, the decision to refer a patient for post-operative chemotherapy versus observation are unknown. Future validation studies of the utility of the 32-gene signature to predict response to both 5-FU and platinum therapy and immune checkpoint inhibitors are needed to confirm our findings, which are based on modest-sized cohorts. Ideally, these future studies are performed in a prospective fashion. Next, while we showed that the molecular classifier was associated with increased response to immune checkpoint inhibitors, response may not accurately predict overall survival. Thus, the prognostic and predictive utility of the molecular classification scheme should be validated prospectively using the most clinically relevant endpoints, such as overall survival and/or quality of life. Finally, the molecular mechanisms underpinning the prognostic and predictive power of the 32-gene signature are important topics for future study.

## Methods

### Patient cohorts

The study was approved by the Institutional Review Board of the College of Medicine at Yonsei University and the Catholic University of Korea. We analyzed samples from 567 gastric adenocarcinoma patients who underwent surgical resection at Yonsei University (Seoul, Korea) from 1999 to 2010, 28 patients treated at Seoul St. Mary’s Hospital (Seoul, Korea) from 2018 to 2020, and 17 patients from Yonsei (Seoul, Korea) from 2014 to 2017. We also examined data from cohorts previously published by The Cancer Genome Atlas Project (TCGA)15, Asian Cancer Research Group (ACRG)9, Sohn et al.13, and Kim et al.16.

### NTriPath identifies gastric cancer-associated pathways

The bioinformatics tool NTriPath uses somatic mutation profiles, pathway databases, and gene-gene interaction networks to identify cancer-type-specific associated pathways11. We inputted somatic mutation data of 6681 patients across 19 cancer types from the TCGA via cBioPortal on October 24th 201424. We constructed a gene-gene interaction network by combining networks described by Zhang et al.25. We used 4620 functional modules from human gene-gene interaction networks as a pathway database26. NTriPath yields cancer type and pathway associations that can be used to identify cancer type-specific altered pathways. In the exploratory study with the Yonsei cohort, we conducted a pathway analysis using gene set enrichment analysis to identify gastric cancer-specific biological pathways that are enriched in a list of genes selected by NTriPath27. Statistical analysis was performed with PANTHER (Protein ANalysis THrough Evolutionary Relationships) Classification System using Fisher exact test with false discovery rate (FDR) < 0.05 (http://www.pantherdb.org) for gene set enrichment28.

To measure the statistical significance of gastric cancer type and pathway associations, we performed a permutation test where we randomly permuted somatic mutation data and repeated experiments 1000 times to calculate empirical p values. We defined gastric cancer type-specific altered pathways based on the following strict criteria: (1) pathways must be ranked within the top Kth compared to other pathways in each cancer type based on their association scores in matrix S and (2) pathways must have significant Benjamini–Hochberg adjusted P values using an FDR cutoff of 0.05. In this work, we used the top 5 ranked pathways that had an FDR-adjusted P value < 0.05 to identify gastric cancer-specific altered pathways.

NTriPath source code with input datasets are available at the following link: https://github.com/hwanglab/NTriPath.

### Preprocessing of gene expression data

We generated gene expression profiles of 567 gastric cancer patients treated at Yonsei University using Illumina Human-6 V2 Expression BeadChips. Raw microarray data were transformed to the log2 base scale and then were preprocessed by quantile normalization using quantilenorm function in MATLAB R2018b. The expression level of each gene was obtained by averaging multiple probes from the same gene. Genes that had missing values were excluded. This processed data was used to perform consensus clustering to identify patient subgroups.

The raw sequencing data for the Kim et al.16 cohort was accessed via the European Nucleotide Archive (accession number PRJEB25780). For patients treated at Seoul St Mary’s Hospital, we used Illumina TrueSeq RNA Exome library kit and generated 2x150 bp paired-end reads. In the datasets, the mean insert length is 125 base pairs. An average of 143.7 million paired-end reads were sequenced per patient. We then processed the Kim et al.16 and St. Mary’s datasets. After Illumina universal adapters were trimmed, reads with lower quality bases or noninformative reads were filtered out by Fastp v0.20.1 (with the input parameters: '-y -c'). The RNA-seq reads were converted to transcriptome abundant matrix in the format of TPM (Transcripts Per Kilobase Million) via Salmon v0.14.1 (with the input parameters: '--validateMappings --libType A') The Salmon reference genome sequence index was built on human reference transcript sequences (GRCm37.v19) with the gene model, Gencode v19.

### Unsupervised consensus clustering using top-ranked gastric cancer-associated pathways

To investigate the prognostic utility of top-ranked gastric cancer-associated pathway signatures generated by NTriPath, we performed consensus clustering using non-negative matrix factorization (NMF). This was performed with the expression profiles of the 567 Yonsei cohort patients and the member genes of top-ranked gastric cancer-associated pathways with various numbers of subgroups (k = 2–7).

We first performed consensus NMF clustering based on expression of the 32 member genes of the top three ranked gastric cancer-associated pathways. We identified four subgroups by visual inspection and consideration of the cophenetic correlation coefficient, the cumulative distribution function (CDF) 6 of consensus matrix and the Delta values for each k group (Supplementary Fig. S2A–C).

To test the robustness of NMF subgroups, we built a multiclass classifier from four NMF subgroups using SVMs with linear kernel and performed leave-one-out cross-validation to predict NMF subgroup membership29,30. Specifically, we used SVMs with linear kernel using the “all-pair comparisons” approach, where we build $$\frac{{{{{{\bf{K}}}}}}({{{{{\bf{K}}}}}}-1)}{2}$$ binary classifiers and each classifier is trained to distinguish each pair of classes. To obtain the class membership probabilities (a vector of length K) from the prediction results (a vector of length $$\frac{{{{{{\bf{K}}}}}}({{{{{\bf{K}}}}}}-1)}{2}$$) of the binary classifiers, we used the aggregation method proposed by Park et al.11. In order to prevent overfitting, we used a simpler model: the aggregating weights (a vector of length) assigned on the SVM classifiers in the aggregation method were fixed to a uniform vector under the assumption that each binary classification problem is equally important; and a regularization parameter, in each binary classification the problem was set to 1 (equal to the default setting in LibSVM toolbox (Ver 3.17). We measured the performance of the multiclass classifier by generating receiver operating characteristic curves and measuring the area under curve (AUC). The mean AUC for the classification was 0.981. We used this multiclass classifier using SVMs with linear kernel trained with the Yonsei four subtypes to classify patients from other cohorts into the four subtypes in the supervised classification setting.

### Predictive model for risk scores to predict overall survival

SVM using linear kernel was used to build a predictive model to generate risk scores to predict overall survival following surgical resection of gastric cancer. We built the predictive model based on SVM using linear kernel from the Yonsei cohort and tested the model in the cohorts published by ACRG9, Sohn et al.13, and TCGA15.

Since gene expression profiles from cohorts were generated by different microarray and illumine sequencing platforms, we used ComBat (http://www.bu.edu/jlab/wp-assets/ComBat) to remove any potential batch effects that may result from using datasets from different platforms and/or experiments and used the processed datasets for further analysis31. We first selected patients from Groups 1 and 4 from the Yonsei cohort, which had the best and worst outcomes, respectively. We assigned “−” and “+” labels to each subgroup, respectively. We built SVM with a linear kernel function using the 32 gene expression profiles of patients from Groups 1 and 4 with the +/− label information.

We applied the trained SVM to the same gene expression profiles of patients from the ACRG9, Sohn et al.13, and TCGA15 cohorts. A SVM outputs a continuous risk score for each test sample. A larger positive score value indicates the higher degree of confidence that the sample belongs to the positive class (i.e., Group 4, poor prognosis group). Similarly, a smaller negative score value indicates a higher degree of confidence that the sample belongs to the negative class (i.e., Group 1, good prognosis group). Thus, the risk score values of test samples can be used to predict survival probability.

The source code and datasets for risk score prediction are available at the following link: https://github.com/hwanglab/NTriPath.

### Statistical analysis

For univariate analyses, we used chi-squared (categorical variables) or ANOVA tests (continuous variables) to determine whether the genetic subtype variable was correlated with other clinical variables. For multivariate analyses, we employed a Cox proportional hazards model to relate patients’ survival time with subtype and other covariates. The clinical variables identified as statistically significant by univariate analysis were selected as the covariates in the multivariate analyses.

Since the results from the multivariate analysis could be biased due to the selection step using the univariate analysis, we also conducted a regularized Cox regression (Cox model with lasso regularization, implemented with the glmnet package in R). Using the Yonsei cohort, we set all clinical variables (except the variables with a high proportion of missing data, such as EBV, which was missing in ~60% of samples) as predictors and let the model select the optimal features for survival. We also calculated the 95% confidence interval of the hazard ratio and the p value of each variable using bootstrapping (the null hypothesis H_0 is that each coefficient \beta_j = 0).  We ran the model 10,000 times in the bootstrapping setting (the training data in each run was resampled with replacement) and calculated the hazard ratio, 95% confidence interval, and the p value of each coefficient based on the empirical distribution of the estimator of the coefficient.

When generating each Kaplan–Meier (KM) plot, we used the log-rank test to compare the survival curves. To generate the adjusted KM curves, we applied a Cox proportional hazards model to each subgroup and averaged the predicted survival curves by the treatment variable (i.e., 5-FU + platinum, 5-FU alone, or none) in that subgroup. All analyses were done in R (version 4.0.3) and MATLAB R2018a.

### Reporting summary

Further information on research design is available in the Nature Research Reporting Summary linked to this article.

## Data availability

Gene expression profiles of patients treated at Yonesi University can be found here: [https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE183136] and [https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE84437]. RNA-sequencing data for patients treated with immune checkpoint inhibitors is available in the European Genome-Phenome Archive under the Dataset ID EGAD00001008091: [https://ega-archive.org/studies/EGAS00001005588]. The ACRG data file is available here: [https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE62254]. Data from the Sohn et al. cohort is available here: [https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi] and [https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi]. Data from the Kim et al cohort is available here: [https://www.ebi.ac.uk/ena/browser/view/PRJEB25780]. Source data are provided with this paper.

## Code availability

The MATLAB and R scripts used for this study are available here: https://github.com/hwanglab/Yonsei_gastric_cancer_32genes. The DOI for the code is https://doi.org/10.5281/zenodo.5779446 [https://zenodo.org/record/5779446#.YbtuSH3ML0o]32.

## References

1. Paik, S. et al. A multigene assay to predict recurrence of tamoxifen-treated, node-negative breast cancer. N. Engl. J. Med. 351, 2817–2826 (2004).

2. Sparano, J. A. et al. Adjuvant chemotherapy guided by a 21-gene expression assay in breast cancer. N. Engl. J. Med. 379, 111–121 (2018).

3. Karapetis, C. S. et al. K-ras mutations and benefit from cetuximab in advanced colorectal cancer. N. Engl. J. Med. 359, 1757–1765 (2008).

4. Hoshida, Y. et al. Gene expression in fixed tissues and outcome in hepatocellular carcinoma. N. Engl. J. Med. 359, 1995–2004 (2008).

5. Silvestri, G. A. et al. A bronchial genomic classifier for the diagnostic evaluation of lung cancer. N. Engl. J. Med 373, 243–251 (2015).

6. Bang, Y.-J. et al. Adjuvant capecitabine and oxaliplatin for gastric cancer after D2 gastrectomy (CLASSIC): a phase 3 open-label, randomised controlled trial. Lancet 379, 315–321 (2012).

7. Cheong, J.-H. et al. Predictive test for chemotherapy response in resectable gastric cancer: a multi-cohort, retrospective analysis. Lancet Oncol. 19, 629–638 (2018).

8. Cancer Genome Atlas Research, N. Comprehensive molecular characterization of gastric adenocarcinoma. Nature 513, 202–209 (2014).

9. Cristescu, R. et al. Molecular analysis of gastric cancer identifies subtypes associated with distinct clinical outcomes. Nat. Med. 21, 449–456 (2015).

10. Garraway, L. A. & Lander, E. S. Lessons from the cancer genome. Cell 153, 17–37 (2013).

11. Park, S. et al. An integrative somatic mutation analysis to identify pathways linked with survival outcomes across 19 cancer types. Bioinformatics 32, 1643–1651 (2016).

12. Smyth, E. C., Nilsson, M., Grabsch, H. I., van Grieken, N. C. & Lordick, F. Gastric cancer. Lancet 396, 635–648 (2020).

13. Sohn, B. H. et al. Clinical significance of four molecular subtypes of gastric cancer identified by the Cancer Genome Atlas Project. Clin. Cancer Res. 23, 4441–4449 (2017).

14. Cristescu, R. et al. Molecular analysis of gastric cancer identifies subtypes associated with distinct clinical outcomes. Nat. Med 21, 449–456 (2015).

15. The Cancer Genome Atlas Research, N. Comprehensive molecular characterization of gastric adenocarcinoma. Nature 513, 202–209 (2014).

16. Kim, S. T. et al. Comprehensive molecular characterization of clinical responses to PD-1 inhibition in metastatic gastric cancer. Nat. Med. 24, 1449–1458 (2018).

17. Hoadley, K. A. et al. Cell-of-origin patterns dominate the molecular classification of 10,000 tumors from 33 types of cancer. Cell 173, 291–304 e296 (2018).

18. Bang, Y.-J. et al. Trastuzumab in combination with chemotherapy versus chemotherapy alone for treatment of HER2-positive advanced gastric or gastro-oesophageal junction cancer (ToGA): a phase 3, open-label, randomised controlled trial. Lancet 376, 687–697 (2010).

19. Pietrantonio, F. et al. Individual patient data meta-analysis of the value of microsatellite instability as a biomarker in gastric cancer. J. Clin. Oncol. 37, 3392–3400 (2019).

20. Keenan, T. E., Burke, K. P. & Van Allen, E. M. Genomic correlates of response to immune checkpoint blockade. Nat. Med. 25, 389–402 (2019).

21. Shitara, K. et al. Pembrolizumab versus paclitaxel for previously treated, advanced gastric or gastro-oesophageal junction cancer (KEYNOTE-061): a randomised, open-label, controlled, phase 3 trial. Lancet 392, 123–133 (2018).

22. Jim, M. A. et al. Stomach cancer survival in the United States by race and stage (2001‐2009): findings from the CONCORD‐2 study. Cancer 123, 4994–5013 (2017).

23. Al-Batran, S.-E. et al. Perioperative chemotherapy with fluorouracil plus leucovorin, oxaliplatin, and docetaxel versus fluorouracil or capecitabine plus cisplatin and epirubicin for locally advanced, resectable gastric or gastro-oesophageal junction adenocarcinoma (FLOT4): a randomised, phase 2/3 trial. Lancet 393, 1948–1957 (2019).

24. Gao, J. et al. Integrative analysis of complex cancer genomics and clinical profiles using the cBioPortal. Sci. Signal. 6, pl1–pl1 (2013).

25. Zhang, S., Li, Q., Liu, J. & Zhou, X. J. A novel computational framework for simultaneous integration of multiple types of genomic data to identify microRNA-gene regulatory modules. Bioinformatics 27, i401–i409 (2011).

26. Suthram, S. et al. Network-based elucidation of human disease similarities reveals common functional modules enriched for pluripotent drug targets. PLoS Comput Biol. 6, e1000662 (2010).

27. Subramanian, A. et al. Gene set enrichment analysis: a knowledge-based approach for interpreting genome-wide expression profiles. Proc. Natl Acad. Sci. 102, 15545–15550 (2005).

28. Mi, H. et al. PANTHER version 16: a revised family classification, tree-based classification tool, enhancer regions and extensive API. Nucleic Acids Res 49, D394–D403 (2021).

29. Boser, B. E., Guyon, I. M. & Vapnik, V. N. A training algorithm for optimal margin classifiers. in Proceedings of the fifth annual workshop on Computational learning theory. 144–152.

30. Cortes, C. & Vapnik, V. Support-vector networks. Mach. Learn. 20, 273–297 (1995).

31. Johnson, W. E., Li, C. & Rabinovic, A. Adjusting batch effects in microarray expression data using empirical Bayes methods. Biostatistics 8, 118–127 (2007).

32. Cheong, J.-H. et al. Development and validation of a prognostic and predictive 32-gene signature for gastric cancer. Nat. Commun. https://doi.org/10.5281/zenodo.5779446 (2022).

## Acknowledgements

This research was supported by a grant from the Korean Health Technology R&D Project through the Korean Health Industry Development Institute (KHIDI), funded by the Ministry of Health & Welfare, Republic of Korea (grant No. HI13C2162). SCW is a Disease Oriented Clinical Scholar at UT Southwestern and supported by the NCI/NIH (K08 CA222611). MRP is a Dedman Family Scholar in Clinical Care. JDK holds a Physician-Scientist Institutional Award from the Burroughs Wellcome Fund (award no. 1018897).

## Author information

Authors

### Contributions

J.C., S.C.W., M.R.P., W.J.H., S.H.N., T.H.H. conceptualized the project. J.C., S.C.W., S.P., T.H.H. contributed to data curation. J.C., S.C.W., A.L.C., H.Z., B.H., C.H., T.H.H. contributed to formal analysis. J.C., T.H.H. contributed to funding acquisition. J.C., S.P., H.K., T.H.H. contributed to project investigation. J.C., S.P., T.H.H. contributed to methodology development. J.C., H.K., H.S.K., W.J.H., S.H.N., I.K., S.H.L., T.H.H. contributed to resource acquisition. S.P., T.H.H. contributed to software development. J.C., T.H.H. contributed to project administration. J.C., T.H.H. supervised the project. J.C., S.C.W., S.P., M.R.P., T.H.H. contributed to the writing of the original draft. J.C., S.C.W., S.P., M.R.P., A.L.C., H.K., H.Z., W.J.H., S.H.N., B.H., C.H., J.D.K., I.K., S.H.L., T.H.H. contributed to reviewing and editing the final draft.

### Corresponding authors

Correspondence to Jae-Ho Cheong or Tae Hyun Hwang.

## Ethics declarations

### Competing interests

J.C., S.C.W., S.P., S.H.L., and T.H.H. are co-inventors of a patent for the 32 gene signature which is currently under consideration (PCT/KR2021/018966). All other authors declare no competing interests.

## Peer review

### Peer review information

Nature Communications thanks Rui-Hua Xu and the other, anonymous, reviewer(s) for their contribution to the peer review of this work. Peer reviewer reports are available.

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

Reprints and Permissions

Cheong, JH., Wang, S.C., Park, S. et al. Development and validation of a prognostic and predictive 32-gene signature for gastric cancer. Nat Commun 13, 774 (2022). https://doi.org/10.1038/s41467-022-28437-y

• Accepted:

• Published:

• DOI: https://doi.org/10.1038/s41467-022-28437-y


text:
# Math Help - Topology (specifically homotopy) question!

1. ## Topology (specifically homotopy) question!

Could anybody help me with this topology question?

i) Prove that every map e: X-> R^n is homotopic to a constant map.

ii) If f: X->S^n is a map that is not onto (surjective), show that f is homtopic to a constant map.

It's part of a past exam paper but it does not come with solutions. Any help on the solution would be greatly appreciated.

Thanks.

2. For (i), try to show that e is homotopic to the zero map. It should be rather clear, geometrically, how to do this.

For (ii), note that $S^n \setminus \{x_0\} \cong \mathbb{R}^n$

format: plain


text:
# Thread: Trigonometric Substitutions - help!

1. ## Trigonometric Substitutions - help!

im stuck on this question:

i let x = 4sint
dx= 4cost dt

so
= == =

i dont see why im getting a total wrong answer :S

2. Your images aren't working for me.


text:
# Tracing points around a curve/ellipse

Sorry if this has been asked before but my maths days are long behind me.

What I want to know is how to find out the coordinates along the circumference of an ellipse.

So supposing I am at point X,Y which lies on the circumference, and I am traveling at velocity Z. How can i work out after given time t what the new X,Y values would be.

seems so simple but just cant think where to start.

Thanks for the help

Aaron

-
is the speed constant? – Santosh Linkha Jul 25 '12 at 22:06
yes it is and its z – dREaM Jul 25 '12 at 22:08
youtube.com/watch?v=iUfu9RK6w44 – Will Jagy Jul 25 '12 at 22:35
@WillJagy are you aware this link is to a song? – dREaM Jul 25 '12 at 22:48
@ChuckFernández, yes, DevilWAH wrote "my maths days are long behind me" in a rather forlorn manner. The song says no, not really. Here is a different one: youtube.com/watch?v=KHVYBiVKldU – Will Jagy Jul 25 '12 at 23:06

I don't think this has a nice elementary solution -- since the period of such a solution would be the circumference of the ellipse, something that it hard enough to compute that it has its own class of special functions associated with it.

So in practice you need to do it numerically, and then it's easy enough to program. You know (I hope) how to generate points on the ellipse without the constant-velocity requirement:

$$u \mapsto (a\cos u, b\sin u)$$ where $u$ is a parameter and $2a$ and $2b$ are the lengths of the ellipse's major and minor axes. Your only problem is then to find the next $u$ value at each step. If you do it with small enough steps you can simply differentiate this expression to find out how far a small change in $u$ makes the point move. You get something like $$u(t+\Delta t) = u(t) + \frac{z\Delta t}{\sqrt{a^2\sin^2(u(t))+b^2\cos^2(u(t))}}$$ where you choose the time step $\Delta t$ by trial and error to be small enough that the speed ends up being close enough to constant for your needs.

-
Cool cheers for that, seems like this is a little more complex than I had hopped. This is some thing I will defiantly be coming back to soon. I am currently moving the point using the first equation you gave, and for now this will do. Once I have the rest of the application in place, I want to come back to this to fine tune it, however for now I think my current method will do fine. Thanks for the solution though. – DevilWAH Jul 28 '12 at 23:44
@Devil, spelling tip: You mean "definitely", not "defiantly" -- the latter means "while openly refusing to obey". – Henning Makholm Jul 29 '12 at 6:04
:) yer that would be the one. but honestly to my mind those two words look identical, takes a bit of looking for me to see the difference. Thats dyslexics for you. – DevilWAH Jul 29 '12 at 15:23


text:
# Solve the following systems of equations:

Question:

Solve the following systems of equations:

$\frac{4}{x}+5 y=7$

$\frac{3}{x}+4 y=5$

Solution:

The given equations are:

$\frac{4}{x}+5 y=7 \ldots(i)$

$\frac{3}{x}+4 y=5$ ...(ii)

Multiply equation $(i)$ by 4 and equation $(i i)$ by 5 and subtract (ii) from (i) we get

$\frac{16}{x}+20 y=28$

Put the value of $x$ in equation $(i)$, we get

$\frac{4}{\frac{1}{3}}+5 y=7$

$\Rightarrow 5 y=-5$

$\Rightarrow y=-1$

Hence the value of $x=\frac{1}{3}$ and $y=-1$


text:
Question

# Industrial preparation of nitric acid by Ostwald’s process involves:A.Oxidation of $N{H_3}$ B.Reduction of $N{H_3}$C.Hydrogenation of $N{H_3}$D.Hydrolysis of $N{H_3}$

Hint: Nitric acid is a chemical compound made up from the combination of nitrogen, hydrogen and oxygen elements in a specific ratio. It is highly corrosive mineral acid. Nitric acid is also known as aqua fortis and spirit of niter.

$4N{H_3} + {O_2} \to 4NO + 6{H_2}O$
$2NO + {O_2} \to 2N{O_2}$
$3N{O_2} + {H_2}O \to 2HN{O_3} + NO$
Note: The easiest method of preparation of nitric acid in the lab is by dissolving additional nitrogen dioxide in $68\%$ nitric acid in an absorption tower. Dissolved nitrogen oxides are either stripped in the case of white fuming nitric acid, or remain in the solution to form red fuming nitric acid.


text:
# What is a “batch” in batch normalization?

I'm working on an example of CNN with the MNIST hand-written numbers dataset. Currently I've got convolution -> pool -> dense -> dense, and for the optimiser I'm using Mini-Batch Gradient Descent with a batch size of 32.

Now this concept of batch normalization is being introduced. We are supposed to take a "batch" after or before a layer, and normalize it by subtracting its mean, and dividing by its standard deviation.

So what is a "batch"? If I feed a sample into a 32 kernel conv layer, I get 32 feature maps.

• Is each feature map a "batch"?
• Are the 32 feature maps the "batch"?

Or, if I'm doing Mini-Batch Gradient Descent with a batch size of 64,

• Are 64 sets of 32 feature maps the "batch"? So in other words, the batch from Mini-Batch Gradient Descent, is the same as the "batch" from batch-optimization?

Or is a "batch" something else that I've missed?

## 1 Answer

The "batch" is same as in mini-batch gradient descent. The mean in batch-norm here would be the average of each feature map in your batch (in your case either 32 or 64 depending on which you use)

generally batch is used quite consistently in ML right now, where it refers to the inputs you send in together for forward/backward pass.

• Thanks! "The mean in batch-norm here would be the average of each feature map in your batch (in your case either 32 or 64 depending on which you use)." Okay so in the particular example I listed above, the batch would consist of 32x64=2048 feature maps. And although I haven't listed it, the feature maps are 26x26x1. So we find the mean and stdev across all 2048x26x26=73728 data points then normalise all data points according to that. Right? – Alexander Soare Dec 27 '19 at 17:18
• @AlexanderSoare is 32 or 64 your batch size? or is 64 the channel size? – mshlis Dec 27 '19 at 17:21
• The batch size is 64. There are 32 kernels in the conv layer so I get 32 channels out. – Alexander Soare Dec 27 '19 at 17:27
• @AlexanderSoare your adding 64 elements together (where each element is a 26x26x32 tensor in your case) – mshlis Dec 27 '19 at 17:45
• Thanks! Okay so then just to be super clear, and thanks again for your time, That means we are essentially taking 32x64x26x26=73728 data points, calculating the mean and stdev, then subtracting the mean and dividing by stdev for each of those points. Sorry to be so specific. But this is like a checksum to know I understand the concepts. – Alexander Soare Dec 27 '19 at 18:04


text:
### 1. Generating observations from a mixture of 3 two-dimensional Gaussians

• we specify the means, standard deviations, correlation coefficients, and weights for all 3 clusters:
mu1 = c(5, 5)   # x and y component of mean value vector for cluster 1
mu2 = c(9, 9)   # x and y component of mean value vector for cluster 2
mu3 = c(8, 5)   # x and y component of mean value vector for cluster 3

sigma1 = c(1.0, 1.1)    # x and y component of standard deviation vector for cluster 1
sigma2 = c(1.0, 1.0)    # x and y component of standard deviation vector for cluster 1
sigma3 = c(1.0, 1.1)    # x and y component of standard deviation vector for cluster 1

rhoxy1 = 0.8    # correlation between x and y, cluster 1
rhoxy2 = 0.9    # correlation between x and y, cluster 2
rhoxy3 = 0.6    # correlation between x and y, cluster 3

alpha = c(0.3, 0.3, 0.4)    # cluster weights
sum(alpha) == 1             # must be TRUE
## [1] TRUE
• the covariance matrix for cluster k is then constructed using the corresponding standard deviations and correlation coefficients:

$\pmb{\Sigma_k} = \begin{pmatrix} \sigma_x^2 & \rho \sigma_x \sigma_y \\ \rho \sigma_x \sigma_y & \sigma_y^2 \end{pmatrix}$

• (the cluster index k was suppressed in the matrix for better visibility)
• the corresponding R code is:
mat = c(sigma1[1]^2, rhoxy1*sigma1[1]*sigma1[2], rhoxy1*sigma1[1]*sigma1[2], sigma1[2]^2)
Sigma1 = matrix(mat, nrow = 2, byrow = TRUE)    # Covariance matrix for cluster 1
mat = c(sigma2[1]^2, rhoxy2*sigma2[1]*sigma2[2], rhoxy2*sigma2[1]*sigma2[2], sigma2[2]^2)
Sigma2 = matrix(mat, nrow = 2, byrow = TRUE)    # Covariance matrix for cluster 2
mat = c(sigma3[1]^2, rhoxy3*sigma3[1]*sigma3[2], rhoxy3*sigma3[1]*sigma3[2], sigma3[2]^2)
Sigma3 = matrix(mat, nrow = 2, byrow = TRUE)    # Covariance matrix for cluster 3
• the $$\Sigma_k$$ are symmetric, positive (semi-) definite matrices
• once mean vector $$\mu_k$$ and covariance matrix $$\Sigma_k$$ are specified, a sample point from a multivariate Gaussian can be generated by combining samples of standard-normal variables:
• to construct a d-dimensional Gaussian, we have to determine a (d x d) - matrix $$A$$ so that $$A \cdot A^T = \Sigma$$
• the matrix $$A$$ can be calculated from $$\Sigma$$ using Cholesky decomposition
• then, a d-dimensional vector $$z$$ of $$N(0,1)$$ variables is generated using the built-in R-function rnorm()
• finally, the sample point $$w$$ of the multivariate Gaussian is calculated as $$w = A \cdot z + \mu$$
• the function rmultinorm() combines these steps:
rmultinorm <- function(mu, Sigma){
d = length(mu)       # d = dimension
A = t(chol(Sigma))   # determine a matrix A so that A %*% t(A) = Sigma, "Cholesky decomposition"
Z = rnorm(d)         # generate N(0,1) sample point with dimension d
w = A %*% Z + mu     # sample point of the d-dimensional Gaussian
return(w[,1])        # returns sample point of a multivariate Gaussian with mean mu and covariance matrix Sigma
}
mu = list()
mu[[1]] = mu1
mu[[2]] = mu2
mu[[3]] = mu3

Sigma = list()
Sigma[[1]] = Sigma1
Sigma[[2]] = Sigma2
Sigma[[3]] = Sigma3
• using the rmultinorm() function, we conduct two-step experiment to generate sample points from a 2-D Gaussian mixture (with 3 clusters)
• first we randomly choose one of the 3 clusters
• subsequently, we draw a sample point from the chosen cluster
• this is realized in the following loop:
• (note that all code snippets are designed for comprehensibility, not for efficiency!)
N = 1000   # number of observations to generate
x = matrix(NA, ncol = 2, nrow = N)     # matrix for 1000 2-dim observations, one row = one observation
cols = rep(NA, N)                      # color recalls which Gaussian was chosen
color_palette = c("red", "darkgreen", "blue")   # different color for each cluster

for (i in 1:N) {
component = sample(c(1,2,3), size = 1, prob = alpha)      # draw a cluster with probability alpha
x[i,] = rmultinorm(mu[[component]], Sigma[[component]])   # generate a 2-dim sample from the chosen Gaussian
cols[i] = color_palette[component]                        # assign a color to the sample point
}
dim(x)  # the random sample points are stored in the array x
## [1] 1000    2
• plot the generated sample points
• color indicates the cluster a sample point originated from
• Important: in practice, we do not know from which cluster a sample point originated from (the origins are “hidden variables”)
plot(x[,1], x[,2], col = cols, main = "Observations from Gaussian mixture", font.main = 1)

### 2. Estimation of the parameters from the sample points using EM

#### 2.1. Initialization

• in practice, the origins of the sample points are not known
• that means we have to guess the parameters from a plot of the sample points without knowledge of the hidden variables (without “color” as above):
plot(x[,1], x[,2], col = "grey", main = "Observations from Gaussian mixture", font.main = 1)

• we have to know (or to guess) the number of clusters K the points are produced from
• also, we define how many iterations we want to carry out at most
K = 3           # we have to know (or to guess) the number of Gaussians
max_iter = 50   # maximum number of iterations
• we label the first guess with the additional characters “_t"
• of course, the first guess will only roughly agree with the “true” parameters (here, the true parameters are the ones we used above for sample generation)
mu1_t = c(6, 6)     # x and y component of mean value vector for cluster 1
mu2_t = c(8, 8)     # x and y component of mean value vector for cluster 2
mu3_t = c(7, 6)     # x and y component of mean value vector for cluster 3

sigma1_t = c(1.2, 1.0)    # x and y component of standard deviation vector for cluster 1
sigma2_t = c(1.2, 1.2)    # x and y component of standard deviation vector for cluster 1
sigma3_t = c(1.4, 1.5)    # x and y component of standard deviation vector for cluster 1

rhoxy1_t = 0.7    # correlation between x and y, cluster 1
rhoxy2_t = 0.8    # correlation between x and y, cluster 2
rhoxy3_t = 0.7    # correlation between x and y, cluster 3

alpha_t = c(0.3, 0.3, 0.4)    # cluster weights
sum(alpha_t) == 1             # must be TRUE
## [1] TRUE
• with that, we have to construct the first guess of the covariance matrices $$\Sigma_k$$:
mat = c(sigma1_t[1]^2, rhoxy1_t*sigma1_t[1]*sigma1_t[2], rhoxy1_t*sigma1_t[1]*sigma1_t[2], sigma1_t[2]^2)
Sigma1_t = matrix(mat, nrow = 2, byrow = TRUE)    # Covariance matrix for cluster 1
mat = c(sigma2_t[1]^2, rhoxy2_t*sigma2_t[1]*sigma2_t[2], rhoxy2_t*sigma2_t[1]*sigma2_t[2], sigma2_t[2]^2)
Sigma2_t = matrix(mat, nrow = 2, byrow = TRUE)    # Covariance matrix for cluster 2
mat = c(sigma3_t[1]^2, rhoxy3_t*sigma3_t[1]*sigma3_t[2], rhoxy3_t*sigma3_t[1]*sigma3_t[2], sigma3_t[2]^2)
Sigma3_t = matrix(mat, nrow = 2, byrow = TRUE)    # Covariance matrix for cluster 3
• collect the mean vectors and covariance matrices in lists:
mu_t = list()
mu_t[[1]] = mu1_t
mu_t[[2]] = mu2_t
mu_t[[3]] = mu3_t

Sigma_t = list()
Sigma_t[[1]] = Sigma1_t
Sigma_t[[2]] = Sigma2_t
Sigma_t[[3]] = Sigma3_t
• it can be interesting to see a contour plot of the probability distribution that follows from our first guess together with the “observed” sample points
• this might give us a clue if the guess if fairly well … or completely aside
• we have to define the grid for the contour plot first:
xmin = 0 ; xmax = 12   # define the plot range by looking at the sample point plot
ymin = 0 ; ymax = 12
x1 = seq(xmin, xmax, length = 200)
x2 = seq(ymin, ymax, length = 200)
• we need also a function that gives us a sample point from a mixture of Gaussian distributions
• the function fx_Gauss() can do that:
fx_Gauss <- function(x, y, mu, Sigma, alpha) {   # Density function for a mixture of 2-D Gaussians
if(length(x) != length(y)) stop("\n 'x' and 'y' must have equal length \n\n")
N = nrow(x)
if(!is.list(mu)) stop("\n 'mu' must be a list with K components.\n\n")
if(!is.list(Sigma)) stop("\n 'Sigma' must be a list with K components.\n\n")
K = length(mu)   # number of clusters
density = 0
for (k in 1:K) density = density + alpha[k]*dmvnorm(cbind(x, y), mean = mu[[k]], sigma = Sigma[[k]])
return(density)
}
• fx_Gauss() uses the function dmvnorm() from the R-package mvtnorm, load the library:
library(mvtnorm)
• using outer, we define a 2-dimensional grid for the contour plot
• we use fx_Gauss() to determine the function value for each grid point
• the function values are based on the first guess (variables mu_t, Sigma_t, alpha_t):
fx_t = outer(x1, x2, FUN = function(x, y) fx_Gauss(x, y, mu = mu_t, Sigma = Sigma_t, alpha = alpha_t))
plot(x[,1], x[,2], col = "grey", main = "Observations from Gaussian mixture", font.main = 1)  # sample points
contour(x1, x2, fx_t, col = "red", lty = 2, add = TRUE)   # contour-plot representing the 1st guess

• we see that the first guess is not perfect but might work
• because we produced the sample points ourselves, and thereby know the true parameters, we can cheat a little bit and add the contour plots based on these true parameter values:
plot(x[,1], x[,2], col = "grey", main = "Observations from Gaussian mixture", font.main = 1)  # sample points
contour(x1, x2, fx_t, col = "red", lty = 2, add = TRUE)         # contour-plot representing the 1st guess
fx_sol = outer(x1, x2, FUN = function(x, y) fx_Gauss(x, y, mu = mu, Sigma = Sigma, alpha = alpha))
contour(x1, x2, fx_sol, col = "green", lty = 2, add = TRUE)     # contour-plot representing the true prob. distribution

• red contour lines stand for the first guess, green contour lines show the true distribution
• the 1st guess is not brilliant but we’ll give it a chance!
• we can calculate the log likelihood of the samples based on the 1st guess:
logL = 0
for (k in 1:K) logL = logL + alpha_t[k] * dmvnorm(x, mu_t[[k]], Sigma_t[[k]])   # k-sum
logL = log(logL)
logL = sum(logL)    # i-sum
cat(paste(" Log likelihood after 1st guess:", signif(logL,4), "\n"))
##  Log likelihood after 1st guess: -4255
Lvector = logL      # store the first value, append logL-values during the EM loop below
• define data structures for the updated parameters:
mu = list()
mu[[1]] = rep(NA, 2)  # components x and y
mu[[2]] = rep(NA, 2)
mu[[3]] = rep(NA, 2)
Sigma = list()
Sigma[[1]] = matrix(NA, nrow = 2, ncol = 2)
Sigma[[2]] = matrix(NA, nrow = 2, ncol = 2)
Sigma[[3]] = matrix(NA, nrow = 2, ncol = 2)
alpha = rep(NA, K)          # K = number of clusters
• we must not forget to define maximum relative errors for the parameters:
e_mu_max = 0.001       # means
e_Sigma_max = 0.001    # covariance matrices
e_alpha_max = 0.001    # mixture weights

#### 2.2. Looping through E- and M-steps

• now we can alternate through E- and M-step
• (note that all code snippets are designed for comprehensibility, not for efficiency!)
• during the E-step, we calculate the “membership probabilities” for the sample points, $$\omega_{ik}$$:

$\omega_{ik} = \; \frac{ \alpha_k^t \cdot f_k \left( \pmb{x_i} \mid \pmb{\mu_k^t}, \pmb{\Sigma_k^t} \right) }{\sum_{k} \alpha_k^t \cdot f_k \left( \pmb{x_i} \mid \pmb{\mu_k^t}, \pmb{\Sigma_k^t} \right)}$

• during the M-step, we update the parameter values (to maximize $$Q_1(\theta, \theta_t$$):

$\pmb{\mu_m} = \frac{\sum_{i=1}^N \omega_{im} \cdot \pmb{x_i}}{\sum_{i=1}^N \omega_{im}}$

$\pmb{\Sigma_m} = \frac{ \sum_{i=1}^N \omega_{im} \cdot \left(\pmb{x_i} - \pmb{\mu_m} \right) \cdot \left(\pmb{x_i} - \pmb{\mu_m} \right)^T }{ \sum_{i=1}^N \omega_{im}}$

$\alpha_m = \frac{1}{N} \cdot \sum_{i=1}^N \omega_{im}$

for (iter in 1:max_iter) {

# --- E-step
omega = matrix(NA, nrow = N, ncol = K)
for (k in 1:K) omega[,k] = alpha_t[k] * dmvnorm(x, mu_t[[k]], Sigma_t[[k]])       # numerator for each k
denominator  = 0; for (k in 1:K) denominator = denominator + omega[,k]            # denominator
for (k in 1:K) omega[,k] = omega[,k] / denominator
if(!all(round(rowSums(omega),4) == 1)) stop("\n  All rowsums of omega must be 1! \n\n")
if(round(sum(rowSums(omega)), 3) != N)
stop("\n\n  Sum over all elements of omega must be equal to the number of observations! \n\n")
if(any(omega < 0)) stop("\n  No element of omega can be negative! \n\n")

# --- M-step

# update means:
for (k in 1:K) mu[[k]] = as.vector((omega[,k] %*% x) / sum(omega[,k]))   # a vector with 2 components

# update covariance matrices:
for (k in 1:K) {
Sigma[[k]] = matrix(rep(0,4), nrow = 2)     # init
for (i in 1:N) Sigma[[k]] = Sigma[[k]] + omega[i,k] * ((x[i,] - mu_t[[k]]) %*% t(x[i,] - mu_t[[k]]))
Sigma[[k]] = Sigma[[k]] / sum(omega[,k])    # weigthed covariance matrix
}

# update cluster membership
for (k in 1:K) alpha[k] = sum(omega[,k]) / N

# new value for log-likelihood:
logL = rep(0 , N)
for (k in 1:K) logL = logL + alpha[k] * dmvnorm(x, mu[[k]], Sigma[[k]])  # k-sum
logL = log(logL)
logL = sum(logL) # i-sum
cat(paste("Log likelihood after iteration", iter, ":", signif(logL,4), "\n"))
Lvector = c(Lvector, logL)    # append the new value

# calculate relative errors:
e_mu = max(abs((unlist(mu) - unlist(mu_t))/(unlist(mu) + 1e-50)))
e_Sigma = max(abs((unlist(Sigma) - unlist(Sigma_t))/(unlist(Sigma) + 1e-50)))
e_alpha  = max(abs((alpha - alpha_t) / (alpha_t + 1e-50)))
cat(paste("Loop", iter, ":  e_mu =", signif(e_mu,4), "e_Sigma =", signif(e_Sigma,4), "e_alpha =", signif(e_alpha,5), "\n"))

# need another loop?:
cond1 = e_mu <= e_mu_max          # condition 1, for mu
cond2 = e_Sigma <= e_Sigma_max    # condition 2, for sigma
cond3 = e_alpha <= e_alpha_max    # condition 3, for alpha
if(cond1 & cond2 & cond3) break   # converged!

# otherwise, continue to next loop:
mu_t = mu
Sigma_t = Sigma
alpha_t = alpha

} # EM-loop
## Log likelihood after iteration 1 : -3633
## Loop 1 :  e_mu = 0.1521 e_Sigma = 0.4903 e_alpha = 0.375
## Log likelihood after iteration 2 : -3509
## Loop 2 :  e_mu = 0.06336 e_Sigma = 0.6493 e_alpha = 0.058626
## Log likelihood after iteration 3 : -3461
## Loop 3 :  e_mu = 0.0401 e_Sigma = 0.4534 e_alpha = 0.081443
## Log likelihood after iteration 4 : -3438
## Loop 4 :  e_mu = 0.01227 e_Sigma = 0.2887 e_alpha = 0.074074
## Log likelihood after iteration 5 : -3427
## Loop 5 :  e_mu = 0.009132 e_Sigma = 0.1364 e_alpha = 0.053024
## Log likelihood after iteration 6 : -3420
## Loop 6 :  e_mu = 0.006481 e_Sigma = 0.08775 e_alpha = 0.038344
## Log likelihood after iteration 7 : -3416
## Loop 7 :  e_mu = 0.004695 e_Sigma = 0.05418 e_alpha = 0.028112
## Log likelihood after iteration 8 : -3414
## Loop 8 :  e_mu = 0.004269 e_Sigma = 0.03442 e_alpha = 0.020268
## Log likelihood after iteration 9 : -3413
## Loop 9 :  e_mu = 0.003457 e_Sigma = 0.02189 e_alpha = 0.014391
## Log likelihood after iteration 10 : -3412
## Loop 10 :  e_mu = 0.002669 e_Sigma = 0.01588 e_alpha = 0.010161
## Log likelihood after iteration 11 : -3412
## Loop 11 :  e_mu = 0.002013 e_Sigma = 0.01293 e_alpha = 0.007187
## Log likelihood after iteration 12 : -3412
## Loop 12 :  e_mu = 0.001502 e_Sigma = 0.01015 e_alpha = 0.0051119
## Log likelihood after iteration 13 : -3412
## Loop 13 :  e_mu = 0.001114 e_Sigma = 0.007804 e_alpha = 0.0036597
## Log likelihood after iteration 14 : -3412
## Loop 14 :  e_mu = 0.0008249 e_Sigma = 0.00593 e_alpha = 0.0026365
## Log likelihood after iteration 15 : -3412
## Loop 15 :  e_mu = 0.0006105 e_Sigma = 0.004475 e_alpha = 0.00191
## Log likelihood after iteration 16 : -3412
## Loop 16 :  e_mu = 0.0004521 e_Sigma = 0.003365 e_alpha = 0.0013903
## Log likelihood after iteration 17 : -3412
## Loop 17 :  e_mu = 0.0003352 e_Sigma = 0.002525 e_alpha = 0.0010161
## Log likelihood after iteration 18 : -3412
## Loop 18 :  e_mu = 0.0002488 e_Sigma = 0.001893 e_alpha = 0.00074533
## Log likelihood after iteration 19 : -3412
## Loop 19 :  e_mu = 0.0001849 e_Sigma = 0.001419 e_alpha = 0.00054837
## Log likelihood after iteration 20 : -3412
## Loop 20 :  e_mu = 0.0001376 e_Sigma = 0.001063 e_alpha = 0.00040454
## Log likelihood after iteration 21 : -3412
## Loop 21 :  e_mu = 0.0001025 e_Sigma = 0.0007965 e_alpha = 0.00029913

### 3. Looking at the results

• output the calculated parameter values (which should be fairly close to the true parameters)
• scatterplot of the log-likelihood vs. iteration (likelihood cannot decrease according to the theory)
• a plot of the sample points together with the obtained solution
• a heat plot of the obtained solution
• a 3D-plot of the obtained solution
if(iter == max_iter) {
warning("Not converged!\n\n")
} else {
cat("Converged after", iter, "iterations.\n\n")
}
## Converged after 21 iterations.
## List results:
cat(paste("Mean values of the", K, "clusters:\n"))
## Mean values of the 3 clusters:
for (k in 1:K) {
mux = signif(mu[[k]][1],4)
muy = signif(mu[[k]][2],4)
cat(paste("  Cluster", k, "  mux =", mux, "  muy =", muy, "\n"))
}
##   Cluster 1   mux = 4.975   muy = 4.933
##   Cluster 2   mux = 8.947   muy = 8.937
##   Cluster 3   mux = 7.967   muy = 5.002
cat(paste("Standard deviations and correlation of the", K, "clusters:\n"))
## Standard deviations and correlation of the 3 clusters:
for (k in 1:K) {
sigmax = signif(sqrt(Sigma[[k]][1,1]),4)
sigmay = signif(sqrt(Sigma[[k]][2,2]),4)
rhoxy  = signif(Sigma[[k]][1,2]/sigmax/sigmay, 4)
cat(paste("  Cluster", k, "  sdx =", sigmax, "  sdy =", sigmay, "  rhoxy =", rhoxy, "\n"))
}
##   Cluster 1   sdx = 0.9608   sdy = 1.067   rhoxy = 0.8153
##   Cluster 2   sdx = 1.056   sdy = 1.053   rhoxy = 0.9087
##   Cluster 3   sdx = 1.018   sdy = 1.117   rhoxy = 0.6334
cat(paste("Cluster weigths of the", K, "clusters:\n"))
## Cluster weigths of the 3 clusters:
for (k in 1:K) cat(paste("  Cluster", k, "  alpha =", signif(alpha[k], 4), "\n"))
##   Cluster 1   alpha = 0.2658
##   Cluster 2   alpha = 0.3149
##   Cluster 3   alpha = 0.4193
• a plot of the log-likelihood vs. iteration number
• according to the theory, the log-likelihood can never decrease during iterations
  plot(Lvector, ylab = "log(L)", main = "Log-likelihood", font.main = 1, xlab = "iter", col = "blue", lwd = 1.5 )
mtext(side = 3, "First value based on first guess", col = "blue", cex = 0.9)

• a plot of the sample points plus contour lines representing the solution that has been found:
  plot(x[,1], x[,2], xlab = "x1", ylab = "x2", col = "grey", main = "Sample points and EM solution", font.main = 1)

# define grid for the contour plot (same as above):
xmin = 0 ; xmax = 12
ymin = 0 ; ymax = 12
x1 = seq(xmin, xmax, length = 200)
x2 = seq(ymin, ymax, length = 200)
fx_sol = outer(x1, x2, FUN = function(x, y) fx_Gauss(x, y, mu = mu, Sigma = Sigma, alpha = alpha))
contour(x1, x2, fx_sol, col = "green", lty = 2, add = TRUE)   # contour-plot showing the calculated solution`


text:
# CHAPTER 3. - IDEAL GAS AND SPECIFIC HEATS¶

## Ideal Gas¶

Three properties of substances are measurable in nature which are $$P$$ , $$v$$ and $$T$$. A relation (which is in the form of an equation) amongst these three state variables or properties is called an equation of state.

The simplest of these equations is the ideal gas equation of state which is experimentally found to closely approximate the behaviour of several gases at low pressures and high temperatures. The ideal gas equation is given by

Important

Ideal Gas Equation of State

$Pv = RT$

The constant in the above equation is called as the gas constant. Gas constant is given by the following relationship

$R = \frac{R_0}{MW}$

where

$$R_0$$ is the universal gas constant (8314 J/kmol.K units)
$$MW$$ is the molecular weight (kg/kmol) units)

## Specific Heats ($$c_p$$ and $$c_v$$)¶

Specific heat is defined as the energy required to raise the temperature of a unit mass of substance by one degree.

The specific heat of a substance depends on the manner in which the substance is heated. In thermodynamic analysis, two types of specific heats are of interest namely, the specific heat at constant volume ($$c_v$$) and the specific heat at constant pressure ($$c_p$$).

### Specific Heat at constant volume ($$c_v$$)¶

Physically specific heat at constant volume ($$c_v$$) is the heat required to raise the temperature when the volume is kept constant (an isochoric process)

In chapter02, the first law equation for an isochoric process was derived (16) and is reproduced here, as

$\begin{split}q - w = \varDelta u + \varDelta pe + \varDelta ke \\\end{split}$

Ignoring the potential and kinetic energy terms for a stationary closed system, and using the equation in differential form we have

$\delta q - \delta w = du$

In chapter 02, the boundary work for an isochoric process was demonstrated as zero ($$w=0$$, no displacement means no work). All the heat supplied goes to raise the internal energy of the fluid. Substituting work as zero we get

$\delta q = du$

By definition of $$c_v$$ we have

$\delta q = c_v dT$

By substitution we have

$c_v dT = du$

or

$c_v = \left(\frac{ \partial u}{\partial T}\right)_v$

### Specific Heat at constant pressure ($$c_p$$)¶

In chapter 02, the equation for boundary work was derived as (22)

$W_{boundary} = P_0(\mathbb{V}_2-\mathbb{V}_1)$

or on per unit mass basis as

$w_{boundary} = P_0v_2-P_0v_1 = P_2v_2 - P_1v_1$

in the above we have utilised the fact that for an isobaric process, $$p_0=p_1=p_2$$.

Stepping back, the first law equation is restated below

$q - w = \varDelta u = u_2 - u_1$

substituting the value of $$w$$ as boundary work for isobaric system and after rearrangment we get

$\begin{split}q &= u_2 - u_1 + P_2v_2 - P_1v_1 \\ q &= (u_2 + P_2v_2) - (u_1 + P_1v_1)\end{split}$

or making use of the definition of enthalpy $$h = u + Pv$$ we have

$q = h_2 - h_1$

In differential form the above equation can also be written as

$dq = dh$

By using the definition of $$c_p$$, we can substitute $$dq$$ in the above equation and write

$\begin{split}c_p dT &= dh \\\end{split}$

or,

$c_p = \left(\frac{ \partial h}{\partial T}\right)_p$

### Specific Heat for Ideal Gas¶

It has been demonstrated experimentally by Joule, that the internal energy is only a function of temperature ($$T$$) i.e.

$u = u(T)$

From enthalpy definition and ideal gas equation we have

$\begin{split}h &= u + Pv \\ Pv &= RT\end{split}$

therefore,

$h = u + RT = u(T) + RT$

as the entire expression on the right hand side is a function of temperature ($$T$$) only we can say that enthalpy is a function of temperature only.

$h = h(T)$

Since $$u$$ and $$h$$ are a function of temperature only, specific heats which are their temperature derivatives, are also a function of temperature only.

Important

Specific Heat behaviour for Ideal Gas

$\begin{split}u &= u(T) \\ h &= h(T) \\\end{split}$

and

$\begin{split}du &= c_v(T)dT \\ dh &= c_p(T)dT\end{split}$

## Perfect Gas¶

In thermodynamic analysis many property and heat, work evaluations require that the function $$C_p(T)$$ and $$C_v(T)$$ be known. The analysis becomes very simple, if we assume that during the process the specific heats remain constant. When such an assumption is made about the gas, the gas is called as a calorically perfect gas or simply perfect gas.

While there might be some variation in the values of specific heats, but assuming that they are constant at an average value during the process, the loss of accuracy incurred due to this assumtion is found to be fairly acceptable in most circumstances.

Important

For a Perfect Gas

$\begin{split}c_p &= constant \\ c_v &= constant\end{split}$


text:
# differential geometry about neither local isometry nor conformal map

hi I need help in geometry I try to get the the idea but I couldn't solve so. It becomes great if someone try solve with explain to me by using figures if possible. I see this question change a lot of geometry experts and thank you for trying to solve. the question

(Lambert’s cylindrical projection) Project the unit sphere (except for the north and south poles) radially outward to the cylinder of radius $1$ by sending $(x,y,z)$ to $(x/\sqrt{(x^2+y^2)},y/\sqrt{(x^2+y^2)},z)$

Check that this map preserves area, but is neither a local isometry nor conformal.

Hint: Let $x(u,v)$ be the spherical coordinates parametrization of the sphere, and consider $x^*(u,v)=(cos(v),sin(v),cos(u)$}

Thank you very much thanks

-
 This goes back to Archimedes. What do you understand so far? What condition would tell you that a mapping from one surface to another preserved area? And, what book are you using? – Will Jagy Feb 23 at 6:53 Maybe this will work. This is the image Archimedes wanted on his tombstone: en.wikipedia.org/wiki/File:Archimedes_sphere_and_cylinder.svg – Will Jagy Feb 23 at 6:56 And believed discovery, later, by the Roman, Cicero: en.wikipedia.org/wiki/… – Will Jagy Feb 23 at 6:58 the book name elementary differential geometry 2nd edition by springer – leena adam Feb 23 at 7:20 I didnot get the idea also if anyone expert i hope help me to solve and explain – leena adam Feb 23 at 7:21

Use spherical coordinates $\phi$, $\theta$, where $\theta=0$ on the equator, and produce corresponding points on the sphere $S^2$ and the cylinder $C$ as follows: \eqalign{(\phi,\theta)\mapsto{\bf r}(\phi,\theta)&:=(\cos\phi\cos\theta,\sin\phi\cos\theta, \sin\theta)\ ,\cr (\phi,\theta)\mapsto{\bf f}(\phi,\theta)&:=(\cos\phi,\sin\phi, \sin\theta)\ .\cr} In this way Lambert's projection $L$ appears as $$L:\ S^2\to C\ ,\qquad {\bf r}(\phi,\theta)\to{\bf f}(\phi,\theta)\ .$$ Then compute \eqalign{{\bf r}_\phi&=(-\sin\phi\cos\theta,\cos\phi\cos\theta,0),\quad {\bf r}_\theta=(-\cos\phi\sin\theta,-\sin\phi\sin\theta,\cos\theta),\cr {\bf f}_\phi&=(-\sin\phi,\cos\phi,0),\quad {\bf f}_\theta=(0,0,\cos\theta)\ .\cr} The fact that $$|{\bf r}_\phi|=\cos\theta\ne 1=|{\bf f}_\phi|\qquad(\theta\ne0)\tag{1}$$ already proves that $L$ is not an isometry: Equation (1) says that a piece of parallel at latitude $\theta$ on the sphere has length $$\int_{\phi_0}^{\phi_1}|{\bf r}_\phi|\ d\phi=(\phi_1-\phi_0)\cos\theta\ ,$$ while the projected arc has length $(\phi_1-\phi_0)$, given that $\phi_1>\phi_0$. Second, from $${|{\bf r}_\phi|/|{\bf f}_\phi|\over |{\bf r}_\theta|/|{\bf f}_\theta|}=\cos^2\theta\ne1\qquad(\theta\ne0)\tag{2}$$ one then deduces that the projection cannot be conformal, even though the right angle between ${\bf r}_\phi$ and ${\bf r}_\theta$ is preserved. Equation $(2)$ says that at any point ${\bf p}:={\bf r}(\phi,\theta)\in S^2$ where $\theta\ne0$ the local dilatations of the parallel and the meridian through ${\bf p}$ under $L$ are different. For a conformal map the dilatations in all directions emanating from ${\bf p}$ would have to be equal.
Finally one computes $$|{\bf r}_\phi\times{\bf r}_\theta|=\cos\theta=|{\bf f}_\phi\times{\bf f}_\theta|\ .$$ This shows that to an infinitesimal rectangle in the parameter plane correspond isoareal infinitesimal rectangles on $S^2$, resp. $C$. Therefore the projection is area-preserving.


text:
# How do you find this eigenvector?

1. Oct 18, 2012

### msell2

[0 1]
[-2 -2] This is the 2x2 matrix.

[λ -1]
[2 λ+2] This is the matrix that equals λI - A.

Here are the eigenvalues I found:
λ = -1 + i, -1 - i

I am really confused at what to do next to find the eigenvectors. I keep looking online for help but I still can't figure it out...

Thanks!

2. Oct 18, 2012

### Dick

Now put one of your eigenvalues into λI - A and try to find a vector v such that (λI - A)v=0. Then v would be an eigenvector of λ. It's just a set of linear equations to solve with a free parameter.

3. Oct 18, 2012

### LCKurtz

For $\lambda$ equal an eigenvalue, your two equations are dependent, so you only need to solve one and you have one free variable. The first one is the same as $\lambda x - y =0$ or $y = \lambda x$. So let $x = 1$ and what do you get for $y$? Do that for each value of $\lambda$ and you will have two [x,y] eigenvectors.

4. Oct 18, 2012

### msell2

I get what I need to do in theory, I just don't actually know how to do it. How do you find v such that (λI-A)v=0?

5. Oct 18, 2012

### Dick

Just try it! What is the matrix (λI-A) when λ=-1+i? Write that matrix times a vector (x,y), set it equal to zero and try to find a solution for x and y.


text:
# nLab Eugene Mele

Selected writings

## Selected writings

Observation that graphene appears as a topological insulator when its spin-orbit coupling is resolved, due to a quantum spin Hall effect:

Characterization of the resulting topological phase of matter via introduction fo the Kane-Mele invariant:

category: people

Last revised on May 25, 2022 at 14:46:33. See the history of this page for a list of all contributions to it.


text:
# nLab localization of a ring

### Context

#### Higher algebra

higher algebra

universal algebra

# Contents

## Idea

Given a (possibly noncommutative) unital ring $R$ there are many situations when certain elements or matrices can be inverted in a universal way obtaining a new “localized” ring ${S}^{-1}R$ equipped with a localization homomorphism $R\to {S}^{-1}R$ under which all elements in $S$ are mapped to multiplicatively invertible elements (units). The latter property must be modified for Cohn localization at multiplicative set of matrices.

We can typically invert elements in a left or right Ore subset $S\subset R$ or much more generally some multiplicative set or matrices (Cohn localization) etc. There are also some specific localizations like Martindale localizations in ring theory.

## References

• Zoran Škoda, Noncommutative localization in noncommutative geometry, London Math. Society Lecture Note Series 330 (pdf), ed. A. Ranicki; pp. 220–313, math.QA/0403276.

Revised on October 17, 2012 19:19:25 by Urs Schreiber (131.174.188.58)


text:
# Memory Scanning: New Findings and Current Controversies

@article{Sternberg1975MemorySN,
title={Memory Scanning: New Findings and Current Controversies},
author={Saul Sternberg},
journal={Quarterly Journal of Experimental Psychology},
year={1975},
volume={27},
pages={1 - 32}
}
• S. Sternberg
• Published 1975
• Psychology
• Quarterly Journal of Experimental Psychology
Introduction : the reaction-time method in memory research. The item-recognition paradigm. Early findings and interpretations : the exhaustive-search model. Generalizations and extensions of paradigm and phenomenon. Findings that challenge the model or limit its scope, and what to do about them. Alternative models of the comparison process. 6. I Self-terminating search. 6.2 Trace-strength discrimination. 6.3 Parallel comparisons. New findings. 7.1 The translation effect. 7.2 Partial selectivity… Expand
903 Citations

#### Figures and Tables from this paper

The structure of short-term memory scanning: an investigation using response time distribution models
• Psychology, Medicine
• Psychonomic bulletin & review
• 2012
This investigation formalizes a variety of models designed to account for detailed response time distribution data in the classic Sternberg memory-scanning task, and finds that under fast presentation rate conditions, the parallel and global access models provide far better accounts of the data than does the serial model. Expand
Memory Search: A Matter of Time
Memory search is considered based on studies that have measured the retrieval dynamics of recognition and recall including the analyses of mean response time, response time distributions, and speed–accuracy trade-off functions to conclude that item recognition is based on a matching process that is carried out in parallel. Expand
Task conditions and short-term memory search: two-phase model of STM search
• Psychology
• 2016
Short-term memory (STM) search, as investigated within the Sternberg paradigm, is usually described as exhaustive rather than self-terminated, although the debate concerning these issues is stillExpand
Recency, immediate recognition memory, and reaction time
Abstract Four classes of possible mechanisms for short-term item recognition are distinguished: (I) pure list-search, (II) direct-access activation (or trace strength) discrimination, (III) mixturesExpand
A Theory of Memory Retrieval.
A theory of memory retrieval is developed and is shown to apply over a range of experimental paradigms, and it is noted that neural network models can be interfaced to the retrieval theory with little difficulty and that semantic memory models may benefit from such a retrieval scheme. Expand
Self-terminating versus exhaustive processes in rapid visual and memory search: An evaluative review
• Psychology, Medicine
• Perception & psychophysics
• 1993
This study summarizes past and recent theoretical results on the ability of self-terminating and exhaustive models to predict differences in slopes between positive and negative set-size functions, as well as position effects. Expand
Recognition memory and attentional selection: serial scanning is not enough.
• Psychology, Medicine
• Journal of experimental psychology. Human perception and performance
• 1986
In two experiments, using memory sets of up to 10 letters, the response competition paradigm was employed to investigate the extent to which extraneous visual stimuli interfere with or affect theExpand
Exhaustive Memory-Scanning and Familiarity Discrimination: Separate Mechanisms in Recognition Memory Tasks
Experiment I was a yes-no recognition task with lists of one, two or four items to remember. Each item in the experiment appeared in only one list, and each list was presented only once. One group ofExpand
Retrieval Processes in Recognition Memory
• 1976
A method of analyzing reaction time data in recognition memory is presented, which uses an explicit model of latency distributions. This distributional method allows us to distinguish betweenExpand
Reaction time and short term memory : Implication of negative set-1
High speed exhaustive scan hypothe~is was investigated using a modified Sternberg's RT technique. The difference of information processing methods under the varied response patternse establishedExpand

#### References

SHOWING 1-10 OF 91 REFERENCES
Reaction Time and Short-term Memory: Implications of Repetition Effects for the High-speed Exhaustive Scan Hypothesis *
• Computer Science
• 1973
Recognition memory for sub-span digit sequences was investigated using Stern-berg's varied-set RT technique and observed faster recognition of repeated items, which is predicted by Sternberg's highspeed exhaustive scanning hypothesis. Expand
Reaction Time Measurements in the Study of Memory Processes: Theory and Data1
This chapter presents a serial, self-terminating memory scanning model to account for human behavior in stimulus identification, naming, choice-reaction, and (memory scanning) character classification tasks. Expand
Test Stimulus Representation and Experimental Context Effects in Memory Scanning.
• Psychology
• 1971
The 5s performed a memory-scanning task in which they indicated whether or not a given test stimulus (letter or picture) matched one of a previously memorized set of letters. The test stimuliExpand
Recognition reaction time and size of the memory set: A developmental study
• Psychology
• 1970
Kindergarten, fourth-grade, and college Ss were tested on a recognition reaction-time task with memory sets of two, three, and four items. Though overall reaction time (RT) varied with age, theExpand
Retrieval of contextual information from memory
When Ss name the item that follows a test item in a short recently memorized list, their mean reaction-time ($\overline {\rm RT}$) increases linearly with list length. The linearity and slope of theExpand
Memory scans based on alternative test stimulus representations
• Psychology
• 1970
In a search task similar to that used by Sternberg (1966), Ss were presented with one of three alternative representations of a given stimulus and were required to state whether or not that stimulusExpand
Organization and long-term memory search
• D. Homa
• Psychology, Medicine
• Memory & cognition
• 1973
Evidence was presented that categories recently probed may provide for a short-circuiting of the category search, and a theory of .high-speed scanning for categorized material was proposed in which a serial and exhaustive search of the categories is first undertaken. Expand
Recognition time for information stored in long-term memory
• Computer Science
• 1971
Investigation of the effects of number of words in a target set and the nature of distractor words on the latency of both positive and negative recognition responses found response latency to be an increasing function of memory list length. Expand
Recoding processes in recognition: Some effects of presentation rate
• Psychology, Medicine
• Memory & cognition
• 1973
Character classification time was studied in a situation in which Ss sometimes had to decide whether a probe item was a translation of a remembered item according to a previously learned translation scheme, contradicting Cruse and Clifton's (1973) hypothesis that Ss translated all remembered items into the form of the probe after the probe was presented. Expand
Memory scanning for words versus categories
• Mathematics
• 1971
Two groups of Ss compared a target word with a memory set consisting of from one to four words (Group W) or from one to four semantic categories (Group C). The Ss made a positive or a negativeExpand


text:
Lesson 8Functioning with ParabolasSolidify Understanding

Find a square piece of paper. (Patty paper works best, but a sticky note would work, too.)

Fold the square in half vertically, and put a dot anywhere on the fold. Make several dots along the bottom edge of the paper. Let the bottom edge of the paper be the directrix and the dot be the focus. Fold the bottom edge of the paper up so each dot on the bottom touches the dot in the vertical fold. Make a crease each time you match a dot along the bottom to the focus dot. Do this repeatedly from different points along the bottom edge. (If you can’t see your fold lines, each time you fold the bottom of your paper up to the dot, put a mark on the fold.)

The fold lines between the focus and the edge should make a parabola.

Experiment with a new paper and move the focus.

1.

How would the parabola change if the focus were moved up, away from the directrix?

2.

How would the parabola change if the focus were moved down, toward the directrix?

3.

How would the parabola change if the focus were moved down, below the directrix?

4.

How would the parabola look if the directrix were a vertical line?

5.

Place a dot representing the focus in an approximate position relative to this curve.

Set

6.

Verify that is the equation of the parabola in figure 1 by substituting in the three points , , and .

Show your work for each point.

7.

If you didn’t know that was the vertex of the parabola, could you have found it by just looking at the equation? Explain.

8.

Use the diagram to derive the equation of a parabola based on the geometric definition of a parabola. Remember that the definition states that .

9.

Recall the equation in problem 6, . What is the value of ?

10.

In general, what is the value of for any parabola?

11.

In figure 3, the point is the same height as the focus and . How do the coordinates of this point compare with the coordinates of the focus?

12.

Fill in the missing coordinates for and in the diagram.

Sketch the graph by finding the vertex and the points and (the reflection of ) as defined in the previous diagram. Use the geometric definition of a parabola to find the equation of these parabolas.

13.

Directrix , Focus

Vertex:

Equation:

14.

Directrix , Focus

Vertex:

Equation:

15.

Directrix , Focus

Vertex:

Equation:

16.

Directrix , Focus

Vertex:

Equation:

Go

Find the maximum or minimum value of each quadratic function by completing the square on the expression that defines it.


text:
# Kirchhoff's rules

Linear electrical networks
Ideal element

Electrical component

Series and parallel connection

Network transformations

Generator sets Network sentences

Network analysis methods

Two-port parameters

The Kirchhoff's laws are within the electrical circuitry in the network analysis used. They are divided into two basic and related sentences, the node sentence and the mesh sentence, and each describe the relationship between several electrical currents and between several electrical voltages in electrical networks. They were formulated in 1845 by Gustav Robert Kirchhoff after they had been discovered by Carl Friedrich Gauß in 1833 .

## The node theorem (node rule) - 1. Kirchhoff's law

At a node in an electrical network, the sum of the incoming currents is equal to the sum of the outgoing currents.

If you arrows on all adjacent branch streams in such a way that all associated counting arrows point towards the node or all associated arrows point away from the node, you can write down the node set for a node with branch streams as follows: ${\ displaystyle n}$

${\ displaystyle \ sum _ {k = 1} ^ {n} {I} _ {k} = 0}$

This rule initially applies to DC networks.

For alternating current networks it applies on condition that only concentrated components are used and thus, for example, there are no charge storage effects in the nodes and lines due to the capacities available there.

Instead of the time values, one can also look at the vector representations of the currents:

${\ displaystyle \ sum _ {k = 1} ^ {n} {\ underline {I}} _ {k} = 0}$

For a network with nodes, linearly independent node equations can be set up. ${\ displaystyle m}$${\ displaystyle m-1}$

### extension

If one assumes concentrated components, the node rule applies not only to individual nodes, but also to entire circuits. However, it is assumed that the node remains electrically neutral. Would you like B. consider only one capacitor plate (and not the entire capacitor), this requirement is no longer met. In this case one would have to add the so-called displacement current that flows between the capacitor plates. Ampère's law must be used to describe these no longer source-free fields .

### Example of a node

Electricity nodes with incoming and outgoing currents

As can be seen in the picture, the currents and flow into the node and the currents , and flow out of the node. The following formula results from the knot rule: ${\ displaystyle I_ {1}}$${\ displaystyle I_ {3}}$${\ displaystyle I_ {2}}$${\ displaystyle I_ {4}}$${\ displaystyle I_ {5}}$

${\ displaystyle I_ {1} + I_ {3} -I_ {2} -I_ {4} -I_ {5} = 0}$

or transformed:

${\ displaystyle I_ {1} + I_ {3} = I_ {2} + I_ {4} + I_ {5}}$

### Example of a network node

Network with incoming and outgoing streams

Entire networks can also be viewed as nodes. In the example, the alternating currents flow into and into the node and the current out of the node. ${\ displaystyle {\ underline {I}} _ {1}}$${\ displaystyle {\ underline {I}} _ {2}}$${\ displaystyle {\ underline {I}} _ {3}}$

The following applies:

${\ displaystyle {\ underline {I}} _ {1} + {\ underline {I}} _ {2} - {\ underline {I}} _ {3} = 0}$

Are the following complex rms values given for the incoming currents (with the imaginary unit customary in electrical engineering ): ${\ displaystyle \ mathrm {j}}$

${\ displaystyle {\ underline {I}} _ {1} = \ mathrm {3 \, A \ cdot e ^ {j \ cdot 15 ^ {\ circ}}}}$
${\ displaystyle {\ underline {I}} _ {2} = \ mathrm {1 \, A \ cdot e ^ {- j \ cdot 35 ^ {\ circ}}}}$

For the outflowing current, the node rule results in:

${\ displaystyle {\ underline {I}} _ {3} = {\ underline {I}} _ {1} + {\ underline {I}} _ {2} = \ mathrm {3 \, A \ cdot e ^ {j \ cdot 15 ^ {\ circ}} + 1 \, A \ cdot e ^ {- j \ cdot 35 ^ {\ circ}} \ approx 3 {,} 73 \, A \ cdot e ^ {j \ cdot 3 {,} 12 ^ {\ circ}}}}$

## The set of stitches (rule of stitches) - 2. Kirchhoff's law

Example for the application of the mesh set: The partial voltages U 1 to U 5 add up to zero. The voltage arrows used in the illustration determine the counting direction for the sign.

All partial voltages of a circuit or a mesh in an electrical network add up to zero. The direction of the rotation can be chosen arbitrarily; but it then defines the signs of the partial voltages. As far as counting arrows point against the direction of rotation, the voltages must be used with the opposite sign.

In a cycle with partial voltages of an electrical network, the following formula applies: ${\ displaystyle n}$

${\ displaystyle \ sum _ {k = 1} ^ {n} U_ {k} = 0}$

This rule also applies to any time-dependent currents and to networks with non-linear components.

In AC networks, the sum of the complex rms values or complex amplitudes of the voltage can be considered:

${\ displaystyle \ sum _ {k = 1} ^ {n} {\ underline {U}} _ {k} = 0}$

In this case, however, the mesh equation only applies to the terminal voltages. This does not correspond to the electric field strength in the components themselves (for example within the coil wire).

A network with branches and independent nodal equations has independent mesh equations. ${\ displaystyle z}$${\ displaystyle m}$${\ displaystyle zm}$

## background

A simple circuit

Both Kirchhoff's rules are conclusions from physical conservation laws , the 1st and 3rd Maxwell's equation :

• The node rule describes the conservation of electrical charge and states that charges are neither destroyed nor temporarily stored in the nodes.
• The mesh rule describes the conservation of electrical energy in electrostatics . This means that a charge does no work on the electric field in a single cycle of the circuit. In the simple circuit opposite, the charges move within the resistance with the electric field, and within the voltage source they move towards the field.${\ displaystyle Q}$

The mesh rule is formally a conclusion from the law of induction . It only applies in the event that there is no change in the magnetic flux within the mesh ( ) and thus no energy is fed into or removed from the network by magnetic means. In the absence of alternating magnetic fields, the law of induction delivers ${\ displaystyle \ mathrm {d} \ Phi / \ mathrm {d} t = 0}$

${\ displaystyle \ oint E \, \ mathrm {d} s = - {\ frac {\ mathrm {d} \ Phi} {\ mathrm {d} t}} = 0}$,

which corresponds exactly to the statement of the mesh rule. The term denotes the circulating voltage for a path that bypasses the components but contains their poles . ${\ displaystyle \ oint E \, \ mathrm {d} s}$

When using the kirchhoff equations, it should generally be noted that all connections between the individual circuit elements are assumed to be ideally conductive. In addition, the components are considered to be concentrated components. Concentrated components can be fully described in their electrical behavior by the currents flowing at the connections and external voltages. If there are non-concentrated components in the circuit to be examined, these must be replaced by equivalent circuits of concentrated circuit elements.

The presentation of the general Kirchhoff rules has been modified in various ways for practical applications. Among other things, Millman's sentence, which is common in English-speaking countries, describes a method based on Kirchhoff's rules to determine the total voltage of several voltage and current sources connected in parallel .

## Detection of time-varying external magnetic fields

If through the mesh of a network with field-encapsulating passive or active elements (e.g. resistors, capacitors, coils, diodes, electric motors, power plant generators, electrochemical cells, thermocouples, photocells, etc.) external (not excited by the currents of the network) time-varying flows step, the main requirement of Kirchhoff's mesh theorem is (namely ) violated. Then the voltage equation that can be derived with the law of induction applies to a mesh${\ displaystyle \ Phi (t)}$${\ displaystyle \ mathrm {d} \ Phi (t) / \ mathrm {d} t = 0}$

${\ displaystyle \ sum \ limits _ {k = 1} ^ {n} {} U_ {k} = - {\ frac {\ mathrm {d} \ Phi} {\ mathrm {d} t}}}$.

The left side of the equation is exactly as above (i.e. without an external magnetic field) using the terminals to form voltages of the elements. The direction of rotation of the summation can no longer be chosen arbitrarily, but must be oriented clockwise with the reference direction of the magnetic flux.

The case occurs z. B. in geomagnetically induced currents .


text:
# Integrating $\int_0^\infty \frac{1}{x^2 + 2x + 2} \mathrm{d} x$

I've been trying to integrate this:

$$\int_0^\infty \frac{1}{x^2 + 2x + 2} \mathrm{d} x .$$

Unfortunately I haven't found a way so far. I've been trying to factor the denominator in order to end up with partial fractions. Is there a way to factor it? If so, I can't remember any, so if you could remind me how to do it, it would be nice.

-

Try using the equation: $x^2+2x+2=(x+1)^2+1$

-
Thanks, that would make $arctan(x+1)$ + C However, as I said, I can't remember how to factor it, could you point out how you make it? I mean, I can do it, but what are the circumstances where you have to do this? Thanks. –  Pacane Apr 20 '11 at 23:35
@Pacane: This is a special case of "completing the square." Wikipedia has an article on it. –  Grumpy Parsnip Apr 20 '11 at 23:49
@Pacane: Use substitution $u=x+1$ –  Américo Tavares Apr 20 '11 at 23:50
@Pacane Well, it doesn't factor, at least over the real numbers. It does factor over the complex numbers, in which case, you can write it as: $(x+1-i)(x+1+i)$. As for factoring quadratics, see the Wikipedia article mentioned by Jim Conant: en.wikipedia.org/wiki/Completing_the_square –  Thomas Andrews Apr 20 '11 at 23:56
Thanks for your help! –  Pacane Apr 21 '11 at 0:29

$$\int\limits_0^\infty \frac{dx}{x^2+2x+2}= \lim\limits_{t\to\infty}\int\limits_0^t\frac{dx}{x^2+2x+2}= \lim\limits_{t\to\infty} \arctan(x+1)|_0^t=$$ $$\lim\limits_{t\to\infty} \arctan(t+1)-\arctan(1)=\frac{\pi}{2}-\frac{\pi}{4}=\frac{\pi}{4}$$

-
hi i am new to this forum. can anyone tell me how to compose the mathematical equations on this forum. –  KaySid Dec 26 '11 at 21:37
do it like this $\int \mathrm{d}x$ (becomes $\int \mathrm{d}x$) and right click on equations to see how the source. –  user16697 Dec 26 '11 at 21:39


text:
What's the difference between “balance laws” and “conservation laws”?

What's the difference between "balance laws" and "conservation laws" ? Can someone give me some examples?

In the partial differential equations literature, the terms conservation law and balance law refer to particular types of first-order PDEs in space and time. Such equations are very common in physics since they express the conservation of a quantity over time (cf. the divergence theorem and the continuity equation). The use presented hereinafter is quite common.

Systems of conservation laws are equations of the form $$\partial_t\boldsymbol{u} + \sum_{k=1}^d \partial_{x_k} \boldsymbol{f}_k(\boldsymbol{u}) = \boldsymbol{0}\, ,$$ where $\boldsymbol{u} \in \Bbb R^p$ is the vector of conserved variables, $\boldsymbol{f}_k \in \Bbb R^p$ is the flux along the $k$th spatial direction, and $d$ denotes the spatial dimension. A single conservation law corresponds to the case $p=1$. Typical examples are the linear advection equation $u_t + u_x = 0$ and the inviscid Burgers equation $u_t + uu_x = 0$.

Systems of balance laws are systems of conservation laws with some additional terms, such as the relaxation term $\boldsymbol{r}(\boldsymbol{u})$ in $$\partial_t\boldsymbol{u} + \sum_{k=1}^d \partial_{x_k} \boldsymbol{f}_k(\boldsymbol{u}) = \boldsymbol{r}(\boldsymbol{u})\, .$$ A typical example of a single such balance law is the Burgers equation with relaxation $u_t + uu_x = -u$.

Remark. Many authors use sometimes the term balance law for the particular case of conservation laws. In practice, the vocabulary may vary from one author to another, so it is hard to make a clear semantic distinction between conservation laws and balance laws.

Balance laws refer to quantities that balance each other, like forces.

Conservation laws refer to quantities that are conserved in a closed system, like energy and momentum.

• @Darry If this answers your question, you should accept it (and answers to all your other questions too) – Max Nov 2 '12 at 14:13

Consider a continuum, say a fluid, in a domain $\Omega$. Let $V$ be a subset of $\Omega$. It is a portion of the continuum for which we are measuring some quantity, say $G$. Then the rate of change of $G$ in $V$ can be written as $$\frac{d}{dt}\int GdV = -\int G_1\vec{v}\cdot\hat{n}dS + \int G_2dV + \int G_3 dV,$$ where $G_1\vec{v}$ is the flux of $G$ through the boundary $\partial V$ of $V$, $G_2$ is the supply of $G$ from outside of $V$ and $G_3$ is the source or sink of $G$ within $V$. A balance law becomes a conservation law when $G_3 = 0$.

Refer to 'Stability Criteria for Fluid Flows' by Georgescu and Palese for examples of balance laws that are not conservation laws.