Exemplo n.º 1
0
    def test_basic_measure_3(self):
        """
        Test classification_model_performance. weighted case.
        """
        observed = np.array([0, 1, 0, 1, 0, 0, 1])
        calculated = np.array([0, 1, 1, 0, 0, 0, 1])

        measure = evaluation.classification_model_performance(observed, calculated, [1.0, 3.0])
Exemplo n.º 2
0
    def test_basic_measure_3(self):
        """
        Test classification_model_performance. weighted case.
        """
        observed = np.array([0, 1, 0, 1, 0, 0, 1])
        calculated = np.array([0, 1, 1, 0, 0, 0, 1])

        measure = evaluation.classification_model_performance(
            observed, calculated, [1.0, 3.0])
Exemplo n.º 3
0
    def test_basic_measure_2(self):
        """
        Test classification_model_performance. All correct case.
        """
        observed = np.array([0, 1, 0, 1, 0, 0, 1])
        calculated = np.array([0, 1, 1, 0, 0, 0, 1])

        measure = evaluation.classification_model_performance(observed, calculated)

        self.assertAlmostEqual(measure, 0.2857142857140)
Exemplo n.º 4
0
    def test_basic_measure_2(self):
        """
        Test classification_model_performance. All correct case.
        """
        observed = np.array([0, 1, 0, 1, 0, 0, 1])
        calculated = np.array([0, 1, 1, 0, 0, 0, 1])

        measure = evaluation.classification_model_performance(
            observed, calculated)

        self.assertAlmostEqual(measure, 0.2857142857140)