Numpy-Neuron / dataset /random.py
Jensen-holm's picture
cutting the front end mess and just using this as a backend api
c2ccf60
raw
history blame
392 Bytes
import numpy as np
def random_dataset(rows: int, features: int):
"""
the random_dataset function is used to
generate a random normal distribution of
data for testing different machine learning
algorithms specific to this project
"""
rng = np.random.default_rng()
X = rng.normal(size=(rows, features))
y = rng.integers(5, size=(rows, 1))
return X, y