- fixed matrix operations

- fixed rms error calculation
This commit is contained in:
2025-12-16 17:03:23 +01:00
parent a3894f7c34
commit e10004051c
4 changed files with 51 additions and 43 deletions
+4 -3
View File
@@ -16,10 +16,11 @@ def prob(src: np.ndarray) -> np.ndarray:
return 1.0 / (1 + np.exp(-src))
def rms_error(d_err: np.ndarray):
d_err_squared = d_err % d_err
d_err_squared = d_err * d_err
return np.sum(d_err_squared, 1) / d_err_squared[1]
def rms_error_accu(d_err: np.ndarray):
d_err_squared = d_err % d_err
return np.cumsum(d_err_squared) / d_err_squared[1]
d_err_squared = d_err * d_err
s = np.sum(d_err_squared) / len(d_err)
return s