USGS-R / drb-estuary-salinity-ml

Creative Commons Zero v1.0 Universal
0 stars 4 forks source link

Functional performance #122

Closed galengorski closed 2 years ago

galengorski commented 2 years ago

This is a small change to the lag_data function in it_functions. I have changed the lag so that if an input matrix is [X,Y] where X is the source and Y is the sink, the new lag_data function will produce a matrix M_lagged that is [X-T, Y, Y-T], where T 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 of Y or it's history at the time step of interest, but we want Y-T here. The other change that I made was to add a function called find_bounds, which finds the bounds of the time series of interest using percentiles. This is used for removing outliers for analysis.

galengorski commented 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.