from config import DataGeneratorCfg
from sklearn.datasets.samples_generator import make_blobs
import numpy as np

def generate():
    data, true_labels = make_blobs(n_samples=DataGeneratorCfg.n_samples, centers=DataGeneratorCfg.centers, cluster_std=DataGeneratorCfg.cluster_std, random_state=DataGeneratorCfg.random_state)
    print("Generating new data!")
    np.savetxt("data/data.txt", data)
    np.savetxt("data/true_labels.txt", true_labels)
    return data


[((6, 24, 6, 192), 'sklearn.datasets.samples_generator.make_blobs', 'make_blobs', (), '', False, 'from sklearn.datasets.samples_generator import make_blobs\n'), ((8, 4, 8, 37), 'numpy.savetxt', 'np.savetxt', ({(8, 15, 8, 30): '"""data/data.txt"""', (8, 32, 8, 36): 'data'}, {}), "('data/data.txt', data)", True, 'import numpy as np\n'), ((9, 4, 9, 51), 'numpy.savetxt', 'np.savetxt', ({(9, 15, 9, 37): '"""data/true_labels.txt"""', (9, 39, 9, 50): 'true_labels'}, {}), "('data/true_labels.txt', true_labels)", True, 'import numpy as np\n')]