Skip to content

Commit

Permalink
npz files
Browse files Browse the repository at this point in the history
  • Loading branch information
vpuri3 committed Feb 27, 2024
1 parent 4ec1f83 commit 304d162
Show file tree
Hide file tree
Showing 103 changed files with 691 additions and 635 deletions.
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ LuxCUDA = "d0bbae9a-e099-4d5b-a835-1c6931763bda"
LuxDeviceUtils = "34f89e08-e1d5-43b4-8944-0b49ac560553"
MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54"
NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd"
NPZ = "15e1cf62-19b3-5cfa-8e77-841668bca605"
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
Optimisers = "3bd65402-5787-11e9-1adc-39752487f4e2"
Optimization = "7f7a1694-90dd-40f0-9382-eb1efda571ba"
Expand Down
Binary file added examples/advect_fourier1D/advect1d.npz
Binary file not shown.
39 changes: 33 additions & 6 deletions examples/advect_fourier1D/advect1d_compare.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#
using GeometryLearning
using Plots, LaTeXStrings
using NPZ

begin
snfpath = joinpath(pkgdir(GeometryLearning), "examples", "autodecoder.jl")
Expand Down Expand Up @@ -98,6 +99,7 @@ modeldir_SNFL = joinpath(@__DIR__, "model_SNFL_l_$(ll)")
#==================#
# evolve
#==================#

case = 1

modelfile_CINR = joinpath(modeldir_CINR, "model_08.jld2")
Expand All @@ -121,21 +123,46 @@ ud2, up2 = dropdims.((ud2, up2); dims = 1)
ud3, up3 = dropdims.((ud3, up3); dims = 1)

#==================#
# figure
# save data
#==================#
filename = joinpath(@__DIR__, "advect1d.npz")

dict = Dict(
"xdata" => x1,
"tdata" => t1,
"udata" => ud1,

"xCROM" => x1,
"tCROM" => t1,
"uCROM" => up1,

"xSNFW" => x2,
"tSNFW" => t2,
"uSNFW" => up2,

"xSNFW" => x3,
"tSNFW" => t3,
"uSNFW" => up3,
)

npzwrite(filename, dict)

#==================#
# figure
#==================#
plt = plot(;
xlabel = L"x",
ylabel = L"u(x, t)",
)

Nt = length(t1)
ii = [1, Nt]
i1 = [1, Nt]
i2 = Nt

plot!(plt, x1, ud1[:, ii], w = 4, s = :solid , c = :black, label = "Ground truth")
plot!(plt, x1, up1[:, ii], w = 4, s = :dashdot , c = :green, label = "C-ROM")
plot!(plt, x2, up2[:, ii], w = 4, s = :dashdotdot, c = :red , label = "Smooth-NFW (ours)")
plot!(plt, x3, up3[:, ii], w = 4, s = :dashdotdot, c = :blue , label = "Smooth-NFL (ours)")
plot!(plt, x1, ud1[:, i1], w = 4, s = :solid , c = :black, label = "Ground truth")
plot!(plt, x1, up1[:, i2], w = 4, s = :dashdot , c = :green, label = "C-ROM")
plot!(plt, x2, up2[:, i2], w = 4, s = :dashdotdot, c = :red , label = "Smooth-NFW (ours)")
plot!(plt, x3, up3[:, i2], w = 4, s = :dashdotdot, c = :blue , label = "Smooth-NFL (ours)")

pltname = joinpath(@__DIR__, "compare_l_$(latent)")
png(plt, pltname)
Expand Down
Binary file modified examples/advect_fourier1D/compare_l_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/advect_fourier1D/model_CINR_l_04/plt_training_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/advect_fourier1D/model_CINR_l_04/plt_training_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/advect_fourier1D/model_CINR_l_04/plt_training_03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/advect_fourier1D/model_CINR_l_04/plt_training_04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/advect_fourier1D/model_CINR_l_04/plt_training_05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/advect_fourier1D/model_CINR_l_04/plt_training_06.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/advect_fourier1D/model_CINR_l_04/plt_training_07.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/advect_fourier1D/model_CINR_l_04/plt_training_08.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 13 additions & 13 deletions examples/advect_fourier1D/model_CINR_l_04/statistics_01.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
Epoch [0 / 0] TRAIN LOSS: 1.00086 || TEST LOSS: 1.00086
Epoch [0 / 0] TRAIN LOSS: 1.0066255 || TEST LOSS: 1.0066255
#======================#
TRAIN STATS
R² score: -284.4416
MSE (mean SQR error): 1.00086
RMSE (Root MSE): 1.0004299
MAE (mean ABS error): 0.6974292
maxAE (max ABS error) 3.5756156
Lipschitz bound: 1.7745923e8
R² score: -82.881905
MSE (mean SQR error): 1.0066255
RMSE (Root MSE): 1.0033073
MAE (mean ABS error): 0.69994503
maxAE (max ABS error) 3.6405697
Lipschitz bound: 2.4122685e8

#======================#
#======================#
TEST STATS
R² score: -284.4416
MSE (mean SQR error): 1.00086
RMSE (Root MSE): 1.0004299
MAE (mean ABS error): 0.6974292
maxAE (max ABS error) 3.5756156
Lipschitz bound: 1.7745923e8
R² score: -82.881905
MSE (mean SQR error): 1.0066254
RMSE (Root MSE): 1.0033072
MAE (mean ABS error): 0.69994503
maxAE (max ABS error) 3.6405697
Lipschitz bound: 2.4122685e8

#======================#
26 changes: 13 additions & 13 deletions examples/advect_fourier1D/model_CINR_l_04/statistics_02.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
Epoch [0 / 0] TRAIN LOSS: 0.0017113755 || TEST LOSS: 0.0017113755
Epoch [0 / 0] TRAIN LOSS: 0.008209503 || TEST LOSS: 0.008209503
#======================#
TRAIN STATS
R² score: 0.9982695
MSE (mean SQR error): 0.0017113755
RMSE (Root MSE): 0.041368775
MAE (mean ABS error): 0.019237747
maxAE (max ABS error) 1.436725
Lipschitz bound: 1.4249618e8
R² score: 0.9917643
MSE (mean SQR error): 0.008209503
RMSE (Root MSE): 0.09060631
MAE (mean ABS error): 0.035630822
maxAE (max ABS error) 3.707441
Lipschitz bound: 9.286738e7

#======================#
#======================#
TEST STATS
R² score: 0.9982695
MSE (mean SQR error): 0.0017113755
RMSE (Root MSE): 0.041368775
MAE (mean ABS error): 0.019237747
maxAE (max ABS error) 1.436725
Lipschitz bound: 1.4249618e8
R² score: 0.9917643
MSE (mean SQR error): 0.008209503
RMSE (Root MSE): 0.09060631
MAE (mean ABS error): 0.035630822
maxAE (max ABS error) 3.707441
Lipschitz bound: 9.286738e7

#======================#
26 changes: 13 additions & 13 deletions examples/advect_fourier1D/model_CINR_l_04/statistics_03.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
Epoch [0 / 0] TRAIN LOSS: 6.536157e-5 || TEST LOSS: 6.536157e-5
Epoch [0 / 0] TRAIN LOSS: 0.0034195452 || TEST LOSS: 0.0034195452
#======================#
TRAIN STATS
R² score: 0.9999346
MSE (mean SQR error): 6.536157e-5
RMSE (Root MSE): 0.00808465
MAE (mean ABS error): 0.00431201
maxAE (max ABS error) 0.13435459
Lipschitz bound: 1.3623653e8
R² score: 0.99660486
MSE (mean SQR error): 0.0034195452
RMSE (Root MSE): 0.058476876
MAE (mean ABS error): 0.019320237
maxAE (max ABS error) 3.6904504
Lipschitz bound: 8.2932376e7

#======================#
#======================#
TEST STATS
R² score: 0.9999346
MSE (mean SQR error): 6.536158e-5
RMSE (Root MSE): 0.008084651
MAE (mean ABS error): 0.00431201
maxAE (max ABS error) 0.13435459
Lipschitz bound: 1.3623653e8
R² score: 0.99660486
MSE (mean SQR error): 0.0034195452
RMSE (Root MSE): 0.058476876
MAE (mean ABS error): 0.019320237
maxAE (max ABS error) 3.6904504
Lipschitz bound: 8.2932376e7

#======================#
26 changes: 13 additions & 13 deletions examples/advect_fourier1D/model_CINR_l_04/statistics_04.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
Epoch [0 / 0] TRAIN LOSS: 7.224428e-6 || TEST LOSS: 7.224428e-6
Epoch [0 / 0] TRAIN LOSS: 5.144835e-5 || TEST LOSS: 5.1448347e-5
#======================#
TRAIN STATS
R² score: 0.9999928
MSE (mean SQR error): 7.224428e-6
RMSE (Root MSE): 0.0026878298
MAE (mean ABS error): 0.001544364
maxAE (max ABS error) 0.037864923
Lipschitz bound: 1.2534767e8
R² score: 0.9999486
MSE (mean SQR error): 5.144835e-5
RMSE (Root MSE): 0.0071727503
MAE (mean ABS error): 0.0039398465
maxAE (max ABS error) 0.09619093
Lipschitz bound: 7.698274e7

#======================#
#======================#
TEST STATS
R² score: 0.9999928
MSE (mean SQR error): 7.224428e-6
RMSE (Root MSE): 0.0026878295
MAE (mean ABS error): 0.0015443641
maxAE (max ABS error) 0.037864923
Lipschitz bound: 1.2534767e8
R² score: 0.9999486
MSE (mean SQR error): 5.1448347e-5
RMSE (Root MSE): 0.0071727503
MAE (mean ABS error): 0.0039398465
maxAE (max ABS error) 0.09619093
Lipschitz bound: 7.698274e7

#======================#
26 changes: 13 additions & 13 deletions examples/advect_fourier1D/model_CINR_l_04/statistics_05.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
Epoch [0 / 0] TRAIN LOSS: 4.9862592e-6 || TEST LOSS: 4.9862597e-6
Epoch [0 / 0] TRAIN LOSS: 2.5673378e-5 || TEST LOSS: 2.5673377e-5
#======================#
TRAIN STATS
R² score: 0.99999493
MSE (mean SQR error): 4.9862592e-6
RMSE (Root MSE): 0.0022329933
MAE (mean ABS error): 0.0013593892
maxAE (max ABS error) 0.027574897
Lipschitz bound: 1.2537754e8
R² score: 0.9999743
MSE (mean SQR error): 2.5673378e-5
RMSE (Root MSE): 0.0050668903
MAE (mean ABS error): 0.0029047912
maxAE (max ABS error) 0.06899381
Lipschitz bound: 7.669285e7

#======================#
#======================#
TEST STATS
R² score: 0.99999493
MSE (mean SQR error): 4.9862592e-6
RMSE (Root MSE): 0.0022329933
MAE (mean ABS error): 0.0013593893
maxAE (max ABS error) 0.027574897
Lipschitz bound: 1.2537754e8
R² score: 0.9999743
MSE (mean SQR error): 2.5673378e-5
RMSE (Root MSE): 0.0050668903
MAE (mean ABS error): 0.002904791
maxAE (max ABS error) 0.06899381
Lipschitz bound: 7.669285e7

#======================#
26 changes: 13 additions & 13 deletions examples/advect_fourier1D/model_CINR_l_04/statistics_06.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
Epoch [0 / 0] TRAIN LOSS: 2.6238504e-6 || TEST LOSS: 2.6238502e-6
Epoch [0 / 0] TRAIN LOSS: 1.9715682e-5 || TEST LOSS: 1.9715682e-5
#======================#
TRAIN STATS
R² score: 0.9999974
MSE (mean SQR error): 2.6238504e-6
RMSE (Root MSE): 0.0016198304
MAE (mean ABS error): 0.0009697268
maxAE (max ABS error) 0.021978855
Lipschitz bound: 1.2353598e8
R² score: 0.9999802
MSE (mean SQR error): 1.9715682e-5
RMSE (Root MSE): 0.0044402345
MAE (mean ABS error): 0.0026330187
maxAE (max ABS error) 0.05634752
Lipschitz bound: 7.678265e7

#======================#
#======================#
TEST STATS
R² score: 0.9999974
MSE (mean SQR error): 2.6238504e-6
RMSE (Root MSE): 0.0016198304
MAE (mean ABS error): 0.0009697268
maxAE (max ABS error) 0.021978855
Lipschitz bound: 1.2353598e8
R² score: 0.9999802
MSE (mean SQR error): 1.9715682e-5
RMSE (Root MSE): 0.0044402345
MAE (mean ABS error): 0.002633019
maxAE (max ABS error) 0.05634752
Lipschitz bound: 7.678265e7

#======================#
26 changes: 13 additions & 13 deletions examples/advect_fourier1D/model_CINR_l_04/statistics_07.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
Epoch [0 / 0] TRAIN LOSS: 9.255608e-7 || TEST LOSS: 9.255608e-7
Epoch [0 / 0] TRAIN LOSS: 7.349436e-6 || TEST LOSS: 7.349437e-6
#======================#
TRAIN STATS
R² score: 0.99999905
MSE (mean SQR error): 9.255608e-7
RMSE (Root MSE): 0.00096206076
MAE (mean ABS error): 0.0006050249
maxAE (max ABS error) 0.008881092
Lipschitz bound: 1.2250549e8
R² score: 0.99999267
MSE (mean SQR error): 7.349436e-6
RMSE (Root MSE): 0.0027109843
MAE (mean ABS error): 0.0016720209
maxAE (max ABS error) 0.03496924
Lipschitz bound: 7.612253e7

#======================#
#======================#
TEST STATS
R² score: 0.99999905
MSE (mean SQR error): 9.255607e-7
RMSE (Root MSE): 0.00096206076
MAE (mean ABS error): 0.0006050249
maxAE (max ABS error) 0.008881092
Lipschitz bound: 1.2250549e8
R² score: 0.99999267
MSE (mean SQR error): 7.349436e-6
RMSE (Root MSE): 0.0027109843
MAE (mean ABS error): 0.0016720208
maxAE (max ABS error) 0.03496924
Lipschitz bound: 7.612253e7

#======================#
26 changes: 13 additions & 13 deletions examples/advect_fourier1D/model_CINR_l_04/statistics_08.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
Epoch [0 / 0] TRAIN LOSS: 6.401627e-7 || TEST LOSS: 6.401627e-7
Epoch [0 / 0] TRAIN LOSS: 3.7097816e-6 || TEST LOSS: 3.709782e-6
#======================#
TRAIN STATS
R² score: 0.99999934
MSE (mean SQR error): 6.401627e-7
RMSE (Root MSE): 0.00080010167
MAE (mean ABS error): 0.00052187586
maxAE (max ABS error) 0.007401824
Lipschitz bound: 1.2230506e8
R² score: 0.9999963
MSE (mean SQR error): 3.7097816e-6
RMSE (Root MSE): 0.0019260794
MAE (mean ABS error): 0.0012574346
maxAE (max ABS error) 0.023277521
Lipschitz bound: 7.532881e7

#======================#
#======================#
TEST STATS
R² score: 0.99999934
MSE (mean SQR error): 6.401626e-7
RMSE (Root MSE): 0.0008001016
MAE (mean ABS error): 0.0005218759
maxAE (max ABS error) 0.007401824
Lipschitz bound: 1.2230506e8
R² score: 0.9999963
MSE (mean SQR error): 3.7097816e-6
RMSE (Root MSE): 0.0019260794
MAE (mean ABS error): 0.0012574347
maxAE (max ABS error) 0.023277521
Lipschitz bound: 7.532881e7

#======================#
Binary file modified examples/advect_fourier1D/model_SNFL_l_04/plt_training_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/advect_fourier1D/model_SNFL_l_04/plt_training_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/advect_fourier1D/model_SNFL_l_04/plt_training_03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/advect_fourier1D/model_SNFL_l_04/plt_training_04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/advect_fourier1D/model_SNFL_l_04/plt_training_05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/advect_fourier1D/model_SNFL_l_04/plt_training_06.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/advect_fourier1D/model_SNFL_l_04/plt_training_07.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/advect_fourier1D/model_SNFL_l_04/plt_training_08.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 13 additions & 13 deletions examples/advect_fourier1D/model_SNFL_l_04/statistics_01.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
Epoch [0 / 0] TRAIN LOSS: 1.0041584 || TEST LOSS: 1.0041585
Epoch [0 / 0] TRAIN LOSS: 1.0042998 || TEST LOSS: 1.0042998
#======================#
TRAIN STATS
R² score: -269310.53
MSE (mean SQR error): 0.99998814
RMSE (Root MSE): 0.999994
MAE (mean ABS error): 0.702276
maxAE (max ABS error) 3.2403333
Lipschitz bound: 130972.56
R² score: -1.473573e6
MSE (mean SQR error): 0.9999838
RMSE (Root MSE): 0.99999183
MAE (mean ABS error): 0.7000161
maxAE (max ABS error) 3.2416978
Lipschitz bound: 131354.47

#======================#
#======================#
TEST STATS
R² score: -269310.5
MSE (mean SQR error): 0.99998814
RMSE (Root MSE): 0.999994
MAE (mean ABS error): 0.70227605
maxAE (max ABS error) 3.2403333
Lipschitz bound: 130972.56
R² score: -1.473573e6
MSE (mean SQR error): 0.99998367
RMSE (Root MSE): 0.99999183
MAE (mean ABS error): 0.7000161
maxAE (max ABS error) 3.2416978
Lipschitz bound: 131354.47

#======================#
Loading

0 comments on commit 304d162

Please sign in to comment.