adaptive.simulated.annealing: Adaptive simulated annealing

View source: R/adaptive_simulated_annealing.R

adaptive.simulated.annealingR Documentation

Adaptive simulated annealing

Description

structure learning using adaptive simulated annealing

Usage

adaptive.simulated.annealing(
  poset,
  obs,
  times = NULL,
  lambda.s = 1,
  weights = NULL,
  L,
  sampling = c("forward", "add-remove", "backward", "bernoulli", "pool"),
  max.iter = 100L,
  update.step.size = 20L,
  tol = 0.001,
  max.lambda.val = 1e+06,
  T0 = 50,
  adap.rate = 0.3,
  acceptance.rate = NULL,
  step.size = NULL,
  max.iter.asa = 10000L,
  neighborhood.dist = 1L,
  adaptive = TRUE,
  outdir = NULL,
  thrds = 1L,
  verbose = FALSE,
  seed = NULL
)

Arguments

poset

a matrix containing the cover relations

obs

a matrix of observations, where each row correponds to a vector indicating whether an event has been observed (1) or not (0)

times

an optional vector of sampling times per observation

lambda.s

rate of the sampling process. Defaults to 1.0

weights

a vector containing observation weights

L

number of samples to be drawn from the proposal in the E-step

sampling

sampling scheme to generate hidden genotypes, X. OPTIONS: "forward" - generate occurrence times according to current rate parameters, and, from them, generate the hidden genotypes, X; "add-remove" - generate genotypes, X, from observed genotypes, Y using a two-steps proposal. First, pick a move uniformly at random: either to add or to remove an event. Events are chosen to be removed with probability proportional to their rates, and to be added with an inverse probability. Second, make genotypes compatible with the poset by either adding or removing all events incompatible with the poset; "backward" - enumerate all genotypes with Hamming distance k; "bernoulli" - generate genotypes from a Bernoulli distribution with success probability p = ε; "pool" - generate a pool of compatible genotypes according to current rate parameters and sample K observations proportional to their Hamming distance;

max.iter

the maximum number of EM iterations. Defaults to 100 iterations

update.step.size

number of EM steps after which the number of samples, L, is doubled. L is increased, if the difference in the parameter estimates between such consecutive batches is greater than the tolerance level, tol

tol

convergence tolerance for the error rate and the rate parameters. The EM runs until the difference between the average estimates in the last two batches is smaller than tol, or until max.iter is reached.

max.lambda.val

an optional upper bound on the value of the rate parameters. Defaults to 1e6

T0

inital value of the temperature. Defaults to 50

adap.rate

an optional argument specifying the constant adaptation rate. Defaults to 0.3

acceptance.rate

an optional argument specifying a desirable acceptance rate. Defaults to 1/p, where p is the number of events or mutations

step.size

an optional argument indicating the number or iterations after which the temperature should be updated. Defaults to 50

max.iter.asa

the maximum number of iterations. Defaults to 10000 iterations

neighborhood.dist

an integer value indicating the Hamming distance between the observation and the samples generated by "backward" sampling. This option is used if sampling is set to "backward". Defaults to 1

adaptive

a boolean variable indicating whether to use an adaptive annealing schedule

outdir

an optional argument indicating the path to the output directory

thrds

number of threads for parallel execution

verbose

an optional argument indicating whether to output logging information

seed

seed for reproducibility


cbg-ethz/MC-CBN documentation built on Dec. 15, 2022, 5:42 p.m.