:py:mod:`spatialtis_core.spatial_de.somde.util` =============================================== .. py:module:: spatialtis_core.spatial_de.somde.util Module Contents --------------- .. py:function:: LL(delta, UTy, UT1, S, n, Yvar=None) Log-likelihood of GP model as a function of delta. The parameter delta is the ratio s2_e / s2_t, where s2_e is the observation noise and s2_t is the noise explained by covariance in time or space. .. py:function:: SE_kernel(X, l) .. py:function:: brent_max_LL(UTy, UT1, S, n) .. py:function:: const_fits(exp_tab) Get maximum LL for const model .. py:function:: cosine_kernel(X, p) Periodic kernel as l -> oo in [Lloyd et al 2014] Easier interpretable composability with SE? .. py:function:: dyn_de(X, exp_tab, kernel_space=None) .. py:function:: factor(K) .. py:function:: get_UT1(U) .. py:function:: get_UTy(U, y) .. py:function:: get_l_limits(X) .. py:function:: get_mll_results(results, null_model='const') .. py:function:: gower_scaling_factor(K) Gower normalization factor for covariance matric K Based on https://github.com/PMBio/limix/blob/master/limix/utils/preprocess.py .. py:function:: lbfgsb_max_LL(UTy, UT1, S, n, Yvar=None) .. py:function:: lengthscale_fits(exp_tab, U, UT1, S, Gower, num=64) Fit GPs after pre-processing for particular lengthscale .. py:function:: linear_kernel(X) .. py:function:: logdelta_prior_lpdf(log_delta) .. py:function:: make_FSV(UTy, S, n, Gower) .. py:function:: make_objective(UTy, UT1, S, n, Yvar=None) .. py:function:: mu_hat(delta, UTy, UT1, S, n, Yvar=None) ML Estimate of bias mu, function of delta. .. py:function:: null_fits(exp_tab) Get maximum LL for null model .. py:function:: qvalue(pv, pi0=None) .. py:function:: regress_out(sample_info, expression_matrix, covariate_formula, design_formula='1', rcond=-1) .. py:function:: s2_t_hat(delta, UTy, S, n, Yvar=None) ML Estimate of structured noise, function of delta .. py:function:: search_max_LL(UTy, UT1, S, n, num=32) Search for delta which maximizes log likelihood. .. py:function:: simulate_const_model(MLL_params, N) .. py:function:: stabilize(expression_matrix)