Skip to content

Sijianf/BiSSLB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BiSSLB R package badge

BiSSLB: Binary Spike-and-Slab Lasso Biclustering for binary matrices

BiSSLB is an R package for performing sparse biclustering on binary matrices. It uses spike-and-slab lasso priors on matrix factorizations to reveal interpretable biclusters. The core computations are accelerated using Rcpp and RcppArmadillo.


🔧 Installation

To install the development version of the package from GitHub:

# Install devtools if not already installed
install.packages("devtools")

# Install BiSSLB from GitHub
devtools::install_github("sijianf/BiSSLB")

📦 Package Overview

The BiSSLB package includes the following key functions:

Function Description
BiSSLB() Main interface to run biclustering on a binary matrix
BiSSLB_ladder() Run BiSSLB across a grid of spike prior parameters
main_iterations() Core C++ engine performing iterative updates (not user-facing)
get_thetas() Estimate sparsity parameters under spike-and-slab prior
get_logLikelihood() Compute the log-likelihood and BIC of current model state

🚀 Quick Start

library(BiSSLB)

# Simulate a binary matrix
set.seed(123)
Y <- matrix(rbinom(100, 1, 0.4), nrow = 10)

# Run BiSSLB with default settings
result <- BiSSLB(Y, K_init = 5)

# Inspect output
names(result)

# View estimated row/column profiles
image(result$A)
image(result$B)

🔁 Parameter Tuning Example

Use BiSSLB_ladder() to explore multiple regularization settings:

out_ladder <- BiSSLB_ladder(
  Y,
  tilde_lambda_0s = c(5, 10),
  lambda_0s = c(5, 10),
  tilde_lambda_1 = 1,
  lambda_1 = 1,
  K_init = 10
)

# Access results and BICs
str(out_ladder$results)
out_ladder$BICs

👉 Method Summary

BiSSLB models a binary matrix Y as:

$$p(y_{ij} = 1) = \text{sigmoid}(a_i^T b_j + \mu_i)$$

The matrices A and B are constrained by spike-and-slab lasso priors to induce sparsity. An optional IBP-style reordering helps emphasize interpretable structures during iteration.


📘 Documentation

You can view the documentation for all exported functions via:

?BiSSLB
?BiSSLB_ladder

📄 License

This package is licensed under the GPL-3 License. See the LICENSE file for details.

About

Binary spike and slab lasso biclustering

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors