Reproducing example
The packages for this example are documented in the Project.toml.
Accessing example
This can also be accessed as a plain script.
Description
This example shows a simple use case for NormalizingFlowFilters.
First, we import the necessary packages.
using Pkg: Pkg
Pkg.activate(@__DIR__)
Pkg.instantiate()
using CairoMakie
using NormalizingFlowFilters
using Random: randn, seed!
using Statistics: mean, std, cov
using Test
using Pkg: Pkg
@static if VERSION >= v"1.10"
using PairPlots: PairPlots, pairplot
end
function display_interactive(fig)
if isinteractive()
display(fig)
else
fig
end
end
smalltest = get(ENV, "NormalizingFlowFilters_smalltest", "false")
if !(smalltest in ("true", "false"))
error("Invalid environment variable value NormalizingFlowFilters_smalltest: $smalltest")
end
smalltest = smalltest == "true"falseThen define the filter.
N = smalltest ? 2^4 : 2^11
Nx = 2
seed!(0x84fb4b2c)
glow_config = ConditionalGlowOptions(; chan_x=Nx, chan_y=Nx)
network = NetworkConditionalGlow(2, glow_config)
optimizer_config = OptimizerOptions(; lr=1e-3)
optimizer = create_optimizer(optimizer_config)
device = cpu
training_config = TrainingOptions(;
n_epochs=smalltest ? 10 : 45,
num_post_samples=1,
noise_lev_y=1e-3,
noise_lev_x=1e-3,
batch_size=smalltest ? 2^2 : 2^9,
validation_perc=2^(-1),
)
filter = NormalizingFlowFilter(network, optimizer; device, training_config)NormalizingFlowFilters.NormalizingFlowFilter(InvertibleNetworks.NetworkConditionalGlow, InvertibleNetworks.NetworkConditionalGlow, Flux.Optimise.Optimiser(Any[Flux.Optimise.ClipNorm{Float32}(3.0f0), Flux.Optimise.Adam(0.001, (0.9, 0.999), 1.0e-8, IdDict{Any, Any}())]), Flux.cpu, NormalizingFlowFilters.TrainingOptions(45, 512, 0.001, 0.001, 1, 0.5, 2))We generate an ensemble.
# N ensemble members from a unit normal.
prior_state = randn(Float64, Nx, N)
prior_state .-= mean(prior_state; dims=2)
prior_state ./= std(prior_state; dims=2)
function to_table(a; prefix=:x)
return (; (Symbol(prefix, i) => row for (i, row) in enumerate(eachrow(a)))...)
end
combine_tables(a, b) = (; a..., b...)
table_prior_state = to_table(prior_state)
@static if VERSION >= v"1.10"
kde_bandwidth =
training_config.noise_lev_x /
PairPlots.KernelDensity.default_bandwidth(prior_state[1, :])
table_prior_state_mean = to_table(mean(prior_state; dims=2)[:, 1])
fig = pairplot(
table_prior_state => (
PairPlots.Hist(; colormap=:Blues),
PairPlots.MarginDensity(;
bandwidth=kde_bandwidth, color=RGBf((49, 130, 189) ./ 255...)
),
PairPlots.TrendLine(; color=:red),
PairPlots.Correlation(),
PairPlots.Scatter(),
),
PairPlots.Truth(
table_prior_state_mean; label="Mean Values", color=(:black, 0.5), linewidth=4
),
)
supertitle = Label(fig[0, :], "prior state"; fontsize=30)
resize_to_layout!(fig)
display_interactive(fig)
endApply observation operator.
# Identity observation operator with some noise.
prior_obs = 0.5 .* deepcopy(prior_state) .+ 0.5 .* randn(Float64, size(prior_state))
table_prior_obs = to_table(prior_obs; prefix=:y)
@static if VERSION >= v"1.10"
table_prior_obs_mean = to_table(mean(prior_obs; dims=2)[:, 1]; prefix=:y)
fig = pairplot(
table_prior_obs => (
PairPlots.Hist(; colormap=:Blues),
PairPlots.MarginDensity(;
bandwidth=kde_bandwidth, color=RGBf((49, 130, 189) ./ 255...)
),
PairPlots.TrendLine(; color=:red),
PairPlots.Correlation(),
PairPlots.Scatter(),
),
PairPlots.Truth(
table_prior_obs_mean; label="Mean Values", color=(:black, 0.5), linewidth=4
),
)
supertitle = Label(fig[0, :], "prior observation"; fontsize=30)
resize_to_layout!(fig)
display_interactive(fig)
endLook at how observations correlate to data.
@static if VERSION >= v"1.10"
combo_table = combine_tables(table_prior_state, table_prior_obs)
combo_table_mean = combine_tables(table_prior_state_mean, table_prior_obs_mean)
fig = pairplot(
combo_table => (
PairPlots.Hist(; colormap=:Blues),
PairPlots.MarginDensity(;
bandwidth=kde_bandwidth, color=RGBf((49, 130, 189) ./ 255...)
),
PairPlots.TrendLine(; color=:red),
PairPlots.Correlation(),
PairPlots.Scatter(),
),
PairPlots.Truth(
combo_table_mean; label="Mean Values", color=(:black, 0.5), linewidth=4
),
)
supertitle = Label(fig[0, :], "prior state-observation"; fontsize=30)
resize_to_layout!(fig)
display_interactive(fig)
endThen we assimilate an observation. Here, we just pick an arbitrary one.
y_obs = zeros(Nx)
log_data = Dict{Symbol,Any}()
posterior = assimilate_data(filter, prior_state, prior_obs, y_obs, log_data)2×2048 Matrix{Float32}:
0.305756 0.81438 -0.228569 0.687502 1.41026 -0.176399 -0.189961 0.813874 0.495936 -0.200409 -0.475669 0.326596 0.624351 -0.264964 -1.31165 -0.462063 1.36516 -1.31596 0.643871 -1.07994 1.13909 -0.55851 1.52112 0.17886 1.01565 0.0300711 1.44019 0.190365 0.783838 1.1157 -0.29932 -0.726548 -0.192394 -0.235631 -0.373807 -0.584762 -0.451893 1.10132 5.84225f-5 0.673692 0.922575 1.19091 -0.36713 1.5131 -1.22852 1.68201 -0.333888 -1.02625 0.16567 -0.128024 -1.12273 0.0252432 1.52731 -0.48407 -1.23421 -0.377696 0.86131 0.436163 -0.714593 -0.132894 -0.308279 0.643637 -1.92185 -0.377593 1.33296 0.655443 -0.523988 -0.72274 0.400464 1.34253 0.0444438 1.21344 0.331165 0.181708 -0.75676 1.52271 -0.905681 2.16266 -0.48158 -0.100409 0.0140773 -0.61112 0.46894 -0.111019 -0.152456 1.70219 0.591855 -0.83641 -0.00246445 -1.40459 0.261119 2.18252 0.966882 2.41383 0.73663 1.35049 0.297246 1.01538 0.302012 0.0838997 -0.500185 0.420571 1.0935 -0.21447 0.893986 -0.242322 -0.146571 1.34787 0.27609 1.57241 -0.0415592 -0.374339 -0.754939 0.425975 -1.31538 -2.32515 0.086923 -0.0330882 -1.33466 -1.16461 -0.517237 0.446693 -0.0861981 0.996119 0.00651673 0.0321351 0.393452 -0.200236 -0.223634 -0.687061 -0.363882 0.0775958 -0.399819 -0.544241 1.43218 0.837052 0.836049 -0.328981 0.147878 0.0941816 -1.73536 0.129704 0.330495 0.727945 0.050864 -0.799246 0.421922 1.15138 1.20123 0.130028 -0.437956 -0.766167 0.121296 0.711231 0.843421 0.241876 0.341554 1.47522 0.866613 0.633163 -0.0897784 0.722346 -0.0449629 0.0353304 0.511094 0.336942 -1.95981 0.811991 -0.422665 0.19057 0.521094 0.62929 -0.121167 0.598005 -0.0770325 0.406657 1.09362 -1.90834 -0.179637 0.447652 0.451365 0.0202193 0.914044 -0.960064 0.753744 0.129748 -1.13679 0.83345 1.01285 -0.4296 -0.258761 0.264563 0.569063 -1.5849 -0.842116 -0.472893 0.774292 0.0140174 0.529812 -0.181071 -0.191234 -1.00108 0.287688 -0.127993 0.84651 -1.36686 0.573319 0.0604721 1.35911 0.632585 0.444985 -0.837424 1.17464 0.917815 0.579404 0.0455122 -0.060993 0.354378 -0.0813707 -0.619719 -1.36147 1.07423 0.474138 0.628317 -0.417253 0.325433 1.04953 -0.440695 -1.01172 0.182729 0.000380392 0.285116 -0.968763 0.529023 0.598228 0.659445 -0.548707 -1.17785 0.32412 0.252442 -0.460311 -1.20743 -1.40766 0.301706 0.0672443 0.513732 -0.982641 0.0323392 0.178333 -1.24616 -0.0496581 -0.318407 0.110459 0.278226 -0.620283 0.323582 1.05424 -1.42535 1.79196 0.0686176 0.0585125 0.896881 -0.149659 -2.37126 0.457429 -0.263795 0.222257 1.12944 -0.616784 -0.248518 -0.986025 1.08082 -0.27806 0.49375 -0.0575066 -1.25196 -0.417965 0.606981 0.310885 1.66303 0.659891 0.299742 1.08787 -0.221367 -0.388738 0.504577 0.150651 0.202265 -0.910569 1.59432 0.427194 -0.509407 -0.185768 1.12864 0.293189 -0.0431767 -0.0848889 -0.178703 -0.149267 -0.757771 0.555848 -0.0367536 -0.150068 -0.023709 -0.466486 1.0926 -1.32451 0.357532 0.475867 0.576065 0.764961 0.0702864 -1.15348 0.263106 -1.4901 -0.509966 0.685445 0.721422 -0.344091 0.640662 0.103716 0.891842 -0.341408 -0.137626 0.662077 -0.0447314 0.262835 0.00780233 0.0759005 0.160091 -1.12535 1.43011 1.28672 -0.51658 0.452004 -0.478034 0.122526 -0.362735 -0.121681 0.38809 -0.267861 0.18884 0.255583 -0.651816 -0.502358 -0.227563 -0.33355 -0.023786 1.33085 0.387826 0.0308594 0.344971 0.334517 -0.764341 0.0785726 0.145167 -0.0469804 -0.387367 -0.0224346 0.0369952 0.492248 0.24714 -1.03713 0.50231 -0.347493 -0.437513 0.39979 0.635796 -0.486245 0.0626491 0.114331 -1.10628 0.859526 0.230818 0.00841113 0.043951 -0.376266 0.448423 0.625755 -1.38608 0.837563 -0.388442 -0.892108 0.231444 0.750805 -1.70556 -0.308823 1.26059 1.03802 0.736658 0.386673 -0.658636 -0.047524 -0.172615 0.802144 0.139499 -0.305257 1.02971 0.443154 0.914014 -1.96061 -1.00998 0.284577 0.0186114 -1.28777 1.23639 1.41593 0.473737 0.590157 0.19964 -0.445898 -0.240353 -0.131446 0.274608 0.0428442 0.306281 0.158647 0.0223959 0.548274 -1.29074 -0.699801 0.964527 -1.28053 -0.635925 -0.413501 0.234396 -0.16219 0.765735 -1.32816 0.0476377 0.0975824 1.02508 -0.219662 -0.00392528 0.27539 0.157524 -0.642921 -0.0474651 -0.0436273 1.24678 0.0369633 0.0703889 0.509285 1.33047 -0.416854 -0.581074 -0.667715 0.849641 -0.140964 -0.687051 -0.53615 0.258373 0.353941 -1.24652 0.70787 -0.207322 -0.231406 0.970866 0.925253 0.059502 1.24476 -1.73267 -0.525059 0.266299 -0.914795 0.252094 -1.10676 -0.135608 -0.0615793 0.738995 -0.798386 0.511616 0.11696 -0.706014 -0.846526 0.168411 0.932491 1.21288 0.812658 0.0836939 -0.151622 -0.435874 -0.917128 -0.1263 0.117793 0.891284 -0.400716 -0.545886 0.473039 -0.913307 0.526913 0.974529 -2.02215 -0.318369 -1.52324 0.817319 1.47294 -0.418046 0.181346 -0.129758 0.428815 -0.687487 -0.885242 0.334579 0.246335 0.46529 0.878716 -1.91105 0.662577 0.617704 -0.347923 -0.757667 -0.158156 0.202393 -1.26563 0.283292 -0.619888 0.267058 -0.661029 0.723395 0.627797 0.243227 1.13686 0.171572 -1.24413 0.447116 0.04918 0.0410332 1.86617 0.0439934 -0.754883 0.0620228 0.595833 0.813978 -0.147042 -0.13117 0.613698 -0.143424 0.199323 -0.165411 0.575437 -1.26806 -0.832519 -0.987614 0.252092 0.412251 -0.0184925 -1.16097 1.99726 -0.052852 -0.040157 0.0351239 -0.00598954 -0.148337 0.0441643 -0.908471 0.0122886 0.52137 -2.00332 -0.619391 -0.861901 -0.0224958 0.87331 -0.159375 -0.34034 -0.532417 0.112446 0.477353 -2.25409 1.25666 0.379108 -0.125389 -0.631944 0.270125 -0.256167 0.653289 0.356966 -0.197045 -0.777374 -0.995124 -0.00912362 0.694018 -0.760114 0.189595 1.26924 0.584941 0.449386 0.677093 -2.3665 1.86475 -0.385289 -0.108151 0.0168363 -0.744723 0.888132 1.582 -2.61952 0.520128 -0.0935746 -0.568656 0.318314 -1.06262 0.333359 -0.363475 0.175364 0.829678 1.14421 0.666971 1.87018 -0.868308 0.809309 0.154507 0.485911 0.0339769 0.246146 -0.258644 -0.250297 -0.293936 -0.585659 -0.0657302 0.119165 -0.114829 0.201454 1.04333 0.0322779 -0.289939 -0.152479 0.0307748 -0.317092 -0.425044 -0.0115695 -1.46456 1.49496 0.348569 0.776491 -1.32601 -0.222 -1.39363 0.918377 1.23114 0.957475 0.0722557 -1.33785 0.287336 -0.59356 -0.525695 1.14831 0.690518 0.195379 -0.527668 -0.878299 0.0470061 0.0152406 -0.519271 -0.654194 -1.07395 1.35808 0.75713 -0.0237459 -1.81714 -1.86543 -1.62155 0.335594 -0.178133 1.33853 0.195714 0.0984758 0.59532 -0.269054 1.81534 -0.419398 0.150269 0.323013 -0.611374 0.204077 -0.475004 -0.15171 0.791568 0.533753 -0.694538 -2.09119 -0.60999 -0.703271 0.869136 0.818394 -0.188329 -1.09022 2.79186 0.862082 1.82611 1.5627 0.0963026 0.096033 0.87129 -0.232176 -0.578523 0.247988 -0.0576272 -0.592033 0.0782034 -0.193315 -0.810109 0.675307 -0.727731 0.456776 -1.23922 0.899687 0.134889 -0.410708 -0.337701 -0.452612 0.782191 -0.979776 -0.255969 -0.772785 1.20254 -0.883888 -0.105561 0.750866 -0.446355 -1.48583 0.598129 -0.156634 1.02268 0.549491 0.30814 1.93103 -1.48991 -1.04567 -0.501877 -1.25481 0.382805 0.848814 0.456595 0.956862 0.710066 -1.26903 -1.71036 1.23316 0.205281 -0.0493139 0.281924 -0.254002 0.671991 -0.343126 0.578893 -0.718033 0.73675 0.352436 0.367075 0.720319 -0.750159 0.182916 -0.799819 -1.01951 -0.258816 0.396695 -0.846321 -0.433853 -0.910715 -0.571477 -1.38664 0.75904 -0.0231163 -0.2911 0.469885 -0.829086 0.077533 -0.383392 -0.0639955 -0.521758 0.727483 -1.14057 -1.24296 0.970237 -0.171212 1.56371 -0.239503 0.676989 -1.12819 0.853132 1.0553 1.37191 -0.412326 0.20399 -1.49856 0.507168 -0.31644 0.332412 0.0388088 -0.257741 -1.54456 0.628568 0.691686 0.239297 -1.89041 -0.205929 0.469799 -1.39909 -0.123011 0.865279 -1.06387 1.93842 -0.381289 0.21553 -0.849261 0.773198 0.237105 -0.205558 -1.29955 -0.644015 -0.290264 -0.0939752 0.440793 -0.100937 0.495285 0.195254 0.0323155 -0.728005 0.0694509 0.715212 0.278788 0.216602 -0.296856 -0.795288 -1.16804 1.79167 1.58687 0.816082 -0.0153456 -0.465086 -1.35031 -0.798678 1.02842 -0.580904 -0.270042 0.203283 1.10186 0.288476 1.41988 -0.704356 -0.346359 -0.416119 -0.0668005 0.53554 -0.55174 0.212535 0.645009 0.0878021 0.00252312 1.30821 0.178694 -0.763702 -0.17912 -1.49669 1.28009 -0.932152 -0.0817221 -0.464164 1.59756 -0.603266 -0.199946 -1.07242 -1.58083 0.809466 -1.98604 0.815815 1.40189 -1.45128 -1.46863 0.980593 0.0813055 -0.791754 -0.303011 -0.718376 0.604617 -0.444813 -0.390149 -1.14162 -0.740099 0.171271 6.38641f-5 -0.542155 -0.126741 0.29251 -0.83861 0.6872 1.91034 -0.736051 0.997129 1.23204 0.12189 -0.677931 -0.154049 0.120278 0.535886 -0.0351898 0.861397 -0.38695 -0.467818 0.283446 -0.188764 0.822097 0.30731 -0.842555 0.342057 -1.7973 0.241758 -2.11971 0.962895 -0.678934 0.029544 -0.335604 -0.0834471 -1.50517 0.295171 -0.695597 1.04385 0.205114 -1.52963 0.433635 -0.195495 -0.148179 0.995461 0.856131 -0.617196 -0.877749 0.19656 -0.303994 1.39664 -1.03398 -1.26089 0.170991 0.762957 0.624662 -1.60118 -0.086409 -0.136437 1.20223 -0.112088 -0.0175233 -0.838218 -0.109593 0.674892 -0.448936 -0.743989 0.559834 0.751166 -0.0881912 0.328193 1.14709 0.231342 -0.42915 0.397929 -1.0593 0.704812 -0.099343 0.497617 0.0776916 -0.373304 0.120674 0.0651401 0.701271 -1.07547 0.125968 -0.55993 0.331474 -0.910961 0.518788 -1.70579 -0.156133 0.33999 -0.19755 0.56932 -0.7773 0.991282 -1.53978 0.370663 0.340405 -2.12659 -0.484506 -0.185028 0.454469 0.590177 0.465187 0.33795 0.438711 0.407942 -1.88251 0.932993 0.897486 -0.152046 -0.113137 0.799379 0.605148 -0.0947559 0.530893 -1.09865 0.781451 -1.07434 1.37138 0.942694 -0.643778 0.00443348 0.363016 0.999665 0.310877 -0.214181 -0.606253 -0.0646343 -0.969671 -1.25378 0.735171 0.458937 0.651991 0.0360511 -0.549356 -0.765192 0.301257 -0.138369 0.342301 -0.643628 -0.311645 1.1094 1.40886 0.0694226 -0.716894 -1.15363 -1.01558 0.837252 -0.584078 0.103342 -0.135896 -1.14734 -1.07109 0.211245 0.250338 0.664024 0.714962 -0.216354 -2.40176 0.412798 -2.09834f-6 -0.478326 -0.00458238 -0.0963439 0.897577 0.325083 1.32279 0.366374 1.19935 0.865741 0.186594 1.26905 0.980017 0.920455 -0.83261 0.155171 1.9029 -0.180473 0.658651 0.0105739 -0.587927 1.58065 -1.88275 0.686682 -0.545743 -1.00701 0.616592 -0.767471 -0.704019 1.2983 0.214656 -0.0449489 0.0988422 -1.59409 1.37452 0.176477 0.388584 -1.05663 -0.165167 -1.47245 -0.322987 0.177324 0.294687 -0.334091 -0.311333 -0.407938 -0.389456 0.649677 -1.18528 1.42962 0.000654213 -0.983198 0.43013 -0.844169 -1.74496 0.546986 0.25544 0.0540657 0.489444 0.19708 0.0057845 -0.64261 -0.709091 0.182653 -0.458111 0.403018 -0.212964 0.82318 -1.07423 -0.941635 0.247078 0.0286427 -0.343519 0.591661 -0.560742 -0.315364 0.704246 -0.900097 0.0241273 0.558914 -0.498638 1.99625 0.247411 0.473151 0.803152 1.0827 -0.75463 -0.300407 0.106356 0.240719 -0.48165 -0.785111 -0.622681 1.42896 1.46506 0.0309658 1.16013 -0.266775 0.798178 -0.150393 0.485523 -0.0246216 -0.455572 -0.62165 0.0979135 -0.55747 -0.120922 -0.666539 0.375546 -0.49918 -0.144481 0.83773 -0.0273342 -0.255927 -1.35548 -1.24449 -0.186143 -1.22634 -0.988427 -0.275474 -0.134203 0.22819 -0.457444 0.582115 0.599383 0.532096 -0.416017 -0.400536 -0.159767 -0.614343 -0.546538 -0.618111 0.0879673 0.0751092 0.797045 0.752581 0.118738 -0.0333084 -0.11292 -0.59966 0.481256 -0.951864 1.13065 -0.336696 -0.587353 -0.347985 -0.124007 0.245895 -1.11596 -0.430498 0.86018 -1.78451 0.752703 0.0409154 -1.39435 -0.17392 0.655201 0.125182 0.348216 0.633308 -1.4998 0.116361 -0.185369 0.15852 -0.189389 -0.305977 0.304909 0.304735 0.937826 -1.1976 3.09248 0.339131 0.787901 -0.783948 -1.71631 -0.0962774 0.574613 0.367945 -0.54173 0.78955 0.344471 0.831132 -0.311249 0.726737 0.55467 1.09538 1.46105 -1.10203 0.698044 -0.912667 0.0792708 0.176761 0.530742 -0.630927 -1.01288 0.242833 1.11972 -0.0527129 0.969197 -1.48528 -0.00704064 -0.0341823 0.19896 0.845326 0.787594 0.206708 -0.52507 -0.710667 0.539428 0.189806 -0.729543 0.0702528 -0.57306 0.212284 0.854879 0.518078 -0.823684 0.248285 0.627485 -0.562058 0.953544 2.792 -0.314217 -1.44153 -1.31843 -1.19462 0.557765 0.101577 -0.00749004 -0.329158 -0.556025 -0.135883 0.364667 0.467208 -0.529249 0.0429986 -1.84886 -0.539657 0.642239 0.43102 0.23755 -1.17635 -0.0600481 -0.393078 1.36683 0.320676 -0.617689 -1.08462 0.34266 0.464589 1.08416 -0.945151 0.248058 1.36441 0.691453 -0.237578 0.168017 -0.847602 0.262341 -0.0357774 -0.522858 0.440509 0.791773 -0.843571 -0.538975 -0.428262 0.104952 -0.436638 -0.661206 -0.20673 -0.634231 0.315378 0.3705 1.09181 -1.51874 1.33763 0.289997 -0.302194 0.621617 -0.0788089 0.692338 0.545485 -1.01745 -0.255681 1.42368 -0.442955 1.33257 -1.89165 0.688517 -0.74671 -0.110785 0.365455 -0.66378 0.165612 0.808122 1.17113 -1.49325 0.870635 0.153527 -0.359223 0.893662 -0.346429 -0.585695 -0.111604 1.34824 -0.898572 -0.853772 1.44267 -0.791236 0.161356 1.27767 0.608622 0.818267 -0.0755943 0.295432 -0.934131 -0.12451 -1.45495 -0.84688 0.782346 0.320931 1.50645 -0.189544 0.600615 -0.623232 1.07633 -0.734098 -0.336305 -0.161671 1.6672 1.19717 -0.117216 -0.522229 0.552121 -1.15225 -0.59839 -0.509033 0.164759 0.594669 -0.0547216 -0.042876 0.332388 0.655333 0.215289 0.931341 -0.555818 -0.39339 0.520791 0.288121 0.458855 0.680709 -1.58502 -0.910346 -0.00735289 -0.177418 0.933644 -0.511974 -0.477579 -1.14584 -0.227583 -1.25001 0.551878 1.7745 0.230348 0.438351 -0.619871 1.52243 -0.863809 0.588686 -0.132371 0.029264 0.394332 -2.15228 0.323133 2.43045 0.108312 -0.147004 -0.393877 0.435902 -1.727 -0.672198 -0.76099 -0.983843 -0.77342 -0.703473 0.542305 0.540633 0.410665 -0.761721 -0.739837 0.587408 0.0168829 -0.602431 -0.522349 -0.954208 0.593119 -0.619594 0.549407 0.596094 0.435037 -0.313878 -0.624175 0.0299846 -0.141841 -0.0571561 0.658818 -0.353609 0.36811 0.656564 -1.47397 0.853647 -0.243164 -0.0978727 -0.587213 -2.29391 -0.676262 0.856907 -0.414948 -0.424717 -0.271615 0.244038 0.456344 -0.254832 0.144556 -0.0127142 -1.23095 0.0637577 -0.557399 0.984454 -0.183882 -0.0763179 -0.368045 0.234922 2.22047 -1.12613 -1.43586 0.42729 0.508137 0.0544776 -0.210949 1.06529 -0.0259204 -0.15386 -0.524673 -0.191814 -0.634429 -0.340533 0.530614 -1.1196 -2.4701 -0.759392 0.557964 0.238953 -0.627113 -1.13725 -0.485532 -0.00996698 0.309342 0.989638 1.66929 0.669497 1.54025 -0.774727 -0.480428 0.438166 -0.370619 0.326874 -0.801996 -1.04927 -0.446475 -1.05491 1.07326 -0.698814 0.830107 0.656786 0.394922 -1.80744 0.994149 -1.02126 1.21173 0.152001 0.00636222 0.22218 -0.889987 0.143778 0.946943 0.146052 -1.19263 -0.468762 0.551082 0.210657 -0.990104 -0.547976 -1.14824 -0.871117 0.404625 -0.0101091 0.270414 -1.24429 -0.781273 0.494786 0.00061655 0.181351 -0.572269 -1.33968 -1.10673 -0.790436 -2.00059 1.28502 0.556924 0.611675 0.052742 1.23879 0.636325 -0.389578 0.818768 -0.515402 -0.110135 -0.0589456 -0.0642347 -0.766795 -0.994942 -0.330742 -0.100017 0.275706 -0.232498 0.1325 0.283294 -0.961203 1.08627 0.539789 0.256774 -0.493364 -0.676255 -0.393212 -0.839032 -1.0925 -0.433111 0.689071 -1.24284 0.321481 -1.01505 -0.0127435 0.00460759 1.02671 -0.453877 0.827731 0.559644 0.672509 0.251703 0.844311 -0.975136 0.543041 0.419231 0.0816785 1.17562 -1.12002 -0.544078 0.505023 -0.610788 0.599944 0.833373 0.129192 0.653499 -0.0617791 -0.110561 -0.625923 -0.124188 1.06104 -0.763715 -0.376434 1.25616 -1.00233 -0.652256 -0.821474 -0.0749552 -0.180766 0.809582 0.231769 -1.35016 0.965573 -1.28247 0.245981 0.740191 0.825918 0.91118 -0.484704 -0.371079 -0.708896 0.166026 -0.190503 -0.576611 0.406157 1.42089 0.187609 -1.48351 1.68909 0.30538 -0.314589 1.33154 0.682202 0.498986 -0.808292 -0.108652 0.0427195 0.0328769 -0.417621 -1.57845 0.577833 -0.535656 0.290463 -0.257948 -0.740162 0.284807 -1.42696 -0.861445 0.989153 0.787596 -0.183329 0.522033 -0.184929 0.0702239 -1.34317 0.295135 -0.0942205 -1.48624 0.589258 0.0873477 0.510361 0.669108 -0.421348 -1.03891 0.121908 0.668016 -0.331167 -0.0716393 -0.0246899 -0.377119 0.566992 0.216712 -1.47437 -0.368523 0.151734 0.411219 0.511902 0.696635 0.113521 0.546423 0.0334804 0.451827 1.12884 -0.0231957 0.0823896 -0.291773 1.54124 0.792833 0.560223 0.192848 0.890963 -0.356064 -0.191424 -0.171556 -0.000771632 -0.265937 -1.39175 0.304497 -0.348623 0.676195 -0.794152 0.446248 0.380216 -0.0644006 -0.938455 1.44859 0.921747 0.568471 0.00444602 -0.729096 0.68096 0.086891 -0.670872 0.478347 1.28519 -0.313119 -0.317065 -0.591161 -0.773777 -0.86941 -1.09312 -0.38715 0.561437 0.467724 0.630104 -0.664827 1.16648 -0.548868 0.416708 -0.258523 -0.564482 0.910965 -0.246272 0.722354 -1.26912 -1.11615 -0.114715 0.595337 0.444938 0.306895 0.323552 0.991619 -0.852995 0.867557 -0.0117237 0.867292 -0.0108019 0.298532 0.813307 0.859296 1.21322 -1.12643 -0.914495 -0.0851984 -0.764123 0.095786 -0.173017 0.231887 0.117875 0.331101 1.15987 0.99672 0.206443 0.00662088 -0.138838 -0.752845 1.18992 -0.595831 -0.880729 0.114471 -1.94098 -0.41213 0.0868272 0.562395 -0.0036209 -0.350622 0.0854756 -0.676884 0.979205 1.02156 -1.23956 -0.857379 -1.26716 0.205731 -0.751587 -0.208303 0.505026 0.228155 -1.1367 0.929307 -0.184486 0.427256 -1.18725 0.169089 -0.581815 -1.37702 0.565449 0.562583 -0.73196 0.66641 0.804055 0.680661 0.144347 -0.040589 0.515996 -1.49439 0.802482 0.0750945 0.338068 1.44606 0.047364 -0.0107616 0.588469 0.908161 -0.530392 -0.0584619 -1.00199 -0.608144 1.20462 -0.597987 -0.177275 -0.14304 0.823032 -0.0463941 0.190465 0.688853 -0.47583 0.0444364 0.522848 -0.1751 -1.61261 0.083091 1.37561 0.0943295 1.89485 0.0912831 0.0789011 0.600199 -0.424942 -1.53927 -0.050204 -0.298384 0.32263 -0.545017 0.416137 -0.877239 0.940365 -0.0613907 0.330807 0.339507 -0.156321 0.1044 -0.705983 0.559024 -0.165754 -0.191381 0.462473 -0.617448 -0.120879 -0.874971 -0.393334 0.498757 -0.589042 -1.46649 1.25505 -1.39155 1.77705 -0.0833084 -0.307737 -0.260547 -0.375042 -1.11704 -0.455452 -1.13748 0.227298 0.991741 -0.659748 -0.426534 0.437897 0.0286069 0.682541 0.0773111 -1.21742 -1.22558 1.23362 -1.22976 0.00599033 -0.980087 -0.165851 0.324052 0.0479765 0.345205 0.21518 -1.27417 0.702697 -0.51911 0.684995 -0.603895 -0.0274339 0.0749515 1.92542 0.840562 0.630623 0.548939 -0.297139 -0.310693 0.642417 0.355326 0.258629 -2.18875 -0.221039 0.599133 1.58314 -0.681329 1.352 -0.92723 0.0915434 -0.341568 -0.631195 0.632101 -0.269815 0.275651 -0.664266 -0.368197 0.406838 -0.211638 -0.275276 1.05612 -0.123481 1.03837 0.730825 -0.421407 -0.511648 -0.529181 0.140062 -0.696752 -0.420884 -1.19425 0.487816 1.2546 -0.21005 1.03145 0.259143 0.133478 0.67717 0.93806 -0.355266 0.221194 1.18242 -0.00965924 -0.348827 0.198108 0.63438 -1.26296 0.0986357 -0.37862 1.05895 -0.818872 0.163492 0.220116 0.026387 -1.93189 0.932788 -0.852235 -1.9745 0.178085 0.575351 -0.556705 -0.033223 -1.15119 -0.384181 1.08118 -0.405445 -0.277529 0.206868 -0.444465 0.273967 0.829602 0.373622 -1.97769 1.34259 -0.0245023 0.229026 -0.0748496 -0.39287 -0.831119 -0.366826 0.18812 0.329272 0.339229 1.58485 0.389824 0.00857875 -1.53237 -0.66853 -1.14566 0.453949 0.508215 -0.0188067 -1.61491 0.419656 0.756411 0.53496 -0.0146868 -0.927026 -1.43414 0.795294 0.493776 -0.0670727 -0.147917 -0.371445 0.271083 -0.572294 -1.49838 0.0223168 -0.386609 0.0196396 1.11073 1.05631 -0.5264 -1.10486 0.0625717 -0.0250236 -0.237908 -0.733239 1.48557 -0.442298 1.27698 0.359897 1.10734 0.863255 -0.0609625 -0.539151 -0.143593 -0.769869 -0.380438 -0.842724 -0.0773251
0.23784 0.606313 1.25167 -0.0402526 -0.325013 0.850198 -0.0244731 -0.562689 -1.39599 -0.0617909 0.0372545 -0.350604 0.907153 -0.109725 -0.11045 -0.608005 -1.10055 0.649812 0.0957401 0.409573 -0.89419 -0.556307 -0.228327 -0.101172 -0.436684 -1.07489 -0.381436 1.4475 -0.0401022 -0.258183 1.11224 -0.949958 1.25835 -0.456522 -0.0841912 0.783178 0.316994 -0.0264784 0.19934 -1.06753 1.84894 0.870359 0.988275 -0.297538 0.613209 1.10568 -0.756657 0.143215 0.372821 -0.192527 -0.367706 0.463781 -1.60403 -0.131532 -1.21223 -0.578194 0.741309 -1.45369 0.631207 0.519971 -1.47572 -0.232739 -0.112907 0.276069 -0.0437894 0.543449 0.0715822 0.878294 0.164913 0.35705 -0.228792 -1.21178 0.547511 0.364499 1.04731 0.126596 1.01562 -0.362688 0.29907 -0.399349 -0.0486822 0.69985 -0.970489 0.947573 -0.310232 -0.570086 0.254822 0.82428 0.352177 0.0883209 0.146977 1.3365 -0.0564881 0.576259 0.19601 -1.19988 -0.235481 -0.189538 0.842953 -0.108615 -1.05756 0.558024 -0.84057 -0.723846 0.860474 0.187714 -0.739001 0.663685 0.360381 -0.159853 0.743921 0.824376 -1.03464 0.113115 0.997517 0.778675 -0.715446 0.292572 0.199634 -0.166372 -1.25994 0.675215 -0.516615 -0.841129 -0.240903 0.470101 0.143823 -0.860402 0.697842 -0.321098 0.408052 0.460978 -0.907746 0.476334 0.764925 0.154371 -0.252067 0.872266 1.38271 0.399597 0.627401 -0.358229 0.95212 0.269864 -0.263745 0.777163 0.73824 -0.383387 -0.733739 -0.136558 -0.382704 0.31329 -0.449536 0.133671 -0.627579 0.415392 -0.104883 -0.111726 -0.808054 0.427727 0.153962 -0.695264 0.138098 0.587942 0.906911 0.00205194 -1.47972 -0.375677 0.578561 -0.0498851 -0.643957 -0.614981 0.0318815 -0.327441 0.250441 0.249501 0.271643 0.459862 0.240884 1.1413 1.83366 0.806202 -1.36595 0.780409 0.0961681 1.16854 -0.496081 0.843385 0.157955 0.376235 1.26487 -0.584871 0.744861 0.21917 0.994858 -0.148371 0.291091 -0.435813 -0.347018 0.473882 0.875496 1.04345 -0.866382 -0.068144 0.443435 -0.0257156 0.625963 -1.08671 0.753916 0.119843 -1.37926 -0.585537 0.487616 -0.712512 -0.0662324 -0.244779 -0.311042 0.284912 -0.298868 0.503244 -0.0644 -0.608003 0.207097 -1.05146 -0.196082 -0.145628 1.24248 -0.0540482 -0.130233 0.367263 0.171497 -1.24684 0.802594 -0.586317 0.150122 -0.336912 -0.133213 0.385797 0.463244 -0.440151 0.781925 0.580556 -0.0153 -0.571269 -0.104564 -0.335573 -0.316344 0.374004 0.892459 -0.155584 0.230509 0.429871 -0.146306 0.162268 0.506931 0.295661 -0.494283 0.207502 1.42663 -1.32856 0.55038 -1.13167 -0.998409 -0.13458 0.58829 0.101926 0.169356 0.883132 0.805462 -0.276721 0.218903 0.547736 -0.046262 0.948598 0.964906 -0.109424 0.595087 0.779011 1.08537 0.553887 -0.289619 0.584594 0.164067 -0.31751 -0.236574 0.63316 0.587566 0.700144 -0.310287 -0.0366515 0.326666 0.594401 0.902434 -0.328639 -0.379189 1.35754 0.598884 0.922651 -0.27744 0.241734 0.504996 0.52381 -1.02289 -0.152041 -0.616344 0.293961 -0.182149 0.41997 1.26893 -1.24833 -0.700807 0.497368 1.1478 -1.00897 -0.625147 0.195193 -0.946754 1.07121 -0.470875 0.00550937 -0.677606 1.12408 0.137021 -0.172327 0.437269 0.343455 0.897716 0.321212 -0.963429 1.20278 0.543772 -0.133959 -0.0567357 1.0925 -0.303249 -0.402455 1.45762 1.01453 -1.79657 1.20961 -0.319573 0.290997 -0.468338 0.232725 -0.519009 0.740041 0.22004 -0.95416 -1.04528 0.146992 -0.635593 0.79172 0.279321 -0.420178 -0.474704 -0.399566 0.357408 0.55933 -1.3498 -0.466856 -0.274823 0.299731 -0.475783 1.22858 -0.542027 0.452968 0.786027 -0.320574 -0.534268 -0.192065 -1.44934 1.22358 0.853992 0.010904 -0.151348 -0.726425 -0.0423931 -0.692976 -0.306581 -0.264002 -0.369095 -0.064196 -0.61187 1.17016 0.577008 -0.173058 -1.727 1.05627 0.648913 0.978772 -0.378475 -1.50607 0.176989 0.488934 -0.293441 0.593799 0.62596 0.732142 0.221431 0.000188978 0.0327645 0.743219 0.712538 0.677488 -0.0716881 0.0807456 -0.515517 0.235119 -0.690372 1.39461 -0.198623 0.971886 -0.223325 0.0347196 0.595262 1.2667 -0.349469 0.298248 1.33349 0.586427 0.299238 0.848088 0.44656 0.577286 0.0181209 0.122325 -0.680601 -0.33185 0.76211 1.16641 0.596252 0.722312 -0.286745 -0.571285 -0.000571963 -1.07446 0.138813 0.330771 -0.738915 -0.863473 -0.177527 -0.856819 -0.0511844 -0.816071 -0.102978 0.940735 -0.617596 -0.683593 0.308856 -0.00682323 -0.382855 -0.417567 -0.586011 0.403744 2.07435 0.0383828 -0.481213 0.762966 -0.0766171 -0.822876 -2.12001 0.789373 -0.124245 0.00889314 0.360529 -0.959967 0.397856 -0.407774 -0.309132 -0.93919 -0.815676 0.0616372 -1.35423 -0.759631 -0.0968797 1.15313 0.600147 -0.448151 0.260096 -0.0389178 -0.310628 0.889562 -1.02891 0.390563 0.249644 0.180699 0.34293 0.548629 2.10218 1.12209 -0.386211 -0.287067 -0.621021 0.556699 0.580937 0.481465 1.01416 -0.718093 -0.573956 -0.678461 -0.0668909 -0.47627 0.514694 -0.982346 1.58381 -0.339648 0.92664 0.806758 0.295324 -0.133909 0.67797 -0.149084 0.502093 0.216654 1.02263 -1.0402 -0.541741 0.454473 -0.278453 0.389236 0.597661 0.531911 0.166621 0.858967 0.341318 -0.688956 -0.783955 1.53979 0.659392 -0.176249 -0.154359 0.944832 0.417222 -0.329132 0.636924 0.92966 -0.432146 1.45275 0.478043 0.271037 -1.52448 -1.18397 1.00212 -0.704601 -0.336778 -0.405351 -0.321398 0.393864 -0.302331 0.390108 0.37284 -0.759007 -0.768011 0.447783 0.499062 -0.628235 0.842455 -0.0395929 -0.0300782 -1.12087 -1.13415 0.91877 0.0874343 -1.64084 -0.872871 -0.132635 0.129311 0.589834 0.238411 -0.229098 -0.312529 -0.0534083 -1.56642 0.462026 -0.0373607 0.37742 0.734244 0.43039 -0.0734706 0.6834 0.775809 -0.759873 0.00269772 -0.325059 0.398354 -0.428332 0.826185 -1.03323 -1.14797 -1.18048 -0.558843 -0.432414 0.619499 1.26341 -1.38973 -0.673112 0.60513 -0.234243 -0.0256499 0.431029 0.203703 0.256545 0.0143663 0.707122 -0.0514557 -0.166398 0.00115608 -0.588027 0.221265 0.684355 -0.201554 1.13497 0.216517 -0.0489988 -0.674082 1.16736 0.214985 -0.301439 0.192951 -0.753533 -1.41021 -0.739345 -0.976865 1.00972 0.902767 0.669838 0.00200147 -0.0614716 -0.276168 -0.285984 -0.104345 0.475054 -1.09734 -0.118034 0.654614 -0.640723 0.018005 0.593765 0.422899 1.00716 -0.756407 -0.656976 -0.0796512 0.543284 0.0885841 0.509874 0.148042 -0.188449 -0.114819 0.952168 -0.439012 -0.026103 -0.836346 -0.171744 0.726972 0.249713 -0.162643 0.0672566 0.154107 -0.153 0.691931 0.764752 -0.382457 0.554508 -0.26495 0.935324 0.067674 -0.320585 0.506567 -1.13698 -0.237146 0.956221 0.189402 0.757451 -0.572412 0.0278561 -0.0422827 -1.03467 0.271937 0.422769 1.69062 -0.338862 -0.708763 -0.557366 0.266788 0.156151 -1.05821 1.7409 -0.0837888 -0.118307 0.597113 0.00941529 0.506361 0.940162 -0.214443 -0.00904465 -0.528929 0.0727392 0.646833 0.0840997 -0.999078 -0.366274 1.65712 0.108134 0.480935 -0.482229 0.16952 -0.459137 0.0933176 0.392965 -0.248188 -1.08265 0.312152 0.833021 0.149066 0.219241 -0.0128651 0.328976 -1.34669 -1.43181 -0.181087 -0.0806432 -1.46662 -0.846621 -0.240791 0.401637 0.0250736 0.556731 -0.431144 0.35414 0.0259925 -0.245246 0.49623 0.0586159 2.08255 -0.332979 1.42337 0.518098 0.512673 0.833721 -1.35086 -0.0175139 0.0952826 0.613579 0.605392 1.18445 -0.140146 -0.374556 -0.933113 0.235431 0.504994 -0.349757 0.181872 0.411181 -0.00373055 -0.514559 0.119895 0.930936 -0.985858 1.03977 0.170387 -0.95834 0.206506 -1.36858 -0.102734 0.107577 -1.03423 -0.981849 0.12188 0.718034 -0.362127 0.425905 0.0938613 0.223104 0.216369 0.743036 -0.200152 0.0462493 0.4132 -0.380237 -0.166745 -0.0710774 -0.50982 0.142646 0.283195 -0.688277 -0.106275 -0.0317974 0.132231 0.785754 -0.327573 -0.423477 -0.947274 0.343268 0.369939 0.988987 -0.149938 -0.649641 -0.431352 0.054536 -0.957109 0.627072 1.23271 -0.660617 1.01159 0.355789 1.33411 -0.040373 -0.084068 -0.164475 -0.517227 -0.869142 0.864904 0.036633 0.782147 0.581127 0.611045 -0.342083 0.390349 0.335266 0.379869 -0.481546 -0.00585875 -0.287193 -0.787003 0.52015 0.528754 0.398317 -1.56577 0.810935 -0.355046 -0.0163545 -0.189892 -2.6064 0.487677 -0.0992055 0.26823 -0.283054 -1.28512 -0.382381 0.105817 0.209251 0.0988516 0.867074 -0.484841 -0.564525 0.58903 -0.434435 0.253749 -0.195118 -1.01023 0.640758 0.218661 -0.486854 -1.06383 0.335991 -0.38954 0.0582647 -0.457746 -0.0760327 -0.221772 0.239737 -0.188185 -1.34965 -1.37371 1.15913 0.657837 -0.109949 0.284189 0.343449 -0.808569 -1.16604 0.69686 -0.219253 0.165954 1.07071 -0.567384 -0.0918434 -1.32338 -0.564365 -1.21549 1.00857 0.134839 -0.490422 1.3208 0.682184 0.0179512 -0.419392 -0.460257 0.753444 -0.074183 0.268216 -0.135437 0.546259 -1.04669 -0.72945 -0.437209 0.341736 0.702405 -0.670945 0.620584 0.73492 1.16943 0.313914 -0.0461971 0.660932 -0.182912 1.69439 0.664762 -0.405762 0.160491 0.169154 1.01452 1.09375 0.424283 -0.0141059 -0.617031 0.432785 0.1456 0.0958517 -1.533 0.666432 0.0634871 0.0873322 0.632256 0.25089 -0.0805056 0.155431 0.244849 -0.352187 -0.3706 -0.971998 0.830415 1.43933 -0.966252 0.450729 -0.397543 1.2994 -0.549245 0.732954 0.273045 1.50012 -0.450335 -0.51325 -1.81667 0.486817 0.215021 -0.674141 0.303189 1.62441 -0.7962 0.155519 -0.730885 1.04216 -0.302499 0.0380048 -1.94631 0.930407 -1.11144 1.24193 -0.892699 -0.678068 0.354751 -0.223747 -0.877258 -0.386851 -0.319887 0.0825584 0.125402 0.320857 -0.395124 0.795486 0.194032 -0.455554 -0.201452 -0.994493 0.131791 -1.10062 -0.539933 0.517697 -1.03481 -0.50423 -0.0773646 -1.17827 -0.780325 0.577015 0.818868 -0.438927 -0.0156699 0.265336 -0.255041 0.751678 1.09236 -0.457381 -0.514165 -0.0440275 -0.221997 0.136214 0.538496 -0.560384 -0.123626 -1.0158 -0.468265 -0.023066 0.324631 1.55463 -0.0147595 0.106656 0.581733 1.01065 0.257626 0.0944913 -0.44792 1.08134 -0.578625 -0.743639 0.118113 1.41656 -0.123697 0.88091 0.464013 -1.06837 0.440794 -0.00694833 -0.672243 -0.136872 -0.474334 0.554438 0.258916 1.53537 -0.459454 0.603254 -0.382895 -0.013013 -0.571199 -0.927886 0.629525 1.59602 -0.0905189 0.292618 0.785413 -0.345002 0.114209 -0.588657 -0.0796593 -0.394674 -0.178712 -0.498971 -0.823945 -0.863897 0.0854638 1.10572 0.707018 -0.460721 -0.642824 0.701357 1.02106 0.718905 0.208299 -0.0698571 -0.867599 -0.618541 0.651997 0.504843 0.260348 -0.139163 0.217454 0.202657 0.437443 -1.32399 -0.287469 0.987226 0.486162 -1.22059 -0.0511916 0.0571337 0.500766 -1.66255 -0.597305 0.0417141 -0.685425 0.713482 0.705171 -0.957978 -0.0106013 -1.73734 -0.653806 -0.494395 1.09927 -0.0909929 -0.199415 -0.0618495 -0.0883785 0.0738439 -0.320876 0.370659 0.870736 0.280596 1.90601 0.680379 -0.780035 0.384473 -0.583461 -0.220972 -0.297365 0.836699 0.0255712 0.803458 -0.169873 -0.341694 0.419012 0.100061 -0.560019 -0.894765 0.367888 0.0538563 -0.914249 0.976393 0.280406 -0.187753 1.21671 -0.930561 -0.325138 -0.118403 0.513975 -1.2422 -0.971294 -0.0243712 0.97839 -0.711952 0.679092 -0.968897 -0.3898 -0.246102 1.08211 0.109865 -1.4208 -0.502242 -0.345421 1.04037 1.20324 -0.73967 0.584372 0.0803295 0.168099 0.019605 1.31959 1.05573 -0.283055 0.619609 0.0447457 -0.359119 0.284688 0.827407 -0.0830988 0.339756 0.114235 0.43906 1.03268 0.536584 -0.755883 1.19508 0.683813 -0.556227 0.511523 -0.730915 0.464852 0.552135 -1.32152 -0.20521 -0.0840213 1.01399 -0.0375475 0.453513 -0.886271 0.729727 -0.549173 -0.17483 1.23483 -0.196949 -0.310713 0.754218 0.633898 -0.155751 0.152427 -1.10957 0.0774242 0.535446 -0.256483 -0.662353 -0.581924 0.236553 1.41363 -1.00687 0.876905 0.933799 0.734567 0.960449 0.37468 1.02427 -1.12629 0.768705 1.20676 -0.428675 -0.370998 0.651616 0.18608 0.0353388 0.650459 -0.664999 0.492502 -0.599401 -0.582997 0.130286 -0.946322 -1.02762 -0.827036 -0.447142 -0.0182208 -1.38507 0.0424984 -0.236649 -0.865536 0.517658 0.0977675 0.551375 0.246321 -1.32761 0.450431 0.505344 0.404826 0.595088 -0.502054 0.319443 -0.538004 1.38088 -1.1598 0.359296 0.519672 1.33996 -1.07077 -0.510382 -0.522628 0.0733744 -0.31453 -0.237164 -0.111434 -0.240019 -0.307717 1.07504 -1.50025 -0.543705 -0.0021617 -0.0878822 -0.761841 -1.22824 -1.26396 1.68808 0.991922 0.616745 -1.66188 0.340136 0.153816 -1.02733 0.152376 0.0732724 -1.77148 -0.150169 -1.00686 -0.618833 -1.27558 0.992614 0.186817 -1.72836 0.0360493 -0.759858 -0.666444 0.547894 0.03257 0.796991 0.224071 -1.5953 -0.293942 0.711182 0.50095 -0.225545 -0.43821 1.60221 -0.239669 -0.0220197 0.695313 1.11147 0.54404 0.255783 -1.07308 -0.308693 0.492953 0.491916 0.657384 -0.517895 0.838893 -1.16458 0.557903 0.398075 -0.184215 -0.481312 -1.62257 -0.45155 1.42524 -0.895575 0.615552 0.339524 0.0594052 0.619174 0.00723825 -0.0768816 -0.102838 -0.553454 0.80793 0.414655 0.423058 0.382891 -1.12787 0.420927 -0.976725 0.185129 0.439951 -0.546297 -0.377144 -0.478626 -0.362253 0.204765 -0.530172 0.410541 -0.0306878 -0.241072 -0.260957 -0.329477 0.145059 -0.115197 -0.665369 0.677671 1.39626 -0.147692 -0.6997 0.418201 0.504096 0.67231 0.251995 -1.16721 1.27177 0.167464 -0.169079 0.722711 0.181504 0.402806 1.3695 -0.239681 -0.677005 -0.0641385 -0.42199 -0.224345 -0.623663 -0.868839 -0.0517598 -0.451462 0.236916 0.279734 0.4204 0.889892 0.209878 -0.764522 0.486058 -0.392057 0.630701 -0.452464 -0.989783 1.27567 -2.06619 -0.443889 -0.0592209 -0.254394 0.233253 0.0731695 -0.53992 0.77502 -0.286706 0.00461931 -0.824441 0.210897 1.38276 0.279971 -0.757092 0.429366 0.539705 1.05127 0.593331 -1.24297 -0.303481 -0.0594897 -0.296912 0.313784 0.846377 0.28039 -0.208455 1.0701 -0.16812 0.462439 1.10157 -0.0373862 -0.421634 -1.06241 0.910641 0.652948 -0.546 0.113505 0.677756 -0.256267 0.0302266 -1.49561 0.475526 -0.0472128 0.259642 0.307288 0.0281264 0.330557 -0.382107 0.124072 0.0923385 0.0876755 0.959215 0.270802 -0.482086 -0.613648 0.483472 0.0154102 0.17301 0.05388 0.585054 -1.28303 0.815282 0.763152 -0.709042 0.577406 -0.360585 -1.36173 -1.47961 0.880526 0.60163 0.0780455 -0.229903 -1.23964 -0.27688 0.952751 -1.04157 -0.424243 0.31949 0.714215 0.714672 -0.868384 -1.6776 -0.487466 -0.421059 1.07001 -0.330409 0.765639 0.795584 -0.168892 0.386549 0.553108 -0.505062 -0.680275 -0.199253 0.168908 0.493576 -0.613581 -0.31831 0.881552 -0.24077 0.763159 0.128351 -0.584185 1.14364 -0.112416 -0.132108 0.0878465 1.28985 -0.0241726 -1.5765 0.445784 0.0344454 0.785164 0.262269 -1.10726 1.2488 1.23575 -0.814496 1.05005 0.69962 0.188617 0.067925 0.781028 -0.186852 0.712492 -0.308209 -1.14101 -0.826951 -0.252519 0.661761 0.826259 -0.542437 -0.0939336 -0.387032 0.0502815 -1.20643 0.698572 0.139249 0.694983 0.0396946 0.866187 0.580354 -1.50077 0.270688 0.596573 0.184468 -0.0979968 1.52962 0.188452 -0.217777 -0.385153 -0.518402 -0.929289 1.51542 0.281427 0.817813 0.110595 1.05244 -0.482391 -0.0553117 -0.879274 0.545011 0.302941 -0.156041 0.507415 0.588357 0.228806 -0.262329 -0.118489 -0.571661 -0.259148 -0.860758 0.83922 -0.303642 0.624536 0.400849 1.78761 -0.0332704 0.791154 0.415595 -0.214865 1.3837 0.321648 0.423983 -0.435445 0.265425 0.951024 0.716266 -1.42427 0.298474 0.856387 -0.616178 -0.135238 0.452378 0.187795 0.613769 1.11221 -1.64041 -0.54037 -0.397351 -0.846205 0.0917571 -0.523332 -0.474502 -0.0437819 -0.146487 1.14227 0.205392 1.07825 -1.18482 -1.74753 1.33509 1.23867 0.0548437 -0.31477 0.886857 1.27192 0.383246 0.349078 -0.461045 0.468169 -1.00294 0.817738 -0.844416 -1.17148 -0.790788 0.925327 -0.181696 -0.0898668 -0.204061 -0.534439 0.933799 -1.10332 -0.145719 0.21345 -0.16362 -0.227642 -0.931215 -0.0759524 0.689215 0.166464 -2.09627 -0.574784 -0.276086 -0.586395 1.44397 0.252186 -1.0434 1.31668 -0.142809 -1.74578 1.01735 -0.400957 -0.844925 0.247287 -0.271608 0.136565 0.0294838 0.569623 -0.315341 1.57153 -0.240816 -0.07225 -0.274814 -0.723199 -0.624076 -0.904005 0.033345 -0.13067 -0.196672 0.602364 0.792041 0.477313 1.07072 0.219656 -1.13117 0.582092 0.0715921 -1.03168 0.0591621 0.484005 -0.468385 1.15787 0.143866 -0.469922 0.905891 -0.0469551 -0.316752 -0.0386451 -0.90528 0.983074 0.83147 0.382556 -0.48765 0.302511 -0.812445 -0.315592 0.443981 -0.426728 0.230086 -0.294672 -0.60126 0.0325605 -0.569007 -0.102246 -0.33494 2.01803 0.509913 1.71805 0.477265 0.362142 0.715407 -0.993717 -0.13012 0.561191 0.917963 -0.141506 0.410044 -0.172964 -0.833722 0.0893059 -0.130498 -0.0887662 -0.449999 -0.493849 -0.0878648 -0.181256 -0.098445 -0.407792 -0.481421 -0.709457 -0.554754 0.472864 0.742317 -0.410897 0.334754 -0.0276868 -1.21781 -0.335847 -1.37439 -1.16155 -1.3328 0.48695 0.220221 -0.954245 0.747584 0.386857 0.842649 -0.675091 -0.230403 0.485398 0.593854 0.648804 0.956436 1.61309 -1.32163 -1.00443 0.0998114 -0.0175493 0.874338 -1.28771 -1.33415 -0.681824 -0.660853 -0.100648 -0.771092 -0.921768 0.71366 -0.0288727 0.813483 -0.279353 0.78475 -2.15199 0.334692 -0.645708 1.00385 0.720685 0.49255 -0.40543 0.648431 0.767235 -1.22916 -1.8055 -0.2425 1.17912 -1.08287 0.252645 0.369297 1.37559 0.270261 -0.411268 0.713144 0.427706 -0.411252 -0.655221 0.284024 -0.266924 -1.50026 0.475159 0.0470383 0.667162 -1.24482 0.700016 -0.14736 -0.078992 -0.360064 -1.88908 -0.848554 0.869587 0.13919 -0.913544 -0.430688 0.819858 0.875671 1.29539 1.34492 0.357806 0.858148 0.439528 -0.707301 0.038441 -0.0808991 -1.11432 0.336785 -0.540219 0.657109 0.524335 0.233331 -1.83098 -0.533197 -0.00290084 -1.1638 -0.0390512 -0.0169098 -0.357234 -0.594331 0.449582 0.567669 1.25358 -0.00371695 -0.578896 -1.12788 0.625694 -0.53378 -0.878971 -0.575773 0.476922 0.157452 -1.06695 -0.00353785 -0.24058 0.0464918 2.00213 -1.45193 -0.686253 0.531778 0.216896 -1.05006 -0.328447 -0.535021 -0.729731 -0.297809 0.13078 0.666878 -0.129055 0.893588 1.04693 0.0700989 0.972665 0.649616 0.106239 -0.240306 -0.390755 -1.22679 1.18606 -0.78498 0.145456 1.76766 -0.368978 -1.22183 -0.146388 1.00116 -0.492209 0.756478 -0.1015 -0.186307 0.721953 1.83877 -0.256554 0.396794 0.352806 -0.566134 0.827415 -0.60056 -0.217939 -0.0880702 0.634327 -1.09065 -0.237541 -0.189394 -0.663287 -0.85125 1.06456 0.278912 -0.548191 0.396372 -0.582723 0.358211 -0.35681 0.108814 1.76237 1.2731 0.77777 1.22305 -0.675976 -0.480261 -0.950326 1.58146 -0.368146 -0.955712 0.647563 0.19202 -0.709607 -0.229155 -0.690224 0.539842 0.218333 0.488263 0.0871875 0.403921 0.117933 0.380147 -0.930057 -1.26344 -0.715579 0.347144 -0.599871 -0.836324 0.0297036 -0.141569 -0.0239847 1.11517 1.1763 -0.916712 0.803621 -0.666479 -1.27141 0.267653 -0.35455 -0.141442 -0.0986908 1.04231 -0.65616 -0.160172 -0.180801 0.358204 0.939926 0.285033 0.757469 1.12755 -0.285738 -0.0715628 -0.560402 -0.321111 -0.624783 -0.490207 -0.514552 0.738599 0.856103 -1.38008 -0.895799 0.0909343 -0.749775 -0.788157 0.00708113 0.379352 0.129957 1.08925 -0.536367 -0.228233 0.170621 -0.379167 -0.322774 0.442333 0.0794695 -1.3345 0.415276 0.11618 -0.416985 0.843182 -0.874427 -0.0554012 0.838799 -0.91732 -1.80172 0.534427 -0.163057 -0.740279 0.774217 0.464063 0.0124657 0.0685377 0.848801 0.489442 -0.911286 0.402782 -0.904241 -1.65634 -1.14574 0.74817 1.10305 0.622117 0.179173 0.0624116 -0.837605 0.627186 -1.24062 0.84407 -0.0240829 1.57262 1.59174 1.71562 0.650207 1.0109 -0.664347 0.439505 -0.455389 0.351698 1.0701 -0.208865 -0.396796 0.977232 -0.0266855 0.0802914 -0.864143 0.352436 -0.282479 0.540798 0.742563 -0.737377 0.250397 0.0383804 -0.325945 0.258049 1.02882 1.05512 1.28992 0.0505523 -2.16987 1.06334 1.88768 0.132003 0.101459 0.945535 1.40706 1.0621 1.02243 -0.073851 -0.59681 -0.722054 -0.520462 1.35612 0.65568 -0.717069 -0.218095 -0.359068 1.44359 0.497135 -1.22533Visualize conditionally normalized state.
X = prior_state
Y = prior_obs
X = reshape(X, (1, 1, size(X, 1), size(X, 2)))
Y = reshape(Y, (1, 1, size(Y, 1), size(Y, 2)))
Z = normalize_samples(
filter.network_device,
X,
Y,
size(X);
device=filter.device,
num_samples=N,
batch_size=filter.training_config.batch_size,
)
Z = Z[1, 1, :, :]
table_Z = to_table(Z; prefix=:z)
@static if VERSION >= v"1.10"
table_Z_mean = to_table(mean(Z; dims=2)[:, 1]; prefix=:z)
fig = pairplot(
table_Z => (
PairPlots.Hist(; colormap=:Blues),
PairPlots.MarginDensity(;
bandwidth=kde_bandwidth, color=RGBf((49, 130, 189) ./ 255...)
),
PairPlots.TrendLine(; color=:red),
PairPlots.Correlation(),
PairPlots.Scatter(),
),
PairPlots.Truth(
table_Z_mean; label="Mean Values", color=(:black, 0.5), linewidth=4
),
)
supertitle = Label(fig[0, :], "latent state"; fontsize=30)
resize_to_layout!(fig)
display_interactive(fig)
endLook at prior mean.
display_interactive(mean(prior_state; dims=2))2×1 Matrix{Float64}:
6.429318882839041e-17
2.168404344971009e-18Look at prior covariance.
display_interactive(cov(prior_state; dims=2))2×2 Matrix{Float64}:
1.0 -0.00306359
-0.00306359 1.0Look at latent mean.
display_interactive(mean(Z; dims=2))2×1 Matrix{Float32}:
-0.0141018275
-0.009051329Look at latent covariance.
display_interactive(cov(Z; dims=2))2×2 Matrix{Float32}:
0.9829 -0.0229044
-0.0229044 1.04116Look at posterior mean.
display_interactive(mean(posterior; dims=2))2×1 Matrix{Float32}:
0.002552625
0.03136942Look at posterior covariance.
display_interactive(cov(posterior; dims=2))2×2 Matrix{Float32}:
0.621413 -0.0111148
-0.0111148 0.513831Visualize posterior.
table_posterior = to_table(posterior)
@static if VERSION >= v"1.10"
table_posterior_mean = to_table(mean(posterior; dims=2)[:, 1])
fig = pairplot(
table_posterior => (
PairPlots.Hist(; colormap=:Blues),
PairPlots.MarginDensity(;
bandwidth=kde_bandwidth, color=RGBf((49, 130, 189) ./ 255...)
),
PairPlots.TrendLine(; color=:red),
PairPlots.Correlation(),
PairPlots.Scatter(),
),
PairPlots.Truth(
table_posterior_mean; label="Mean Values", color=(:black, 0.5), linewidth=4
),
)
supertitle = Label(fig[0, :], "posterior state"; fontsize=30)
resize_to_layout!(fig)
display_interactive(fig)
endThe posterior should have mean 0 and some TBD variance.
X = reshape(prior_state, (1, 1, size(prior_state, 1), size(prior_state, 2)))
Y = reshape(prior_obs, (1, 1, size(prior_obs, 1), size(prior_obs, 2)))
y_obs_r = reshape(y_obs, (1, 1, size(y_obs, 1), size(y_obs, 2)))
fresh_samples = draw_posterior_samples(
filter.network_device,
y_obs_r,
size(X);
device=filter.device,
num_samples=32,
batch_size=filter.training_config.batch_size,
log_data=nothing,
)[
1, 1, :, :,
]
@test true;Plot some training metrics.
common_kwargs = (; linewidth=3)
fig = Figure()
ax = Axis(fig[1, 1])
misfit_train = log_data[:network_training][:training][:loss]
misfit_test = log_data[:network_training][:testing][:loss]
# The training metrics are recorded for each batch, but test metrics are computed each
# epoch.
num_batches = length(misfit_train)
num_epochs = length(misfit_test)
batches_per_epochs = div(num_batches, num_epochs)
test_epochs = 1:num_epochs
train_epochs = (1:num_batches) ./ batches_per_epochs
lines_train = lines!(ax, train_epochs, misfit_train; label="train", common_kwargs...)
lines_test = lines!(ax, test_epochs, misfit_test; label="test", common_kwargs...)
ax.xlabel = "epoch number"
ax.ylabel = "loss: 2-norm"
fig[1, end + 1] = Legend(fig, ax; labelsize=14, unique=true)
N_train = round(Int, N * training_config.validation_perc)
N_valid = N - N_train
ax.title = "Training: $N_train, Validation: $N_valid, Batch size: $(training_config.batch_size)"
ax = Axis(fig[2, 1])
x = log_data[:network_training][:training][:logdet]
lines!(ax, train_epochs, x; color=lines_train.color, common_kwargs...)
x = log_data[:network_training][:testing][:logdet]
lines!(ax, test_epochs, x; color=lines_test.color, common_kwargs...)
ax.xlabel = "epoch number"
ax.ylabel = "loss: log determinant"
supertitle = Label(fig[0, :], "Training log"; fontsize=30)
resize_to_layout!(fig)
display_interactive(fig)This page was generated using Literate.jl.