mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-05 14:55:15 +02:00
[minor] minor changes
This commit is contained in:
parent
ece85f02fe
commit
93b92111f8
3 changed files with 4 additions and 30 deletions
|
|
@ -349,7 +349,7 @@ class Model(Parameterized):
|
|||
numerical_gradient = (f1 - f2) / (2 * step)
|
||||
if np.all(gradient[xind] == 0): ratio = (f1 - f2) == gradient[xind]
|
||||
else: ratio = (f1 - f2) / (2 * step * gradient[xind])
|
||||
difference = np.abs((f1 - f2) / 2 / step - gradient[xind])
|
||||
difference = np.abs(numerical_gradient - gradient[xind])
|
||||
|
||||
if (np.abs(1. - ratio) < tolerance) or np.abs(difference) < tolerance:
|
||||
formatted_name = "\033[92m {0} \033[0m".format(names[nind])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue