You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the sc.weight.fw.covariates function, the stopping criterion is currently defined as follows: while (t < max.iter && (t < 2 || vals[t - 1] - vals[t] > min.decrease^2)) {...}. However, during optimization with covariates, vals can increase from one iteration to the next, causing the difference vals[t - 1] - vals[t] to become negative. This can prematurely terminate the optimization task even if there's actually a deterioration.
To prevent this issue, I suggest using the absolute difference abs(vals[t - 1] - vals[t]) as part of the stopping criterion, like so: while (t < max.iter && (t < 2 || abs(vals[t - 1] - vals[t]) > min.decrease^2)) {...}. If you find this change reasonable, I would be happy to push the changes to a fork and create a merge request.
The text was updated successfully, but these errors were encountered:
When using the sc.weight.fw.covariates function, the stopping criterion is currently defined as follows: while (t < max.iter && (t < 2 || vals[t - 1] - vals[t] > min.decrease^2)) {...}. However, during optimization with covariates, vals can increase from one iteration to the next, causing the difference vals[t - 1] - vals[t] to become negative. This can prematurely terminate the optimization task even if there's actually a deterioration.
To prevent this issue, I suggest using the absolute difference abs(vals[t - 1] - vals[t]) as part of the stopping criterion, like so: while (t < max.iter && (t < 2 || abs(vals[t - 1] - vals[t]) > min.decrease^2)) {...}. If you find this change reasonable, I would be happy to push the changes to a fork and create a merge request.
The text was updated successfully, but these errors were encountered: