- fixed matrix operations
- fixed rms error calculation
This commit is contained in:
+4
-3
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user