Exemplo n.º 1
0
 def test_pearson_linear(self):
     """
     Test the CRITIC.Pearson weighting method with a linear association.
     """
     self.assertAlmostEqualArrays(
         critic(np.array(get_matrix01(), dtype=np.float64), "Pearson"),
         np.array(get_vector21(), dtype=np.float64),
     )
Exemplo n.º 2
0
 def test_nested_list(self):
     """
     Test the CRITIC weighting method with a nested list.
     """
     self.assertAlmostEqualArrays(
         critic(get_matrix01()),
         np.array(get_vector21(), dtype=np.float64),
     )
Exemplo n.º 3
0
 def test_float32(self):
     """
     Test the CRITIC weighting method with a float32 NumPy array.
     """
     self.assertAlmostEqualArrays(
         critic(np.array(get_matrix01(), dtype=np.float32)),
         np.array(get_vector21(), dtype=np.float64),
     )
Exemplo n.º 4
0
 def test_nonlinear(self):
     """
     Test the CRITIC weighting method with a non-linear association.
     """
     self.assertAlmostEqualArrays(
         critic(np.array(get_matrix02(), dtype=np.float64)),
         np.array(get_vector20(), dtype=np.float64),
     )
Exemplo n.º 5
0
 def test_abspearson_nested_list(self):
     """
     Test the CRITIC.AbsPearson weighting method with a nested list.
     """
     self.assertAlmostEqualArrays(
         critic(get_matrix01(), "AbsPearson"),
         np.array(get_vector22(), dtype=np.float64),
     )
Exemplo n.º 6
0
 def test_abspearson_float32(self):
     """
     Test the CRITIC.AbsPearson weighting method with a float32 NumPy
     array.
     """
     self.assertAlmostEqualArrays(
         critic(np.array(get_matrix01(), dtype=np.float32), "AbsPearson"),
         np.array(get_vector22(), dtype=np.float64),
     )