Closed galengorski closed 2 years ago
Thanks for the review @jds485, I have made the comments suggested. Your comment about the number 88
made me realize that this branch had a few changes to run_model.py
, those are now included, but most of them, we had talked about before.
This is a small change to the
lag_data
function init_functions
. I have changed the lag so that if an input matrix is[X,Y]
whereX
is the source andY
is the sink, the newlag_data
function will produce a matrixM_lagged
that is[X-T, Y, Y-T]
, whereT
is the time lag. The previous version produced a matrix[X-T, Y, Y-1]
. I have seen both lagging methods in the literature, you're either conditioning on the immediate history ofY
or it's history at the time step of interest, but we wantY-T
here. The other change that I made was to add a function calledfind_bounds
, which finds the bounds of the time series of interest using percentiles. This is used for removing outliers for analysis.