Spaces:
Sleeping
Sleeping
File size: 666 Bytes
c777165 4e6140d f9522cf 4c97910 4e6140d 4c97910 4e6140d 4c97910 4e6140d 4c97910 c777165 4c97910 c777165 4c97910 4e6140d c777165 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
from opts import options
import numpy as np
from pprint import pprint
def random_dataset(rows: int, features: int):
"""
Initializes a training and a testing dataset in the form of numpy arrays
"""
rng = np.random.default_rng()
X = rng.normal(size=(rows, features))
y = rng.integers(5, size=(rows, 1))
return X, y
def main():
method = input("\nChoose a method to test: ").lower()
try:
func = options[method]
except KeyError:
raise f"Invalid method \"{method}\". Try one of these\n{list(options.keys())}"
X, y = random_dataset(rows=10, features=2)
func(X, y)
if __name__ == "__main__":
main()
|