def train(self, data, classes):
    self.createPrototypes(data)
    self.sigma()
    hidden_out = np.zeros(shape=(0, self.hidden))
    for data in data:
        output = []
        for proto in self.protos:
            distance = np.square(np.linalg.norm((data - proto)))
            neuron_output = np.exp(((- distance) / np.square(self.spread)))
            output.append(neuron_output)
        hidden_out = np.vstack([hidden_out, np.array(output)])
    self.weights = np.dot(np.linalg.pinv(hidden_out), classes)
def train(self, data, classes):
    self.createPrototypes(data)
    self.sigma()
    hidden_out = np.zeros(shape=(0, self.hidden))
    for data in data:
        output = []
        for proto in self.protos:
            distance = np.square(np.linalg.norm((data - proto)))
            neuron_output = np.exp(((- distance) / np.square(self.spread)))
            output.append(neuron_output)
        hidden_out = np.vstack([hidden_out, np.array(output)])
    self.weights = np.dot(np.linalg.pinv(hidden_out), classes)