cluster.sweep: Performs a hyperparameter sweep across lambda, nclust and...

Description Usage Arguments Value

View source: R/cluster_sweep.R

Description

Performs a hyperparameter sweep across lambda, nclust and quantile function for a dataset

Usage

1
2
3
4
5
6
7
8
9
cluster.sweep(
  X,
  coord,
  nclust = c(3, 6, 10),
  lambda = c(1),
  metrics = list(colMins = matrixStats::colMins, colMeds = matrixStats::colMedians,
    colMaxs = matrixStats::colMaxs),
  max.iter = 100
)

Arguments

X

An n x p matrix with n cells and p features

coord

An n x 2 matrix with X and Y coordinates for each cell

nclust

A vector of numbers of clusters to sweep

lambda

A vector of lambda values to sweep

metrics

A named list of quantile functions to sweep

max.iter

Maximum iterations per sweep

Value

A 'long' dataframe with cluster membership for each cell along with sweep information


jeliason/spatialkmeans documentation built on Dec. 20, 2021, 11 p.m.