Initial commit

This commit is contained in:
2025-08-28 04:57:55 +00:00
commit 2b760caca2
12 changed files with 287 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