Repository navigation
v0.6.0
v0.6.0 (2025-04-25)
Updated default fit() behavior
The fit() method of torchcast.state_space.StateSpaceModel has been updated:
- The default
LBFGSsettings have been updated to avoid the unnecessary inner loop (see here). - The default convergence settings have been updated to increase
patienceto 2 (instead of 1) and increasemax_iterto 300 (instead of 200). - To restore the old behavior, pass
optimizer=lambda p: torch.optim.LBFGS(p, max_eval=8, line_search_fn='strong_wolfe'), stopping={'patience' : 1, 'max_iter' : 200}. - Convergence is now controlled by a
torch.utils.Stoppinginstance (or kwargs for one). This means passingtol,patience, andmax_iterdirectly tofitis deprecated; instead callfit(stopping={'patience' : ... etc}).
Updated default Covariance behavior
- The 'low_rank' method is never chosen by default; if desired it must be selected manually using the 'method' kwarg (previously would automatically be chosen if rank was >= 10). This was based on poor performance empirically.
- The starting values for the covariance diagonal have been increased.
- Added
initial_covariancekwarg toKalmanFilterand subclasses.
Updates to BinomialFilter
- Added the
observed_countsargument, allowing the user to specify whether observations are counts or proportions. Ifnum_obs==1then this argument is not required (since they are the same). - Fix bug in BinomialStep's kalman-gain calculation when num_obs > 1
- Fix issues with BinomialFilter on the GPU.
- Fix
__getitem__()for BinomialPredictions. - Fix monte-carlo
BinomialPredictions.log_prob()to properly marginalize over samples.
Other Fixes
- Fix
get_durations()on GPU. - Remove redundant matmul in
KalmanStep._update() ss_stepis no longer a property but is instead an attribute, avoids unnecessary re-instantiation on each timestep