Closed jiapivialiu closed 1 year ago
These are both pretty small modifications. And they would seem to also affect the degree > 0
cases. Can you give me a bit of context as to why this is the fix?
Both fixes target only the k=0 case and are made only in the functions of dynamic programming (DP) algorithm.
For the $\lambda$ fix, the DP algorithm solves the objective without the loss part divided by the sequence length $n$, but the proximal Newton for degree>0 solves the loss divided by $n$, so $\lambda$ passed into the DP algorithm should be multiplied by $n$, but I forgot it earlier.
The other fix is a typo in the DP algorithm, I made small modifications to the original DP algorithm to take past infections as weights. I divided the original signals by the weights ($yw=y/w$) at the beginning of the algorithm and used $yw$ throughout the algorithm. Using $y$ for these specific lines was a typo.
I see. The difference being that for degree > 0
we use dptf()
in the ADMM but for degree = 0
we use dptf_past()
.
dptf_past()
to wdptf()
or something? The difference is the weighting. I'm not sure what _past
indicates.And merge main
so I can approve the PR.
Fix #48.