fullsearch: Search s for the best parameter

Description Usage Arguments Value See Also

View source: R/ArchitectureModel.R

Description

Optimize lossfunctionp. For basic usage, just give dat and it should do everything else for you. You sometimes have to change thresholds to fit the shape of your data; check this with architectureplot.

This is a 1-D non-convex optimization problem. The first challenge is that many parameters don't have a finite loss, so we first do a linesearch to identify a valid range.

We then either do a sequence of linesearches to arrive at a region, or go straight for a convex optimizer ("optimize" or "Brent" from optim). Line searches are slower but cope better with small datasets.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
fullsearch(
  dat,
  bins = defaultbins(),
  thresholds = c(2.5, 3),
  sigma = NULL,
  method = c("linesearch", "optimize"),
  nlinesearch = 2,
  nline = 21,
  range = c(-2, 2)
)

Arguments

dat

A data frame of (f,beta) pairs

bins

(Default: defaultbins) the histogram bins to use

thresholds

(Default :defaultthresholds) the tail areas to compare (in s.d units).

sigma

(Default: NULL, meaning use the best value) Genomic architecture sigma. Don't change unless you know what you are doing...

method

(Default: c("linesearch","optimize")) The set of all methods to use (out of "linesearch", "optimize" and "Brent"). Good values are c("linesearch","optimize"), which tries to find global maxima, and "Brent" which tries to find a local maxima only, but is slightly faster. Only specify up to one of "Brent" and "optimize".

nlinesearch

(Defaul: 1) Number of linesearch parameters to evaluate, controlling the resolution near the edges of the valid range.

nline

(Defaul: 21) Number of linesearch parameters to evaluate in .

range

(Default: c(-2,2)) The lower and upper bounds provided to linesearch to find a region that returns a finite score.

Value

A list as returned by the optimiser, with additionally dat, thresholds, bins, range and sigma as provided, and s as inferred.

See Also

linesearch to explore a range of s, or bootstrap to generate a distribution of estimates of s.


danjlawson/robustarchitecture documentation built on Dec. 19, 2021, 8:09 p.m.