def test(self, data, classes):
    right = 0
    for i in range(len(data)):
        d = data[i]
        output = []
        for proto in self.protos:
            distance = np.square(np.linalg.norm((d - proto)))
            neuron_output = np.exp(((- distance) / np.square(self.spread)))
            output.append(neuron_output)
        network_output = np.dot(np.array(output), self.weights)
        print('Expected: ', (classes[i].argmax(axis=0) + 1))
        print('Result: ', (network_output.argmax(axis=0) + 1))
        print()
        if ((network_output.argmax(axis=0) + 1) == (classes[i].argmax(axis=0) + 1)):
            right += 1
    print('Accuracy(%): ', ((right * 100) / len(data)))
def test(self, data, classes):
    right = 0
    for i in range(len(data)):
        d = data[i]
        output = []
        for proto in self.protos:
            distance = np.square(np.linalg.norm((d - proto)))
            neuron_output = np.exp(((- distance) / np.square(self.spread)))
            output.append(neuron_output)
        network_output = np.dot(np.array(output), self.weights)
        print('Expected: ', (classes[i].argmax(axis=0) + 1))
        print('Result: ', (network_output.argmax(axis=0) + 1))
        print()
        if ((network_output.argmax(axis=0) + 1) == (classes[i].argmax(axis=0) + 1)):
            right += 1
    print('Accuracy(%): ', ((right * 100) / len(data)))