コード例 #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])
コード例 #2
0
ファイル: test_evaluation.py プロジェクト: pombredanne/mozsci
    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])
コード例 #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)
コード例 #4
0
ファイル: test_evaluation.py プロジェクト: pombredanne/mozsci
    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)