Esempio n. 1
0
 def test_fit_profile_cov_mat_correlated(self):
     _fit_with_constraint = IndexedFit(self._data_container,
                                       model_function=self._model)
     _fit_with_constraint.add_matrix_parameter_constraint(['a', 'b'],
                                                          self._means,
                                                          self._cov_mat_cor)
     self._test_consistency(_fit_with_constraint, self._cov_mat_cor_inv)
Esempio n. 2
0
 def test_bad_input_exception(self):
     _fit_with_constraint = IndexedFit(self._data_container, model_function=self._model)
     with self.assertRaises(IndexedFitException):
         _fit_with_constraint.add_parameter_constraint('c', 1.0, 1.0)
     with self.assertRaises(IndexedFitException):
         _fit_with_constraint.add_matrix_parameter_constraint(['a', 'c'], [1.0, 2.0], [[0.2, 0.0], [0.0, 0.1]])
     with self.assertRaises(IndexedFitException):
         _fit_with_constraint.add_matrix_parameter_constraint(['a'], [1.0, 2.0], [[0.2, 0.0], [0.0, 0.1]])