move_units_1: move_units_1

View source: R/move_units_1.R

move_units_1R Documentation

move_units_1

Description

Peform an iteration of the first move in the algorithm. That is move units from one cluster to another to improve the marginal likelihood

Usage

move_units_1(
  snp.object,
  partition,
  threshold = 1e-05,
  frac.clust.searched = 0.3,
  min.clust.size = 20,
  n.cores = 1
)

Arguments

snp.object

A snp.object containing the processed SNP data.

partition

An integer vector indicating an initial partition of the isolates.

threshold

The increase in marginal log likelihood required to accept a move.

frac.clust.searched

The percentage of a large cluster that will be moved.

min.clust.size

All isolates in clusters less than or equal to min.clus.size will be searched.

n.cores

The number of cores to use.

Value

The best partition after moving units from one cluster to another as well as a boolean value indicating whether a move increased the marginal likelihood.


rhierbaps documentation built on Nov. 18, 2022, 5:06 p.m.