log_prob
- breads.fit.log_prob(nonlin_paras, dataobj, fm_func, fm_paras, nonlin_lnprior_func=None, bounds=None, scale_noise=True)[source]
Wrapper to fit_fm() but only returns the log probability marginalized over the linear parameters.
- Args:
- nonlin_paras: [p1,p2,…] List of non-linear parameters such as rv, y, x. The meaning and number of non-linear
parameters depends on the forward model defined.
dataobj: A data object of type breads.instruments.instrument.Instrument to be analyzed. fm_func: A forward model function. See breads.fm.template.template() for an example. fm_paras: Additional parameters for fm_func (other than non-linear parameters and dataobj) computeH0: If true (default), compute the probability of the model removing the first element of the linear
model; See second ouput log_prob_H0. This can be used to compute the Bayes factor for a fixed set of non-linear parameters
- bounds: (Caution: the calculation of log prob is only theoretically accurate if no bounds are used.)
Bounds on the linear parameters used in lsq_linear as a tuple of arrays (min_vals, maxvals). e.g. ([0,0,…], [np.inf,np.inf,…]). default no bounds. Each numpy array must have shape (N_linear_parameters,).
- Returns:
log_prob: Probability of the model marginalized over linear parameters.