Clustering, density estimation, and anomaly detection · Biclustering · UCL038 · Algorithm
Spectral biclustering
Recover checkerboard structure by independently grouping rows and columns, allowing every row-group/column-group pair to form a block. This differs from co-clustering's matched diagonal-block interpretation.
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
Recover checkerboard structure by independently grouping rows and columns, allowing every row-group/column-group pair to form a block. This differs from co-clustering's matched diagonal-block interpretation.
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
Matrix normalization, singular-vector selection, and separate row/column partitions.
Assumptions
Normalization choices encode additive versus multiplicative structure; sparse data and zeros complicate logarithmic normalization. The procedure assumes meaningful checkerboard organization rather than unrestricted overlapping submatrices.
Formula / computational definition
Normalize the matrix, compute singular vectors, and retain vectors well approximated by piecewise-constant structure. Cluster transformed row and column representations separately to obtain blocks. An explanatory block approximation is , with row labels , column labels , and block levels .
Parameters and notation
Learned or fitted quantities: Row groups, column groups, and optional block summaries. User-set hyperparameters/design choices: Set row/column cluster counts, normalization method, singular-vector budget, and restart settings. 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
Examine reordered heatmaps, block reconstruction, held-out entries, and independent stability of both partitions. Compare against simpler row-only clustering to establish added value.
Example application
Find a checkerboard of user groups and item categories. 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
Python has sklearn.cluster.SpectralBiclustering. R can bridge to this verified implementation or construct a custom normalization/SVD/partition pipeline. The component demo summarizes block means; it is not the entire singular-vector selection algorithm.
Component: Checkerboard block means for supplied row/column labels. 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 — Checkerboard block means for supplied row/column labels. · needs numpy
import numpy as np
A=np.array([[4.,3.,0.],[3.,4.,1.],[0.,1.,5.]])
r=np.array([0,0,1]); c=np.array([0,0,1])
result=np.array([[A[np.ix_(r==i,c==j)].mean() for j in range(2)] for i in range(2)])
print(result)
Component demo, not a trained model — Checkerboard block means for supplied row/column labels.
A=rbind(c(4,3,0),c(3,4,1),c(0,1,5)); rows=c(1,1,2); cols=c(1,1,2)
result=outer(1:2,1:2,Vectorize(function(i,j) mean(A[rows==i,cols==j,drop=FALSE])))
print(result)
Sources
- Source 1scikit-learn.org
From the CodeSplash reference, entry UCL038.