Closed WPringle closed 2 years ago
I have not looked into UQTk, instead I am looking at how to implement examples from chaospy
(https://chaospy.readthedocs.io/en/master/user_guide/quick_tutorial.html). I figure we can formalize the distributions of each variable and then use chaospy
to perform UQ? I'm still reading up on it.
@zacharyburnettNOAA Cool, yeah I can ask Khachik more about how to use UQTk on Wednesday. Thanks for looking into chaospy too. I was finally able to compile UQTk on another machine. It was very finicky for what versions of compilers and other things to use.
@WPringle I'm still a bit confused on the whole structure of the UQ, would you mind if we had a video chat about it when you have the time?
@zacharyburnettNOAA Me too :) I think that's what we want to find out more from Khachik. But I can chat now if you are free. I'll be a bit busy rest of the day.
@WPringle sorry, just saw this. Are you still free? If not, then that is fine. I'll be here if you want to drop in: https://meet.google.com/std-vovd-vca
I followed the chaospy
examples to make a script that works on our 4 variables:
import chaospy
from matplotlib import pyplot
import numpy
from ensembleperturbation.perturbation.atcf import \
PerturbationType, VortexPerturbedVariable
if __name__ == '__main__':
distributions = {}
for perturbed_variable in VortexPerturbedVariable.__subclasses__():
name = perturbed_variable.name
perturbation = perturbed_variable.perturbation_type
if perturbation == PerturbationType.GAUSSIAN:
distributions[name] = chaospy.Normal(0, 1)
elif perturbation == PerturbationType.UNIFORM:
distributions[name] = chaospy.Uniform(-1, 1)
joint_distribution = chaospy.J(*distributions.values())
grid = numpy.mgrid[-2:2:100j, -1:1:100j]
pyplot.contourf(grid[0], grid[1], joint_distribution.pdf(grid), 100)
pyplot.scatter(*joint_distribution.sample(100, rule="sobol"))
pyplot.show()
print('done')
Ok I have another meeting in a few minutes, I'll try again if there is some free time later this afternoon and see if you're on.
Oh that's interesting, so the x axis is the gaussian and the y axis the uniform parameters? I think is the type of thing we want for choosing the parameter space effectively.
made new pull request #59
@WPringle I put Khachik's example scripts onto the feature/chaospy
branch (3aa1d62), I'm looking through the functions. Additionally, I'm also spinning up some runs with NWS=8 (checking for that this time) so that should have some more variability in Rmax
@zacharyburnettNOAA Cool thanks~
@zacharyburnettNOAA Wondering if you were able to get the UQTk package compiled before?
I keep getting linkage problem to lapack/blas:
Just wondering if you were successful and encountered any issues?