Clustering, density estimation, and anomaly detection · Biclustering · UCL036 · Algorithm
Cheng–Church biclustering
Find subsets of rows and columns with coherent additive patterns, such as genes responding similarly only under particular experimental conditions. A bicluster need not include every row or every column.
In CodeSplash
A CodeSplash method runs this entry in Python and R. Set it up from the method's page.
- Biclustering (rows × columns) Verified in Python and R
Do it in CodeSplash Run it on your own data, in Python or R.
- Availability
- Runs in CodeSplash
- Code example
- Component demo, not a trained model
- Who ran it
- CodeSplash's run and the reference's record
- CodeSplash's run
- Verified in Python and R through discover.bicluster. The reference's example ran in Python and R here, and they agree.
- The reference's record
- Python: Ran in the reference's review. The report doesn't record which version of the code ran. R: Reviewed but not run: R wasn't available to the reference's authors.
Purpose
Find subsets of rows and columns with coherent additive patterns, such as genes responding similarly only under particular experimental conditions. A bicluster need not include every row or every column.
Question / hypotheses
Which row and column groups exhibit coherent joint structure in the measurement matrix? This entry defines an estimation or optimization objective, not an intrinsic null/alternative hypothesis test.
Architecture / computational structure
Greedy row/column selection driven by additive residuals, with repeated masking if requested.
Assumptions
Additive coherence is the target; multiplicative effects may need a justified transformation. Greedy deletion/addition can miss alternative biclusters, and masking found regions changes later searches.
Formula / computational definition
Mean squared residue is , where the three means are row, column, and overall means within the selected submatrix. Search seeks large submatrices with residue below a threshold.
Parameters and notation
Learned or fitted quantities: Selected row and column subsets for each bicluster. User-set hyperparameters/design choices: Set residue tolerance, number of biclusters, size preferences, and masking strategy. Tune these against the stated objective and stability/validation criteria; do not select settings on the final evaluation set.
Fitting, fine-tuning, and adaptation
Neural fine-tuning is not applicable. Refit row/column structure when new measurements change normalization. To evaluate prediction, hide entries before fitting; do not select a bicluster on all entries and then report its in-sample coherence as held-out evidence.
How to use and calibrate
Report residue alongside area, overlap, held-out coherence, and biological or domain relevance. Tiny biclusters can have trivially low residue, so score alone is insufficient. Correct for multiplicity when testing many discovered patterns later.
Example application
Find genes whose expression shifts coherently under only some conditions. Define the reference population, measurement units, and success criterion before fitting; investigate whether discovered groups or alerts reflect the intended phenomenon.
Interpretation / pitfalls
Watch out
The reported result is conditional on the representation and objective. A stable partition can reflect nuisance structure such as batch, collection site, or missingness. Confirm the interpretation in original variables and an independent sample.
Python and R code examples
Implement residue calculation natively; full fitting requires the published row/column deletion, addition, and masking procedure or a verified specialized package. The paired code is a residue diagnostic, not a complete bicluster search.
Component: Cheng–Church mean squared residue. Python: executed successfully; R: not executed (Rscript unavailable). These small fixtures establish the arithmetic operation, not full-method accuracy or reproduction of paper results.
Python and R
The reference's own programs, shown as written. A component demo shows one central piece of the method; it doesn't train a full model.
Component demo, not a trained model — Cheng–Church mean squared residue. · needs numpy
import numpy as np
A=np.array([[1.,2.,4.],[2.,3.,5.],[4.,5.,8.]])
R=A-A.mean(1,keepdims=True)-A.mean(0,keepdims=True)+A.mean()
result=np.mean(R**2)
print(result)
Component demo, not a trained model — Cheng–Church mean squared residue.
A=rbind(c(1,2,4),c(2,3,5),c(4,5,8))
R=sweep(sweep(A,1,rowMeans(A)),2,colMeans(A))+mean(A)
result=mean(R^2)
print(result)
Sources
- Source 1cs.princeton.edu
From the CodeSplash reference, entry UCL036.