Skip to content

Commit

Permalink
update BPINN_PDE_tests.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
AstitvaAggarwal committed Nov 4, 2024
1 parent ada0ce7 commit a4f1184
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/BPINN_PDE_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ end
sol_new = ahmc_bayesian_pinn_pde(pde_system,
discretization;
draw_samples = 150,
bcstd = [0.1, 0.1, 0.1, 0.1, 0.1], phynewstd = [0.1],
bcstd = [0.1, 0.1, 0.1, 0.1, 0.1], phynewstd = [0.4],
phystd = [0.2], l2std = [0.8], param = [Distributions.Normal(2.0, 2)],
priorsNNw = (0.0, 1.0),
saveats = [1 / 100.0, 1 / 100.0],
Expand Down Expand Up @@ -514,11 +514,11 @@ end
for t in ts]

unsafe_comparisons(true)
@test all(all, [((diff_u_new[i]) .^ 2 .< 0.6) for i in 1:6]) == true
@test all(all, [((diff_u_old[i]) .^ 2 .< 0.6) for i in 1:6]) == false
@test all(all, [((diff_u_new[i]) .^ 2 .< 0.7) for i in 1:6]) == true
@test all(all, [((diff_u_old[i]) .^ 2 .< 0.7) for i in 1:6]) == false

MSE_new = [sum(abs2, diff_u_new[i]) for i in 1:6]
MSE_old = [sum(abs2, diff_u_old[i]) for i in 1:6]
MSE_new = [mean(abs2, diff_u_new[i]) for i in 1:6]
MSE_old = [mean(abs2, diff_u_old[i]) for i in 1:6]
@test (MSE_new .< MSE_old) == [1, 1, 1, 1, 1, 1]

param_new = sol_new.estimated_de_params[1]
Expand Down

0 comments on commit a4f1184

Please sign in to comment.