selectBestModel: Select best chain within each combination of parameters

Description Usage Arguments Value See Also Examples

View source: R/celdaGridSearch.R

Description

Select the chain with the best log likelihood for each combination of tested parameters from a 'celdaList' object gererated by 'celdaGridSearch()'.

Usage

1
selectBestModel(celdaList, asList = FALSE)

Arguments

celdaList

Object of class 'celdaList'. An object containing celda models returned from 'celdaGridSearch()'.

asList

'TRUE' or 'FALSE'. Whether to return the best model as a 'celdaList' object or not. If 'FALSE', return the best model as a corresponding 'celda_C', 'celda_G' or 'celda_CG' object.

Value

A new 'celdaList' object containing one model with the best log likelihood for each set of parameters. If only one set of parameters is in the 'celdaList', the best model will be returned directly instead of a 'celdaList' object.

See Also

'celdaGridSearch()' can run Celda with multiple parameters and chains in parallel. 'subsetCeldaList()' can subset the 'celdaList' object.

Examples

1
2
3
data(celdaCGGridSearchRes)
## Returns same result as running celdaGridSearch with "bestOnly = TRUE"
cgsBest <- selectBestModel(celdaCGGridSearchRes)

celda documentation built on June 9, 2020, 2 a.m.