fixed an error.

This commit is contained in:
Batuhan Berk Başoğlu 2025-09-18 21:10:34 -04:00
parent 455b48c89b
commit 6508fcbbab
Signed by: batuhan-basoglu
SSH key fingerprint: SHA256:kEsnuHX+qbwhxSAXPUQ4ox535wFHu/hIRaa53FzxRpo
2 changed files with 9 additions and 9 deletions

View file

@ -63,7 +63,7 @@ class LinearRegression:
shuffled_idx = np.random.permutation(n_samples) # random permutation of the indices
for b in range(n_batches):
start = b * batch_size
end = start + batch_size
end = min(start + batch_size, n_samples)
idx = shuffled_idx[start:end]
x_batch = x_np[idx]