trendbreaker
trendbreaker copied to clipboard
First monitoring system prototype
I would suggest setting up a first version of the monitoring system like this:
- we always monitor the last 7 days
- we train the model on the days 40 to 8 days (arbitrary numbers)
- Our monitoring model will either be auto selected on the global time series and then used for all subgroups or we run the the auto selection for each group (see
inst/repl.R
. - In addition to the global time series, we monitor CCG, larger spatial areas, gender and age groups in a first version.
- Output is a static html page with graphs and alerts.
That system is already possible using the current functions. After that we can implement more improvements, better functions to support it or totally different stuff.
Would be cool to find the best performing models and save them (serialized version without the model matrix) to some git repository. Then the github actions can pull the pretrained model and generate the html reports on netlify or something. Just an idea.
Proposed course of action and notes:
- I will add this as a PR (with other recent fixes), in the example file
inst/pathways_analyses.R
- I will create a new repos for NHS pathways monitoring which will include:
- a simple blogdown structure including a post with these analyses
- a
gh-pages
pages generating a hugo website on netlify - (on the war of the holy k: might use auto-selection of k by default as results by CCG look pretty good)
- models should definitely be estimated separately for different subsets of the data; this said as we use MRSE to assess goodness of fit, most of the time the more complex model will be selected