Workshop 2, Module 6
We ran every method this week twice, once on each table. Today we ask when to use both at once.
Sort them: predict, find shared patterns, explain a mechanism, or a one-table question.
| the question is about | reach for | today |
|---|---|---|
| comparing groups | one table at a time, grouped by the other | next |
| explaining a mechanism | a causal diagram first, then often a different study | DAGs |
| finding features that move together | CCA, PLS | mixOmics |
| what is shared, and what belongs to one table | MOFA | MOFA |
| types of people who look alike in every table | STATIS, mixKernel, SNF | people, not features |
| predicting an outcome | scores in one model, DIABLO | DIABLO |
Question 6 needs one table and a grouping. Questions 1 and 5 are about cause, and no method on this list answers them alone.
You have already done this.


The methods later today keep more of the information, and their results are harder to put in one sentence.
A DAG (directed acyclic graph) is a drawing of what you think causes what.
You draw it before you look at the data, from what you know about the biology.
Grey boxes are things nobody in this cohort measured.
The species and genes are real sequencing data. The outcome was built from these two causes and nothing else.

Two causes, no arrow between them. Predict before the next slide: does adding the second table help?
The two scores correlate at 0.03. That is a feature of how we built the data.
In real cohorts, an anaerobic community and an inflamed epithelium are strongly correlated.
Rank by AUC and you would call Nugent and IL-1β drivers of preterm birth. In the model that made these data, neither one does anything.
Workshop 3 will focus on modelling and uncertainty, in April 2027.
Most of what follows is a small tour of methods from mixOmics, with a couple of alternatives that are not on that site.
| method | the question | on mixOmics |
|---|---|---|
| CCA, PLS, sparse PLS | which features move together across two tables? | yes |
| MOFA | what structure is shared, and what belongs to one table? | no |
| STATIS, mixKernel, SNF | which people look alike across every table? | mixKernel is a companion |
| DIABLO | which features from both tables separate the groups? | yes |
| two scores in one model | does the second table add to the prediction? | no |


The genes it picked move together far more than random genes.



| starts from | methods | gives you |
|---|---|---|
| the tables of features | PCA, MOFA, sparse PLS, DIABLO | axes of variation, and a weight for every feature |
| a similarity matrix per table | STATIS, DISTATIS, mixKernel, SNF | a map or clusters of people |
DIABLO builds a mix of species and a mix of genes. It scores each pair on:
At design 0 it fits each table on its own. Higher values push the two tables toward a shared axis, possibly at the cost of separation.

Here, more agreement cost nothing. In data with a strong signal in only one table, it can.
Cross-validated AUC, predicting people the model did not see: real labels 0.72, shuffled labels 0.43. Only the cross-validated number tells them apart.


# one row per person, values averaged over the 3 visits
glm(preterm ~ anaerobe_fraction + inflammation_score,
family = binomial)
block.splsda(list(species = clr_species, # 10% prevalence
genes = top_2000_genes), # most variable
outcome, ncomp = 2, design = 0.1,
keepX = list(species = c(10, 10), genes = c(50, 50)))With 157 people and over 2,000 features, you can find a combination that separates any two groups, as the shuffled labels showed.
Every number you report should come from people the model did not see: cross-validation, or better, a separate cohort.
Any step that looks at the labels, including choosing features or settings, goes inside the cross-validation.

The improvement is real. Report its size with the interval, and say how the scores were chosen.
Thirty minutes to finish preparing. Then each Study A group pairs with the Study B group of the same number: A1 presents to B1 for 30 minutes, then B1 presents to A1.
Tell the other group what you asked, what you found, and what you do not believe about your own result.