The code is written for Python 3.6, all dependencies can be installed by
pip install -r requirements.txt
cd src
python runner_flag.py
Results will be store in src/rslts/clv_group/[datatype]_Dx[Dx]
where [datatype]
and [Dx]
are flags in src/runner_flag.py
a python 3 pickle
file contains a dict
with following items:
Ytrain
: (list
ofnp.array
) eachnp.array
, namedy_i
, represents observations for a training trajectory.y_i
has shape(n_observed_days, 1 + Dy)
, andy_i[:, 0]
is the date when the observation is recorded.y_i[:, 1:]
are absolute abundance of taxa.Ytest
: (list
ofnp.array
) observations of test set.Vtrain
: (list
ofnp.array
) eachnp.array
, namedv_i
, represents perturbations for a training trajectory. Similar to observations,v_i
has shape(n_perturbation_days, 1 + Dv)
, andv_i[:, 0]
is the date when the perturbations is recorded.v_i[:, 1:]
are absolute abundance of taxa. Currently, perturbations are either 1 or 0 (appear or not).Vtest
: (list
ofnp.array
) perturbations of test set.counts_train
: (list
ofnp.array
) eachnp.array
, namedc_i
, represents total counts of each day for a training trajectory.c_i
has shape(n_observed_days)
.counts_test
: total counts of test set.
The following items are optional:
Xtrain
: (list
ofnp.array
) eachnp.array
, namedx_i
, represents hidden states for a training trajectory.x_i
has shape(n_total_days, Dx)
, and it's only know for simulation data.Xtest
: (list
ofnp.array
) hidden states of test set.A
,g
,Wv
: simulation parameters for interaction, growth rate, and perturbation matrix.k_var
,k_len
: simulation parameters for added gaussian process noise.
- prepare a
dict
meetings the above requirements and dump it to a python 3pickle
file. - add the file to
src/utils/available_data.py
- specifies its path, such as
group_Dx_2_Dv_0_ntrain_300_Kvar_05_dir = "data/clv_gp/group_interaction/Dx_2_Dy_8_Dv_0_s_1_Kvar_0.3_ntrain_300.p"
- add it to
COUNT_DATA_DICT
, such asgroup_Dx_2_Dv_0_ntrain_300_Kvar_05=group_Dx_2_Dv_0_ntrain_300_Kvar_05_dir
- specifies its path, such as