def test_map_params_to_p_zero_chol_to_notchol_1_mat_restricted(self): self.params_type = 'short' self.cholesky_of_P_zero = True self.square_root_filters = False exp = np.zeros_like(self.initial) exp[:] = np.dot(self.fill_one.T, self.fill_one) pp._map_params_to_P_zero(self.params, self.params_type, self.initial, self.slice_1mat, self.filler_1mat, self.boo_1mat, self.cholesky_of_P_zero, self.square_root_filters) aae(self.initial, exp)
def test_map_params_to_p_zero_chol_to_notchol_1_mat_restricted(self): self.params_type = 'short' self.cholesky_of_P_zero = True self.square_root_filters = False exp = np.zeros_like(self.initial) exp[:] = np.dot(self.fill_one.T, self.fill_one) pp._map_params_to_P_zero(self.params, self.params_type, self.initial, self.slice_1mat, self.filler_1mat, self.boo_1mat, self.cholesky_of_P_zero, self.square_root_filters) aae(self.initial, exp)
def test_map_params_to_p_zero_notchol_to_chol_1_mat_restricted(self): self.params_type = 'long' self.cholesky_of_P_zero = False self.square_root_filters = False exp = np.zeros_like(self.initial) exp[:] = self.fill_one + \ (self.fill_one - np.diag(np.diagonal(self.fill_one))).T pp._map_params_to_P_zero(self.params, self.params_type, self.initial, self.slice_1mat, self.filler_1mat, self.boo_1mat, self.cholesky_of_P_zero, self.square_root_filters) aae(self.initial, exp)
def test_map_params_to_p_zero_notchol_to_chol_1_mat_restricted(self): self.params_type = 'long' self.cholesky_of_P_zero = False self.square_root_filters = False exp = np.zeros_like(self.initial) exp[:] = self.fill_one + \ (self.fill_one - np.diag(np.diagonal(self.fill_one))).T pp._map_params_to_P_zero(self.params, self.params_type, self.initial, self.slice_1mat, self.filler_1mat, self.boo_1mat, self.cholesky_of_P_zero, self.square_root_filters) aae(self.initial, exp)
def test_map_params_to_p_zero_chol_to_chol_2_mat(self): self.params_type = 'short' self.cholesky_of_P_zero = True self.square_root_filters = True exp = np.zeros_like(self.sqrt_initial) exp[:, 0, 1:, 1:] = self.fill_one exp[:, 1, 1:, 1:] = self.fill_two pp._map_params_to_P_zero( self.params, self.params_type, self.sqrt_initial, self.slice_2mat, self.filler_2mat, self.boo_2mat, self.cholesky_of_P_zero, self.square_root_filters) aae(self.sqrt_initial, exp)
def test_map_params_to_p_zero_chol_to_chol_2_mat(self): self.params_type = 'short' self.cholesky_of_P_zero = True self.square_root_filters = True exp = np.zeros_like(self.sqrt_initial) exp[:, 0, 1:, 1:] = self.fill_one exp[:, 1, 1:, 1:] = self.fill_two pp._map_params_to_P_zero(self.params, self.params_type, self.sqrt_initial, self.slice_2mat, self.filler_2mat, self.boo_2mat, self.cholesky_of_P_zero, self.square_root_filters) aae(self.sqrt_initial, exp)
def test_map_params_to_p_zero_not_chol_to_not_chol_2_mat(self): self.params_type = 'long' self.cholesky_of_P_zero = False self.square_root_filters = False exp = np.zeros_like(self.initial) exp[:, 0] = self.fill_one + \ (self.fill_one - np.diag(np.diagonal(self.fill_one))).T exp[:, 1] = self.fill_two + \ (self.fill_two - np.diag(np.diagonal(self.fill_two))).T pp._map_params_to_P_zero(self.params, self.params_type, self.initial, self.slice_2mat, self.filler_2mat, self.boo_2mat, self.cholesky_of_P_zero, self.square_root_filters) aae(self.initial, exp)
def test_map_params_to_p_zero_not_chol_to_not_chol_2_mat(self): self.params_type = 'long' self.cholesky_of_P_zero = False self.square_root_filters = False exp = np.zeros_like(self.initial) exp[:, 0] = self.fill_one + \ (self.fill_one - np.diag(np.diagonal(self.fill_one))).T exp[:, 1] = self.fill_two + \ (self.fill_two - np.diag(np.diagonal(self.fill_two))).T pp._map_params_to_P_zero(self.params, self.params_type, self.initial, self.slice_2mat, self.filler_2mat, self.boo_2mat, self.cholesky_of_P_zero, self.square_root_filters) aae(self.initial, exp)