Skip to contents

Builds the neighbour kernels and the random-effect design for continuous intensities, then fits them with the identity-link engine. The Gaussian counterpart of pace_fit_streaming(); see the notes at the top of this file for what differs and why they are kept apart.

Usage

pace_fit_streaming_gaussian(
  Y,
  df,
  types = NULL,
  celltype_col,
  image_col,
  coord_cols = c("x", "y"),
  h_bio = 30,
  h_tech = 5,
  eps = NULL,
  condition_col = NULL,
  kernel_per_image = FALSE,
  image_re = c("none", "intercept", "slopes", "condition_slopes"),
  drop_sparse_neff = 30,
  within_image = TRUE,
  n_iter = 32L,
  threads = 4L,
  chunk_size = 128L,
  tau_shrinkage = "adaptive",
  early_stop_tol = 0.02,
  min_iter = 12L,
  tau_max = 100,
  verbose = TRUE
)

Arguments

Y, df, types, celltype_col, image_col, coord_cols

Intensities, the model frame, the cell types and the columns naming them.

h_bio, h_tech, eps

Kernel bandwidths and the neighbour radius.

condition_col, kernel_per_image, image_re, drop_sparse_neff, within_image

Design options, as pace_fit_streaming() takes them.

n_iter, threads, chunk_size, tau_shrinkage, early_stop_tol, min_iter, tau_max

Fitting control, as pace_fit_streaming() takes them.

verbose

Print the fitting trace.

Value

A list with the fit, the model frame, the fixed-effect design, the intensities, the kernels and the cell types.