Cost function

CARDAMOM is a Bayesian modeling framework designed to compute the posterior distribution of model parameters, based on Bayes’ Theorem:

\[P(\mathbf{x} | \mathbf{O}) = \frac{P(\mathbf{O} | \mathbf{x}) \cdot P(\mathbf{x})}{P(\mathbf{O})}\]

In this context, \(P(\mathbf{x} | \mathbf{O})\) represents the posterior distribution of the parameter vector \(\mathbf{x}\) given the observation matrix \(\mathbf{O}\). CARDAMOM approximates \(P(\mathbf{x} | \mathbf{O})\) using a Markov Chain Monte Carlo (MCMC) sampler. Here, \(P(\mathbf{x})\) denotes the prior distribution of the parameters, while \(P(\mathbf{O} | \mathbf{x})\) is the likelihood of observing \(\mathbf{O}\) given the parameter values in \(\mathbf{x}\).

In CARDAMOM, \(P(\mathbf{x})\) is expanded into two components: the parameter prior range and the ecological dynamic constraints (EDC), resulting in the following expression:

\[P(\mathbf{x} | \mathbf{O}) \propto P(\mathbf{O} | \mathbf{x}) \cdot P_{\text{prior}}(\mathbf{x}) \cdot P_{\text{EDC}}(\mathbf{x})\]

To simplify the cost function, we take the logarithm of the posterior distribution, yielding:

\[\log(P(\mathbf{x} | \mathbf{O})) \propto \log(P(\mathbf{O} | \mathbf{x})) + \log(P_{\text{prior}}(\mathbf{x})) + \log (P_{\text{EDC}}(\mathbf{x}))\]

This logarithmic transformation converts multiplicative relationships into additive ones, thereby reducing the complexity of the MCMC sampling process by narrowing the search space.

The likelihood function \(P(\mathbf{O} | \mathbf{x})\) follows a log-normal distribution and is expressed as:

\[-0.5 \sum_i \frac{(M_i - O_i)^2}{\sigma_i^2}\]

Where \(M\) represents the model predictions, \(O\) represents the observations, and \(\sigma\) denotes the uncertainty associated with the observations.

The prior distribution \(P_{\text{prior}}(\mathbf{x})\) is modeled as a log-uniform distribution.