|
10 | 10 | import os |
11 | 11 | from typing import Optional, Union, List, Dict, Any |
12 | 12 |
|
| 13 | + |
13 | 14 | from mimic.utilities import * |
14 | 15 | from mimic.model_simulate.sim_gLV import * |
15 | 16 | from mimic.model_infer.base_infer import BaseInfer |
@@ -43,12 +44,44 @@ class infergLVbayes(BaseInfer): |
43 | 44 | Args: |
44 | 45 | X (np.ndarray): The design matrix |
45 | 46 | F (np.ndarray): The observed values |
46 | | - mu (np.ndarray): The growth rates matrix |
47 | | - M (np.ndarray): The interaction matrix |
| 47 | + mu (int, float, List): The growth rates |
| 48 | + M (int, float, List): The interaction matrix |
| 49 | + epsilon ((int, float, List)): The perturbation matrix |
| 50 | +
|
| 51 | + prior_mu_mean (int, float, List): The prior mean for mu |
| 52 | + prior_mu_sigma (int, float, List): The prior sigma for mu |
| 53 | + prior_Mii_mean (int, float, List): The prior mean for Mii |
| 54 | + prior_Mii_sigma (int, float, List): The prior sigma for Mii |
| 55 | + prior_Mij_sigma (int, float, List): The prior sigma for Mij |
| 56 | + prior_eps_mean (int, float, List): The prior mean for epsilon |
| 57 | + prior_eps_sigma (int, float, List): The prior sigma for epsilon |
| 58 | +
|
| 59 | + draws (int): The number of draws for the MCMC sampler |
| 60 | + tune (int): The number of tuning steps for the MCMC sampler |
| 61 | + chains (int): The number of chains for the MCMC sampler |
| 62 | + cores (int): The number of cores to use for the MCMC sampler |
| 63 | + DA (int): The number of off-diagonal elements to be non-zero |
| 64 | + DA0 (int, float): The number of off-diagonal elements to be non-zero |
| 65 | + N (int): The number of samples |
| 66 | + noise_stddev (int, float): The standard deviation of the noise |
| 67 | +
|
48 | 68 |
|
49 | 69 |
|
50 | 70 | Methods: |
51 | 71 |
|
| 72 | + set_parameters: Set or update simulation parameters. |
| 73 | + import_data: Import data from a .csv file. |
| 74 | + calculate_DA0: Calculate the number of off-diagonal elements to be non-zero. |
| 75 | +
|
| 76 | + run_inference: Run Bayesian inference with uniform priors and specified bounds. |
| 77 | + run_inference_shrinkage: Run Bayesian inference with horseshoe priors for shrinkage. |
| 78 | + run_inference_shrinkage_pert: Run Bayesian inference with horseshoe priors for shrinkage and perturbation. |
| 79 | +
|
| 80 | + plot_posterior: Plot the posterior distribution of the parameters. |
| 81 | + plot_posterior_pert: Plot the posterior distribution of the parameters with perturbation. |
| 82 | + plot_interaction_matrix: Plot the interaction matrix. |
| 83 | +
|
| 84 | +
|
52 | 85 |
|
53 | 86 | Returns: |
54 | 87 | None |
|
0 commit comments