MCPcopy Create free account
hub / github.com/statsmodels/statsmodels / update

Method update

examples/python/statespace_custom_models.py:715–732  ·  view source on GitHub ↗
(self, params, **kwargs)

Source from the content-addressed store, hash-verified

713 return unconstrained
714
715 def update(self, params, **kwargs):
716 params = super(MultipleYsModel, self).update(params, **kwargs)
717
718 # The following line is not needed (by default, this matrix is initialized by zeroes),
719 # But I leave it here so the dimensions are clearer
720 self["obs_intercept"] = np.repeat([np.array([0, 0])],
721 self.nobs,
722 axis=0).T
723
724 self["obs_cov", 0, 0] = params[0]
725 self["obs_cov", 1, 1] = params[1]
726
727 self["state_cov"] = np.diag(params[2:4])
728
729 # delta1, delta2, delta3
730 self["transition", 0, 0] = params[4]
731 self["transition", 0, 1] = params[5]
732 self["transition", 1, 1] = params[6]
733
734
735mod = MultipleYsModel(i_hat, s_t, m_hat)

Callers

nothing calls this directly

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected