SpatialDE.TissueSegmentationParameters

class SpatialDE.TissueSegmentationParameters(nclasses=None, neighbors=None, smoothness_factor=2, class_prune_threshold=1e-06, abstol=1e-12, reltol=1e-12, maxiter=1000, gamma_1=1e-14, gamma_2=1e-14, eta_1=1, eta_2=1)

Parameters for tissue segmentation.

Parameters:
  • nclasses (Optional[int]) – Maximum number of regions to consider. Defaults to the square root of the number of observations.

  • neighbors (Optional[int]) – Number of neighbors for the nearest-neighbor graph. Defaults to a fully connected graph (there is no speed difference). A value of 0 makes the model ignore spatial information and reduces it to a Poisson mixture model with a Dirichlet process prior.

  • smoothness_factor (float) – Spatial smoothness. Larger values induce more fine-grained segmentations. This value will be multiplied with the minimum squared distance within the data set, so it is dimensionless. Defaults to 2.

  • class_prune_threshold (float) – Probability threshold at which unused regions are removed. Defaults to 1e-6.

  • abstol (float) – Absolute convergence tolerance. Defaults to 1e-12.

  • reltol (float) – Relative convergence tolerance. Defaults to 1e-12.

  • maxiter (int) – Maximum number of iterations. Defaults to 1000.

  • gamma_1 (float) – Parameter of the Poisson mean prior, defaults to 1e-14.

  • gamma_2 (float) – Parameter of the Poisson mean prior, defaults to 1e-14.

  • eta_1 (float) – Parameter of the Dirichlet process hyperprior, defaults to 1.

  • eta_2 (float) – Parameter of the Dirichlet process hyperprior, defaults to 1.