Initial commit

This commit is contained in:
2026-01-23 18:27:33 +00:00
commit cb66278060
12 changed files with 286 additions and 0 deletions

9
generate_data.py Normal file
View File

@@ -0,0 +1,9 @@
from random import randint, gauss
def generate_data(n, xmin, xmax, slope, intercept, error):
sample = []
for i in range(n):
x = randint(xmin, xmax)
y = round(gauss(intercept + x * slope, error))
sample.append([x, y])
return sample