fit_GP: Fit MLN Gaussian process model to a given host's series using...

View source: R/fit_model.R

fit_GPR Documentation

Fit MLN Gaussian process model to a given host's series using fido

Description

Fit MLN Gaussian process model to a given host's series using fido

Usage

fit_GP(
  sname,
  counts,
  metadata,
  output_dir,
  MAP = TRUE,
  days_to_min_autocorrelation = 90,
  diet_weight = 0,
  var_scale_taxa = 1,
  var_scale_samples = 1,
  concentration = 10,
  age_min = -Inf,
  age_max = Inf,
  use_adam = FALSE,
  scramble_sample = FALSE,
  scramble_spacing = FALSE,
  scramble_order = FALSE
)

Arguments

sname

host short name indicating which baboon's series to fit

counts

filtered 16S count table (taxa x samples)

metadata

annotations data.frame

output_dir

specifies the subdirectory of the model fits directory in which to save the fitted model output

MAP

flag indicating whether or not to return (single) MAP estimate

days_to_min_autocorrelation

used in the calculation of bandwidth for the kernel over samples that models autocorrelation; indicates the number of days at which the squared exponential correlation decays to a minimum (here, 0.1)

diet_weight

relative contribution of first three diet PCs to covariance across samples

var_scale_taxa

scale of the prior associated with the covariance over taxa

var_scale_samples

scale of the hyperparameter associated with the covariance over samples

concentration

optional concentration parameter for the prior over taxon-taxon covariance

age_min

optional mimimum age; samples collected before this age for this animal will be omitted

age_max

optional maximum age; samples collected after this age for this animal will be omitted

use_adam

optimize with Adam (occasionally this converges more reliably

scramble_sample

optional flag to scramble taxonomic identity within a sample that default L-BFGS)

scramble_spacing

optional flag to scramble a host's sampling frequency

scramble_order

optional flag to scramble a host's sample order

Value

fidofit object


kimberlyroche/rulesoflife documentation built on May 7, 2023, 11:08 a.m.