smfishHmrf.generate.centroid: Generate cluster centroids, where input is given as a matrix.

Description Usage Arguments Value Examples

View source: R/smfishHmrf.hmrfem.R

Description

This function assumes that the input gene expression matrix file has been already loaded into a matrix. The function accepts a matrix and applies kmeans clustering to generate cluster centroids.

Usage

1
smfishHmrf.generate.centroid(y, par_k, par_seed = -1, nstart)

Arguments

y

expression matrix

par_k

number of clusters

par_seed

random generator seed (to fix it set it to above 0, or -1 if no fixing). Change the par_seed to vary the initialization.

nstart

number of starts (kmeans parameter). It is recommended to set nstart to at least 100 (preferrably 1000).

Value

A kmeans list with centers and cluster fields

Examples

1
2
data(seqfishplus)
kk<-smfishHmrf.generate.centroid(seqfishplus$y, par_k=9, par_seed=100, nstart=100)

smfishHmrf documentation built on Jan. 13, 2021, 12:54 p.m.