def test_sqrt_unscented_predict_focus_on_weighting(self, mock_transform): mock_transform.return_value = self.sps2 kf.sqrt_unscented_predict( self.stage, self.sps2, self.flat_sps2, self.sws_m, self.sws_c, self.Q, self.transform_sps_args, self.out_states, self.out_sqrt_covs) aaae(self.out_states, self.expected_states2)
def test_sqrt_unscented_predict_focus_on_covs(self, mock_transform): mock_transform.return_value = self.sps3 # self.q = np.eye(3) * 0.25 + np.ones((3, 3)) * 0.5 kf.sqrt_unscented_predict( self.stage, self.sps3, self.flat_sps3, self.sws_m, self.sws_c, self.Q, self.transform_sps_args, self.out_states, self.out_sqrt_covs) make_unique(self.out_covs) aaae(self.out_covs, self.exp_cholcovs)
def test_sqrt_unscented_predict_focus_on_weighting(self, mock_transform): mock_transform.return_value = self.sps2 kf.sqrt_unscented_predict(self.stage, self.sps2, self.flat_sps2, self.sws_m, self.sws_c, self.Q, self.transform_sps_args, self.out_states, self.out_sqrt_covs) aaae(self.out_states, self.expected_states2)
def test_sqrt_unscented_predict_focus_on_covs(self, mock_transform): mock_transform.return_value = self.sps3 # self.q = np.eye(3) * 0.25 + np.ones((3, 3)) * 0.5 kf.sqrt_unscented_predict(self.stage, self.sps3, self.flat_sps3, self.sws_m, self.sws_c, self.Q, self.transform_sps_args, self.out_states, self.out_sqrt_covs) make_unique(self.out_covs) aaae(self.out_covs, self.exp_cholcovs)
def predict(stage, square_root_filters, predict_args): """Select and call the correct predict function. The actual predict functions are implemented in several modules in :ref:`fast_routines` """ if square_root_filters is True: sqrt_unscented_predict(stage, **predict_args) else: normal_unscented_predict(stage, **predict_args)
def predict(period, square_root_filters, predict_args): """Select and call the correct predict function. The actual predict functions are implemented in several modules in :ref:`fast_routines` """ if square_root_filters is True: sqrt_unscented_predict(period, **predict_args) else: normal_unscented_predict(period, **predict_args)
def test_sqrt_unscented_predict_focus_on_covs(setup_unscented_predict, mocker): d = setup_unscented_predict mock_transform = mocker.patch( "skillmodels.fast_routines.kalman_filters.transform_sigma_points") mock_transform.return_value = d["sps3"] kf.sqrt_unscented_predict( d["stage"], d["sps3"], d["flat_sps3"], d["sws_m"], d["sws_c"], d["q"], d["transform_sps_args"], d["out_states"], d["out_sqrt_covs"], ) make_unique(d["out_covs"]) aaae(d["out_covs"], d["exp_cholcovs"])