def test_simple_pnn(self):
        dataset = datasets.load_iris()
        data = dataset.data
        target = dataset.target

        test_data_size = 10
        skfold = StratifiedKFold(target, test_data_size)
        avarage_result = 0

        for train, test in skfold:
            x_train, x_test = data[train], data[test]
            y_train, y_test = target[train], target[test]

            nw = algorithms.PNN(verbose=False, std=0.1)
            nw.train(x_train, y_train)
            result = nw.predict(x_test)
            avarage_result += sum(y_test == result)

        self.assertEqual(avarage_result / test_data_size, 14.4)
dataset/ETHPy150Open itdxer/neupy/tests/algorithms/rbfn/test_pnn.py/PNNTestCase.test_simple_pnn/original