Home > elasticity_sampling > es_sample_multiple.m

es_sample_multiple

PURPOSE ^

ES_SAMPLE_MULTIPLE - Create model ensemble and collect values for an output function

SYNOPSIS ^

function [output, output_list] = es_sample_multiple(N, W, ind_ext, es_constraints, es_options, output_function, select_function, score_function, function_args)

DESCRIPTION ^

 ES_SAMPLE_MULTIPLE - Create model ensemble and collect values for an output function

 [output, output_list] = es_sample_multiple(N, W, ind_ext, es_constraints, es_options, output_function, select_function, score_function, function_args)

 Run elasticity sampling repeatedly, compute every time an output function 
 (any kind of matlab variable), and return a list of the output values.

 This function also allows for posterior sampling (Metropolis-Monte Carlo algorithm)

 There is no direct way to run the sampling in parallel for two scenarios
 with the same random values used for saturation constants in both ensembles

 Inputs (nm: # metabolites; nr: # reactions)
   N         - Stoichiometric matrix (nm x nr)
   W         - Allosteric regulation matrix (nr x nm)
   ind_ext   - indices of external metabolites
 
  For the inputs es_constraints and es_options, see es_default_options

  output_function - Output function for which response coefficients are sampled (*1)
  select_function - Function for filtering the sampled models (*2)
  score_function  - Function for posterior probability sampling (*3)
  function_args   - Arguments for output_function, select_function, score_function

 Outputs
  output_list     - Results as a list of matrices
  output          - Same results as a tensor

 Comments:

 (1) If the output function is numeric, output contains all values as a row vector
      (for scalars), matrix (for row or column vectors), or tensor (for matrices).

 (2) If a 'select_function' is provided, only samples that yield a non-zero value
     of this function will be considered.

 (3)  If a score function (e.g., a log likelihood) is provided, it is evaluated 
      every time for each sample and the values are used for Metropolis sampling
      instead of simple repeated sampling.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Thu 31-Mar-2016 20:58:01 by m2html © 2003