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])
Beispiel #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])
    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)
Beispiel #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)