def __createInstances(self, dataset): """ Create all the instances of a dataset and a list of all the instances """ rows, cols = dataset.shape inst = [] for col in range(cols): tmp, mean, std = self.__standardise(dataset[:, col]) pic = tmp.reshape(self.width, self.height, order='F') instance = Instance() instance.setValue(pic) instance.setMean(mean) instance.setStd(std) inst.append(instance) return np.array(inst)