Speed up RunModel_Lag for RunModel.Supervisor
Checks are throwing this note on execution time of RunModel.Supervisor
example:
❯ checking examples ... [10s] NOTE
Examples with CPU (user + system) or elapsed time > 5s
user system elapsed
RunModel.Supervisor 3.3 2.21 5.52
This issue can be prohibitive for the CRAN.
I have tested the code with profvis and raises this issue: most of the time is spent on RunModel_Lag and especially on .GetFeatModel
RunModel_Lag
is here called by RunModel.SD
which is only used by RunModel.Supervisor
A solution could be to re-code the lag in RunModel.SD
in order to speed it up by removing unecessary features in this case.