diff --git a/CHANGELOG.md b/CHANGELOG.md index 47a207c4f9c51fe97700b83a711c40e17581a9db..26f0e8b84520743c2dd84d24bad37e33e66e2f46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +v1.0.0 +------ +* Removed the `simulator/ravaflow24` module. + +* Replaced deprecated `scipy.interpolate.interp2d` with `scipy.interpolate.RegularGridInterpolator` to maintain compatibility with newer versions of SciPy. + +* Added citation information to the README. + +* Added repeated k-fold validation for `emulator/robustgasp` module. + v0.2.1 ------ * Set R_HOME automatically for conda environment to ensure seamless installation. diff --git a/docs/source/_build/html/.buildinfo b/docs/source/_build/html/.buildinfo index d675874cbdd48dacee0caa6e36af7a14806a9066..0a18d44599e1a93b2d16688b2ae8d69212b3c3da 100644 --- a/docs/source/_build/html/.buildinfo +++ b/docs/source/_build/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 9b954c6b6aa24d57cc63cce736384000 +config: 2b3fc487307e1c52bb522fa4713f5ca7 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/source/_build/html/.doctrees/changelog.doctree b/docs/source/_build/html/.doctrees/changelog.doctree index 51352fbd09747dbcc5e6c5ce01f9f1de23faa8b2..2d0925187eb5c99dfefc48947f4f296df615e363 100644 Binary files a/docs/source/_build/html/.doctrees/changelog.doctree and b/docs/source/_build/html/.doctrees/changelog.doctree differ diff --git a/docs/source/_build/html/.doctrees/emulator/robustgasp.doctree b/docs/source/_build/html/.doctrees/emulator/robustgasp.doctree index 8e8238f035110cc19c1d2f7bde806b87aac10057..7bc3460a8a37516ad14f4635c6cf3e832d1178d6 100644 Binary files a/docs/source/_build/html/.doctrees/emulator/robustgasp.doctree and b/docs/source/_build/html/.doctrees/emulator/robustgasp.doctree differ diff --git a/docs/source/_build/html/.doctrees/environment.pickle b/docs/source/_build/html/.doctrees/environment.pickle index 7426d03d2b1b439573ffd33523788c5bc0d3f07b..d0eefeec6e9f39e9c5a04c4d7dd15efad448393d 100644 Binary files a/docs/source/_build/html/.doctrees/environment.pickle and b/docs/source/_build/html/.doctrees/environment.pickle differ diff --git a/docs/source/_build/html/.doctrees/index.doctree b/docs/source/_build/html/.doctrees/index.doctree index f1675e9a8f10b9964b7f4ff603807cd9fa8b828a..413357e2662092150d2120b2160225fd68838b59 100644 Binary files a/docs/source/_build/html/.doctrees/index.doctree and b/docs/source/_build/html/.doctrees/index.doctree differ diff --git a/docs/source/_build/html/_modules/index.html b/docs/source/_build/html/_modules/index.html index d0368cb7da1a14c1edd7466b306e4ad55db3ef49..86bb9903727bf3ad90660cdc2170f7b1446fac96 100644 --- a/docs/source/_build/html/_modules/index.html +++ b/docs/source/_build/html/_modules/index.html @@ -99,7 +99,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/_modules/psimpy/emulator/robustgasp.html b/docs/source/_build/html/_modules/psimpy/emulator/robustgasp.html index 8c4bfdaec7a26020a120f361f936f92e041304b4..b17a4b33c00dd00dd77ab6c663345130b33cfa55 100644 --- a/docs/source/_build/html/_modules/psimpy/emulator/robustgasp.html +++ b/docs/source/_build/html/_modules/psimpy/emulator/robustgasp.html @@ -15,12 +15,11 @@ <script src="../../../_static/js/html5shiv.min.js"></script> <![endif]--> - <script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script> - <script src="../../../_static/jquery.js"></script> - <script src="../../../_static/underscore.js"></script> - <script src="../../../_static/_sphinx_javascript_frameworks_compat.js"></script> - <script src="../../../_static/doctools.js"></script> - <script src="../../../_static/sphinx_highlight.js"></script> + <script src="../../../_static/jquery.js?v=5d32c60e"></script> + <script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script> + <script src="../../../_static/documentation_options.js?v=37f418d5"></script> + <script src="../../../_static/doctools.js?v=888ff710"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> <script src="../../../_static/js/theme.js"></script> <link rel="index" title="Index" href="../../../genindex.html" /> <link rel="search" title="Search" href="../../../search.html" /> @@ -31,14 +30,18 @@ <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search" > - <a href="../../../index.html" class="icon icon-home"> psimpy + + + + <a href="../../../index.html" class="icon icon-home"> + psimpy </a> <div class="version"> - 0.1.2 + 0.2.1 </div> <div role="search"> <form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get"> - <input type="text" name="q" placeholder="Search docs" /> + <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> @@ -66,7 +69,7 @@ <div class="rst-content"> <div role="navigation" aria-label="Page navigation"> <ul class="wy-breadcrumbs"> - <li><a href="../../../index.html" class="icon icon-home"></a></li> + <li><a href="../../../index.html" class="icon icon-home" aria-label="Home"></a></li> <li class="breadcrumb-item"><a href="../../index.html">Module code</a></li> <li class="breadcrumb-item active">psimpy.emulator.robustgasp</li> <li class="wy-breadcrumbs-aside"> @@ -78,46 +81,68 @@ <div itemprop="articleBody"> <h1>Source code for psimpy.emulator.robustgasp</h1><div class="highlight"><pre> -<span></span><span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span> +<span></span><span class="kn">import</span> <span class="nn">os</span> + +<span class="k">if</span> <span class="s2">"CONDA_PREFIX"</span> <span class="ow">in</span> <span class="n">os</span><span class="o">.</span><span class="n">environ</span> <span class="ow">and</span> <span class="s2">"R_HOME"</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="p">:</span> + <span class="c1"># if a conda environment is active and the R_HOME variable was not set</span> + <span class="n">R_home</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="p">[</span><span class="s2">"CONDA_PREFIX"</span><span class="p">]</span> <span class="o">+</span> <span class="s1">'/lib/R'</span> + <span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">R_home</span><span class="p">):</span> + <span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="p">[</span><span class="s1">'R_HOME'</span><span class="p">]</span> <span class="o">=</span> <span class="n">R_home</span> + +<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span> <span class="kn">from</span> <span class="nn">rpy2.robjects.packages</span> <span class="kn">import</span> <span class="n">importr</span> <span class="kn">import</span> <span class="nn">rpy2.robjects.numpy2ri</span> <span class="kn">from</span> <span class="nn">rpy2.rinterface</span> <span class="kn">import</span> <span class="n">NA</span> <span class="kn">from</span> <span class="nn">rpy2.rinterface_lib.sexp</span> <span class="kn">import</span> <span class="n">NALogicalType</span> <span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Union</span> <span class="kn">from</span> <span class="nn">beartype</span> <span class="kn">import</span> <span class="n">beartype</span> +<span class="kn">from</span> <span class="nn">sklearn.model_selection</span> <span class="kn">import</span> <span class="n">RepeatedKFold</span> +<span class="kn">from</span> <span class="nn">contextlib</span> <span class="kn">import</span> <span class="n">nullcontext</span><span class="p">,</span> <span class="n">contextmanager</span> +<span class="kn">from</span> <span class="nn">sklearn.metrics</span> <span class="kn">import</span> <span class="n">mean_absolute_percentage_error</span><span class="p">,</span> <span class="n">r2_score</span><span class="p">,</span> <span class="n">root_mean_squared_error</span> +<span class="kn">import</span> <span class="nn">io</span> +<span class="kn">import</span> <span class="nn">sys</span> <span class="n">rpy2</span><span class="o">.</span><span class="n">robjects</span><span class="o">.</span><span class="n">numpy2ri</span><span class="o">.</span><span class="n">activate</span><span class="p">()</span> -<span class="n">RobustGaSP</span> <span class="o">=</span> <span class="n">importr</span><span class="p">(</span><span class="s1">'RobustGaSP'</span><span class="p">)</span> +<span class="n">RobustGaSP</span> <span class="o">=</span> <span class="n">importr</span><span class="p">(</span><span class="s2">"RobustGaSP"</span><span class="p">)</span> <span class="c1"># fetch @</span> <span class="n">r_base</span> <span class="o">=</span> <span class="n">importr</span><span class="p">(</span><span class="s2">"base"</span><span class="p">)</span> <span class="n">r_at</span> <span class="o">=</span> <span class="n">r_base</span><span class="o">.</span><span class="vm">__dict__</span><span class="p">[</span><span class="s2">"@"</span><span class="p">]</span> -<span class="k">class</span> <span class="nc">RobustGaSPBase</span><span class="p">:</span> +<span class="k">class</span> <span class="nc">RobustGaSPBase</span><span class="p">:</span> <span class="nd">@beartype</span> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span> - <span class="bp">self</span><span class="p">,</span> <span class="n">ndim</span><span class="p">:</span> <span class="nb">int</span><span class="p">,</span> <span class="n">zero_mean</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s1">'No'</span><span class="p">,</span> <span class="n">nugget</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">0.0</span><span class="p">,</span> + <span class="bp">self</span><span class="p">,</span> + <span class="n">ndim</span><span class="p">:</span> <span class="nb">int</span><span class="p">,</span> + <span class="n">zero_mean</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">"No"</span><span class="p">,</span> + <span class="n">nugget</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">0.0</span><span class="p">,</span> <span class="n">nugget_est</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span> - <span class="n">range_par</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="n">NALogicalType</span><span class="p">]</span> <span class="o">=</span> <span class="n">NA</span><span class="p">,</span> - <span class="n">method</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span><span class="s1">'post_mode'</span><span class="p">,</span> <span class="n">prior_choice</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s1">'ref_approx'</span><span class="p">,</span> - <span class="n">a</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">0.2</span><span class="p">,</span> <span class="n">b</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> - <span class="n">kernel_type</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s1">'matern_5_2'</span><span class="p">,</span> - <span class="n">isotropic</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span> <span class="n">optimization</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s1">'lbfgs'</span><span class="p">,</span> - <span class="n">alpha</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="n">lower_bound</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span> - <span class="n">max_eval</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="n">num_initial_values</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">2</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> - <span class="sd">"""</span> + <span class="n">range_par</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="n">NALogicalType</span><span class="p">]</span> <span class="o">=</span> <span class="n">NA</span><span class="p">,</span> + <span class="n">method</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">"post_mode"</span><span class="p">,</span> + <span class="n">prior_choice</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">"ref_approx"</span><span class="p">,</span> + <span class="n">a</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">0.2</span><span class="p">,</span> + <span class="n">b</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> + <span class="n">kernel_type</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">"matern_5_2"</span><span class="p">,</span> + <span class="n">isotropic</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span> + <span class="n">optimization</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">"lbfgs"</span><span class="p">,</span> + <span class="n">alpha</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> + <span class="n">lower_bound</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span> + <span class="n">max_eval</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> + <span class="n">num_initial_values</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">2</span><span class="p">,</span> + <span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +<span class="w"> </span><span class="sd">"""</span> <span class="sd"> Set up basic parameters of the emulator.</span> <span class="sd"> Parameters</span> <span class="sd"> ----------</span> <span class="sd"> ndim : int</span> <span class="sd"> Input parameter dimension.</span> -<span class="sd"> zero_mean : str, optional </span> +<span class="sd"> zero_mean : str, optional</span> <span class="sd"> If `'Yes'`, the mean is set to zero. If `'No'`, the mean is</span> <span class="sd"> specified by ``trend``. Default is `'No'`.</span> <span class="sd"> nugget : float, optional</span> -<span class="sd"> Nugget variance ratio. </span> +<span class="sd"> Nugget variance ratio.</span> <span class="sd"> If :math:`0`, there is no nugget or the nugget is estimated.</span> <span class="sd"> If not :math:`0`, it means a fixed nugget. Default is :math:`0`.</span> <span class="sd"> nugget_est : bool, optional</span> @@ -182,7 +207,7 @@ <span class="sd"> """</span> <span class="bp">self</span><span class="o">.</span><span class="n">ndim</span> <span class="o">=</span> <span class="n">ndim</span> - <span class="k">if</span> <span class="n">zero_mean</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">[</span><span class="s1">'No'</span><span class="p">,</span> <span class="s1">'Yes'</span><span class="p">]:</span> + <span class="k">if</span> <span class="n">zero_mean</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">[</span><span class="s2">"No"</span><span class="p">,</span> <span class="s2">"Yes"</span><span class="p">]:</span> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">"zero_mean can be either 'No' or 'Yes'."</span><span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">zero_mean</span> <span class="o">=</span> <span class="n">zero_mean</span> @@ -191,56 +216,56 @@ <span class="k">if</span> <span class="n">range_par</span> <span class="ow">is</span> <span class="ow">not</span> <span class="n">NA</span><span class="p">:</span> <span class="k">if</span> <span class="n">range_par</span><span class="o">.</span><span class="n">ndim</span> <span class="o">!=</span> <span class="mi">1</span> <span class="ow">or</span> <span class="nb">len</span><span class="p">(</span><span class="n">range_par</span><span class="p">)</span> <span class="o">!=</span> <span class="n">ndim</span><span class="p">:</span> - <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span> - <span class="s2">"range_par must be 1d numpy array of length ndim"</span><span class="p">)</span> + <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">"range_par must be 1d numpy array of length ndim"</span><span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">range_par</span> <span class="o">=</span> <span class="n">range_par</span> - <span class="k">if</span> <span class="n">method</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">[</span><span class="s1">'post_mode'</span><span class="p">,</span> <span class="s1">'mmle'</span><span class="p">,</span> <span class="s1">'mle'</span><span class="p">]:</span> - <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span> - <span class="s2">"method can only be 'post_mode', 'mmle', or 'mle'."</span><span class="p">)</span> + <span class="k">if</span> <span class="n">method</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">[</span><span class="s2">"post_mode"</span><span class="p">,</span> <span class="s2">"mmle"</span><span class="p">,</span> <span class="s2">"mle"</span><span class="p">]:</span> + <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">"method can only be 'post_mode', 'mmle', or 'mle'."</span><span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">method</span> <span class="o">=</span> <span class="n">method</span> - <span class="k">if</span> <span class="n">prior_choice</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">[</span><span class="s1">'ref_xi'</span><span class="p">,</span> <span class="s1">'ref_gamma'</span><span class="p">,</span> <span class="s1">'ref_approx'</span><span class="p">]:</span> + <span class="k">if</span> <span class="n">prior_choice</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">[</span><span class="s2">"ref_xi"</span><span class="p">,</span> <span class="s2">"ref_gamma"</span><span class="p">,</span> <span class="s2">"ref_approx"</span><span class="p">]:</span> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span> - <span class="s2">"prior_choice can only be 'ref_xi', 'ref_gamma',"</span> - <span class="s2">" or 'ref_approx'."</span><span class="p">)</span> + <span class="s2">"prior_choice can only be 'ref_xi', 'ref_gamma',"</span> <span class="s2">" or 'ref_approx'."</span> + <span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">prior_choice</span> <span class="o">=</span> <span class="n">prior_choice</span> <span class="bp">self</span><span class="o">.</span><span class="n">a</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">a</span><span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">b</span> <span class="o">=</span> <span class="n">b</span> - <span class="k">if</span> <span class="n">kernel_type</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">[</span><span class="s1">'matern_3_2'</span><span class="p">,</span> <span class="s1">'matern_5_2'</span><span class="p">,</span> <span class="s1">'pow_exp'</span><span class="p">]:</span> + <span class="k">if</span> <span class="n">kernel_type</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">[</span><span class="s2">"matern_3_2"</span><span class="p">,</span> <span class="s2">"matern_5_2"</span><span class="p">,</span> <span class="s2">"pow_exp"</span><span class="p">]:</span> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span> - <span class="s2">"kernel_type can only be 'matern_3_2', 'matern_5_2',"</span> - <span class="s2">" or 'pow_exp'."</span><span class="p">)</span> + <span class="s2">"kernel_type can only be 'matern_3_2', 'matern_5_2',"</span> <span class="s2">" or 'pow_exp'."</span> + <span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">kernel_type</span> <span class="o">=</span> <span class="n">kernel_type</span> <span class="bp">self</span><span class="o">.</span><span class="n">isotropic</span> <span class="o">=</span> <span class="n">isotropic</span> - <span class="k">if</span> <span class="n">optimization</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">[</span><span class="s1">'lbfgs'</span><span class="p">,</span> <span class="s1">'nelder-mead'</span><span class="p">,</span> <span class="s1">'brent'</span><span class="p">]:</span> + <span class="k">if</span> <span class="n">optimization</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">[</span><span class="s2">"lbfgs"</span><span class="p">,</span> <span class="s2">"nelder-mead"</span><span class="p">,</span> <span class="s2">"brent"</span><span class="p">]:</span> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span> - <span class="s2">"optimization can only be 'lbfgs', 'nelder-mead', or 'brent'."</span><span class="p">)</span> + <span class="s2">"optimization can only be 'lbfgs', 'nelder-mead', or 'brent'."</span> + <span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">optimization</span> <span class="o">=</span> <span class="n">optimization</span> <span class="k">if</span> <span class="n">alpha</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">alpha</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">ones</span><span class="p">(</span><span class="n">ndim</span><span class="p">)</span> <span class="o">*</span> <span class="mf">1.9</span> <span class="k">elif</span> <span class="n">alpha</span><span class="o">.</span><span class="n">ndim</span> <span class="o">!=</span> <span class="mi">1</span> <span class="ow">or</span> <span class="nb">len</span><span class="p">(</span><span class="n">alpha</span><span class="p">)</span> <span class="o">!=</span> <span class="n">ndim</span><span class="p">:</span> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">"alpha must be 1d numpy array of length ndim"</span><span class="p">)</span> - <span class="bp">self</span><span class="o">.</span><span class="n">alpha</span> <span class="o">=</span> <span class="n">alpha</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">float32</span><span class="p">)</span> + <span class="bp">self</span><span class="o">.</span><span class="n">alpha</span> <span class="o">=</span> <span class="n">alpha</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">float64</span><span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">lower_bound</span> <span class="o">=</span> <span class="n">lower_bound</span> <span class="k">if</span> <span class="n">max_eval</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> - <span class="n">max_eval</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="nb">max</span><span class="p">(</span><span class="mi">30</span><span class="p">,</span> <span class="mi">20</span> <span class="o">+</span> <span class="mi">5</span><span class="o">*</span><span class="n">ndim</span><span class="p">))</span> + <span class="n">max_eval</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="nb">max</span><span class="p">(</span><span class="mi">30</span><span class="p">,</span> <span class="mi">20</span> <span class="o">+</span> <span class="mi">5</span> <span class="o">*</span> <span class="n">ndim</span><span class="p">))</span> <span class="bp">self</span><span class="o">.</span><span class="n">max_eval</span> <span class="o">=</span> <span class="n">max_eval</span> <span class="bp">self</span><span class="o">.</span><span class="n">num_initial_values</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">num_initial_values</span><span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">emulator</span> <span class="o">=</span> <span class="kc">None</span> - - <span class="k">def</span> <span class="nf">_preprocess_design_response_trend</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">design</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> - <span class="n">response</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="n">trend</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> - <span class="sd">"""</span> + + <span class="k">def</span> <span class="nf">_preprocess_design_response_trend</span><span class="p">(</span> + <span class="bp">self</span><span class="p">,</span> <span class="n">design</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="n">response</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="n">trend</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span> + <span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +<span class="w"> </span><span class="sd">"""</span> <span class="sd"> Preprocess design, response, and trend before train an emulator.</span> <span class="sd"> Parameters</span> @@ -266,20 +291,19 @@ <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">"design must be 1d or 2d numpy array."</span><span class="p">)</span> <span class="k">elif</span> <span class="n">design</span><span class="o">.</span><span class="n">ndim</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span> <span class="n">design</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span><span class="n">design</span><span class="p">,</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">design</span><span class="p">),</span> <span class="mi">1</span><span class="p">))</span> - + <span class="k">if</span> <span class="n">design</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">!=</span> <span class="bp">self</span><span class="o">.</span><span class="n">ndim</span><span class="p">:</span> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">"design must match the input dimension ndim"</span><span class="p">)</span> - <span class="bp">self</span><span class="o">.</span><span class="n">design</span> <span class="o">=</span> <span class="n">design</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">float32</span><span class="p">)</span> + <span class="bp">self</span><span class="o">.</span><span class="n">design</span> <span class="o">=</span> <span class="n">design</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">float64</span><span class="p">)</span> <span class="k">if</span> <span class="ow">not</span> <span class="p">(</span><span class="n">response</span><span class="o">.</span><span class="n">ndim</span> <span class="o">==</span> <span class="mi">1</span> <span class="ow">or</span> <span class="n">response</span><span class="o">.</span><span class="n">ndim</span> <span class="o">==</span> <span class="mi">2</span><span class="p">):</span> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">"response must be 1d or 2d numpy array."</span><span class="p">)</span> <span class="k">elif</span> <span class="n">response</span><span class="o">.</span><span class="n">ndim</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span> <span class="n">response</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span><span class="n">response</span><span class="p">,</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">response</span><span class="p">),</span> <span class="mi">1</span><span class="p">))</span> <span class="k">if</span> <span class="n">response</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">!=</span> <span class="n">design</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">]:</span> - <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span> - <span class="s2">"response must have same number of points as design"</span><span class="p">)</span> - <span class="bp">self</span><span class="o">.</span><span class="n">response</span> <span class="o">=</span> <span class="n">response</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">float32</span><span class="p">)</span> + <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">"response must have same number of points as design"</span><span class="p">)</span> + <span class="bp">self</span><span class="o">.</span><span class="n">response</span> <span class="o">=</span> <span class="n">response</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">float64</span><span class="p">)</span> <span class="k">if</span> <span class="n">trend</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">trend</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">ones</span><span class="p">((</span><span class="n">design</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="mi">1</span><span class="p">))</span> @@ -289,20 +313,22 @@ <span class="n">trend</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span><span class="n">trend</span><span class="p">,</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">trend</span><span class="p">),</span> <span class="mi">1</span><span class="p">))</span> <span class="k">if</span> <span class="n">trend</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">!=</span> <span class="n">design</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">]:</span> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">"trend must have same numer of points as design"</span><span class="p">)</span> - <span class="bp">self</span><span class="o">.</span><span class="n">trend</span> <span class="o">=</span> <span class="n">trend</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">float32</span><span class="p">)</span> + <span class="bp">self</span><span class="o">.</span><span class="n">trend</span> <span class="o">=</span> <span class="n">trend</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">float64</span><span class="p">)</span> + + <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">zero_mean</span> <span class="o">==</span> <span class="s2">"Yes"</span><span class="p">:</span> + <span class="bp">self</span><span class="o">.</span><span class="n">trend</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">zeros</span><span class="p">((</span><span class="n">design</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="mi">1</span><span class="p">),</span> <span class="n">dtype</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">float64</span><span class="p">)</span> - <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">zero_mean</span> <span class="o">==</span> <span class="s1">'Yes'</span><span class="p">:</span> - <span class="bp">self</span><span class="o">.</span><span class="n">trend</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">zeros</span><span class="p">((</span><span class="n">design</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="mi">1</span><span class="p">),</span> <span class="n">dtype</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">float32</span><span class="p">)</span> - <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">b</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> - <span class="bp">self</span><span class="o">.</span><span class="n">_b</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">/</span> <span class="n">design</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span><span class="o">**</span><span class="p">(</span><span class="mi">1</span> <span class="o">/</span> <span class="n">design</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span> <span class="o">*</span> \ - <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">a</span> <span class="o">+</span> <span class="n">design</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span> + <span class="bp">self</span><span class="o">.</span><span class="n">_b</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span> <span class="o">/</span> <span class="n">design</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span> <span class="o">**</span> <span class="p">(</span><span class="mi">1</span> <span class="o">/</span> <span class="n">design</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span> <span class="o">*</span> <span class="p">(</span> + <span class="bp">self</span><span class="o">.</span><span class="n">a</span> <span class="o">+</span> <span class="n">design</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> + <span class="p">)</span> <span class="k">else</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_b</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">b</span> - <span class="k">def</span> <span class="nf">_preprocess_testing_input_trend</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">testing_input</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> - <span class="n">testing_trend</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> - <span class="sd">"""</span> + <span class="k">def</span> <span class="nf">_preprocess_testing_input_trend</span><span class="p">(</span> + <span class="bp">self</span><span class="p">,</span> <span class="n">testing_input</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="n">testing_trend</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span> + <span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +<span class="w"> </span><span class="sd">"""</span> <span class="sd"> Preprocess testing_input and testing_trend before make prediction or</span> <span class="sd"> draw samples.</span> @@ -324,12 +350,11 @@ <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">"testing_input must be 1d or 2d numpy array."</span><span class="p">)</span> <span class="k">elif</span> <span class="n">testing_input</span><span class="o">.</span><span class="n">ndim</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span> <span class="n">testing_input</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span><span class="n">testing_input</span><span class="p">,</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">testing_input</span><span class="p">),</span> <span class="mi">1</span><span class="p">))</span> - + <span class="k">if</span> <span class="n">testing_input</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">!=</span> <span class="bp">self</span><span class="o">.</span><span class="n">ndim</span><span class="p">:</span> - <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span> - <span class="s2">"testing_input must match the input dimension ndim"</span><span class="p">)</span> + <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">"testing_input must match the input dimension ndim"</span><span class="p">)</span> - <span class="bp">self</span><span class="o">.</span><span class="n">testing_input</span> <span class="o">=</span> <span class="n">testing_input</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">float32</span><span class="p">)</span> + <span class="bp">self</span><span class="o">.</span><span class="n">testing_input</span> <span class="o">=</span> <span class="n">testing_input</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">float64</span><span class="p">)</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">zero_mean</span> <span class="o">==</span> <span class="s2">"Yes"</span><span class="p">:</span> <span class="n">testing_trend</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">zeros</span><span class="p">((</span><span class="n">testing_input</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="mi">1</span><span class="p">))</span> @@ -339,24 +364,45 @@ <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">"testing_trend must be 1d or 2d numpy array."</span><span class="p">)</span> <span class="k">elif</span> <span class="n">testing_trend</span><span class="o">.</span><span class="n">ndim</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span> <span class="n">testing_trend</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span><span class="n">testing_trend</span><span class="p">,</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">testing_trend</span><span class="p">),</span> <span class="mi">1</span><span class="p">))</span> - - <span class="bp">self</span><span class="o">.</span><span class="n">testing_trend</span> <span class="o">=</span> <span class="n">testing_trend</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">float32</span><span class="p">)</span> + + <span class="bp">self</span><span class="o">.</span><span class="n">testing_trend</span> <span class="o">=</span> <span class="n">testing_trend</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">float64</span><span class="p">)</span> <span class="k">if</span> <span class="n">testing_trend</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">!=</span> <span class="n">testing_input</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">]:</span> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span> - <span class="s2">"testing_trend must have same numer of points as testing_input"</span><span class="p">)</span> + <span class="s2">"testing_trend must have same numer of points as testing_input"</span> + <span class="p">)</span> <span class="k">if</span> <span class="n">testing_trend</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">!=</span> <span class="bp">self</span><span class="o">.</span><span class="n">trend</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">1</span><span class="p">]:</span> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span> <span class="s2">"testing_trend must have the same basis as the trend used"</span> - <span class="s2">" for emulator training."</span><span class="p">)</span> + <span class="s2">" for emulator training."</span> + <span class="p">)</span> + + <span class="nd">@contextmanager</span> + <span class="k">def</span> <span class="nf">_nostdout</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> +<span class="w"> </span><span class="sd">"""</span> +<span class="sd"> Discard any output to the standard output stream (stdout).</span> +<span class="sd"> """</span> + <span class="n">save_stdout</span> <span class="o">=</span> <span class="n">sys</span><span class="o">.</span><span class="n">stdout</span> + <span class="n">sys</span><span class="o">.</span><span class="n">stdout</span> <span class="o">=</span> <span class="n">io</span><span class="o">.</span><span class="n">StringIO</span><span class="p">()</span> + <span class="k">yield</span> + <span class="n">sys</span><span class="o">.</span><span class="n">stdout</span> <span class="o">=</span> <span class="n">save_stdout</span> -<div class="viewcode-block" id="ScalarGaSP"><a class="viewcode-back" href="../../../emulator/robustgasp.html#psimpy.emulator.robustgasp.ScalarGaSP">[docs]</a><span class="k">class</span> <span class="nc">ScalarGaSP</span><span class="p">(</span><span class="n">RobustGaSPBase</span><span class="p">):</span> -<div class="viewcode-block" id="ScalarGaSP.train"><a class="viewcode-back" href="../../../emulator/robustgasp.html#psimpy.emulator.robustgasp.ScalarGaSP.train">[docs]</a> <span class="nd">@beartype</span> - <span class="k">def</span> <span class="nf">train</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">design</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="n">response</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> - <span class="n">trend</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> - <span class="sd">"""</span> +<div class="viewcode-block" id="ScalarGaSP"> +<a class="viewcode-back" href="../../../emulator/robustgasp.html#psimpy.emulator.robustgasp.ScalarGaSP">[docs]</a> +<span class="k">class</span> <span class="nc">ScalarGaSP</span><span class="p">(</span><span class="n">RobustGaSPBase</span><span class="p">):</span> +<div class="viewcode-block" id="ScalarGaSP.train"> +<a class="viewcode-back" href="../../../emulator/robustgasp.html#psimpy.emulator.robustgasp.ScalarGaSP.train">[docs]</a> + <span class="nd">@beartype</span> + <span class="k">def</span> <span class="nf">train</span><span class="p">(</span> + <span class="bp">self</span><span class="p">,</span> + <span class="n">design</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> + <span class="n">response</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> + <span class="n">trend</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> + <span class="n">verbose</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span> + <span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +<span class="w"> </span><span class="sd">"""</span> <span class="sd"> Train a scalar GP given training data.</span> <span class="sd"> Parameters</span> @@ -374,36 +420,42 @@ <span class="sd"> If `None`, a :code:`(ntrain, 1)` matrix of ones is used.</span> <span class="sd"> If :math:`q=1`, both :code:`(ntrain, 1)` and :code:`(ntrain,)`</span> <span class="sd"> :class:`numpy.ndarray` are valid.</span> +<span class="sd"> verbose : bool, optional</span> +<span class="sd"> If `'True'`, Displays detailed information.</span> +<span class="sd"> Default is `True`.</span> <span class="sd"> """</span> <span class="bp">self</span><span class="o">.</span><span class="n">_preprocess_design_response_trend</span><span class="p">(</span><span class="n">design</span><span class="p">,</span> <span class="n">response</span><span class="p">,</span> <span class="n">trend</span><span class="p">)</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">response</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">!=</span> <span class="mi">1</span><span class="p">:</span> <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s2">"ScalarGaSP only works for scalar-output model"</span><span class="p">)</span> - <span class="bp">self</span><span class="o">.</span><span class="n">emulator</span> <span class="o">=</span> <span class="n">RobustGaSP</span><span class="o">.</span><span class="n">rgasp</span><span class="p">(</span> - <span class="n">design</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">design</span><span class="p">,</span> - <span class="n">response</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">response</span><span class="p">,</span> - <span class="n">trend</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">trend</span><span class="p">,</span> - <span class="n">zero_mean</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">zero_mean</span><span class="p">,</span> - <span class="n">nugget</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">nugget</span><span class="p">,</span> - <span class="n">nugget_est</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">nugget_est</span><span class="p">,</span> - <span class="n">range_par</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">range_par</span><span class="p">,</span> - <span class="n">method</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">method</span><span class="p">,</span> - <span class="n">prior_choice</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">prior_choice</span><span class="p">,</span> - <span class="n">a</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">a</span><span class="p">,</span> - <span class="n">b</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_b</span><span class="p">,</span> - <span class="n">kernel_type</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">kernel_type</span><span class="p">,</span> - <span class="n">isotropic</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">isotropic</span><span class="p">,</span> - <span class="n">optimization</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">optimization</span><span class="p">,</span> - <span class="n">alpha</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">alpha</span><span class="p">,</span> - <span class="n">lower_bound</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">lower_bound</span><span class="p">,</span> - <span class="n">max_eval</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">max_eval</span><span class="p">,</span> - <span class="n">num_initial_values</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">num_initial_values</span><span class="p">)</span></div> - -<div class="viewcode-block" id="ScalarGaSP.predict"><a class="viewcode-back" href="../../../emulator/robustgasp.html#psimpy.emulator.robustgasp.ScalarGaSP.predict">[docs]</a> <span class="nd">@beartype</span> - <span class="k">def</span> <span class="nf">predict</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">testing_input</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> - <span class="n">testing_trend</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">:</span> - <span class="sd">"""</span> + <span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">_nostdout</span><span class="p">()</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">verbose</span> <span class="k">else</span> <span class="n">nullcontext</span><span class="p">():</span> + <span class="bp">self</span><span class="o">.</span><span class="n">emulator</span> <span class="o">=</span> <span class="n">RobustGaSP</span><span class="o">.</span><span class="n">rgasp</span><span class="p">(</span> + <span class="n">design</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">design</span><span class="p">,</span> + <span class="n">response</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">response</span><span class="p">,</span> + <span class="n">trend</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">trend</span><span class="p">,</span> + <span class="n">nugget</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">nugget</span><span class="p">,</span> + <span class="n">method</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">method</span><span class="p">,</span> + <span class="n">prior_choice</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">prior_choice</span><span class="p">,</span> + <span class="n">a</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">a</span><span class="p">,</span> + <span class="n">b</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_b</span><span class="p">,</span> + <span class="n">kernel_type</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">kernel_type</span><span class="p">,</span> + <span class="n">isotropic</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">isotropic</span><span class="p">,</span> + <span class="n">optimization</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">optimization</span><span class="p">,</span> + <span class="n">alpha</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">alpha</span><span class="p">,</span> + <span class="n">lower_bound</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">lower_bound</span><span class="p">,</span> + <span class="n">max_eval</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">max_eval</span><span class="p">,</span> + <span class="n">num_initial_values</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">num_initial_values</span><span class="p">,</span> + <span class="p">)</span></div> + + +<div class="viewcode-block" id="ScalarGaSP.predict"> +<a class="viewcode-back" href="../../../emulator/robustgasp.html#psimpy.emulator.robustgasp.ScalarGaSP.predict">[docs]</a> + <span class="nd">@beartype</span> + <span class="k">def</span> <span class="nf">predict</span><span class="p">(</span> + <span class="bp">self</span><span class="p">,</span> <span class="n">testing_input</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="n">testing_trend</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span> + <span class="p">)</span> <span class="o">-></span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">:</span> +<span class="w"> </span><span class="sd">"""</span> <span class="sd"> Make prediction using the trained scalar GP emulator.</span> <span class="sd"> Parameters</span> @@ -425,7 +477,7 @@ <span class="sd"> Emulator-prediction at ``testing_input``. Shape :code:`(ntest, 4)`.</span> <span class="sd"> `predictions[:, 0]` - mean,</span> <span class="sd"> `predictions[:, 1]` - low95,</span> -<span class="sd"> `predictions[:, 2]` - upper95, </span> +<span class="sd"> `predictions[:, 2]` - upper95,</span> <span class="sd"> `predictions[:, 3]` - sd</span> <span class="sd"> """</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">emulator</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> @@ -438,15 +490,23 @@ <span class="bp">self</span><span class="o">.</span><span class="n">testing_input</span><span class="p">,</span> <span class="n">testing_trend</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">testing_trend</span><span class="p">,</span> <span class="n">interval_data</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> - <span class="n">outasS3</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> + <span class="n">outasS3</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> + <span class="p">)</span> <span class="n">predictions</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">transpose</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">r_predictions</span><span class="p">))</span> <span class="k">return</span> <span class="n">predictions</span></div> -<div class="viewcode-block" id="ScalarGaSP.sample"><a class="viewcode-back" href="../../../emulator/robustgasp.html#psimpy.emulator.robustgasp.ScalarGaSP.sample">[docs]</a> <span class="nd">@beartype</span> - <span class="k">def</span> <span class="nf">sample</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">testing_input</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="n">nsamples</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> - <span class="n">testing_trend</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">:</span> - <span class="sd">"""</span> + +<div class="viewcode-block" id="ScalarGaSP.sample"> +<a class="viewcode-back" href="../../../emulator/robustgasp.html#psimpy.emulator.robustgasp.ScalarGaSP.sample">[docs]</a> + <span class="nd">@beartype</span> + <span class="k">def</span> <span class="nf">sample</span><span class="p">(</span> + <span class="bp">self</span><span class="p">,</span> + <span class="n">testing_input</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> + <span class="n">nsamples</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> + <span class="n">testing_trend</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> + <span class="p">)</span> <span class="o">-></span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">:</span> +<span class="w"> </span><span class="sd">"""</span> <span class="sd"> Draw samples using the trained scalar GP emulator.</span> <span class="sd"> Parameters</span> @@ -472,28 +532,32 @@ <span class="sd"> """</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">emulator</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s2">"Emulator has not been trained!"</span><span class="p">)</span> - + <span class="bp">self</span><span class="o">.</span><span class="n">_preprocess_testing_input_trend</span><span class="p">(</span><span class="n">testing_input</span><span class="p">,</span> <span class="n">testing_trend</span><span class="p">)</span> <span class="n">r_samples</span> <span class="o">=</span> <span class="n">RobustGaSP</span><span class="o">.</span><span class="n">Sample</span><span class="p">(</span> <span class="bp">self</span><span class="o">.</span><span class="n">emulator</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">testing_input</span><span class="p">,</span> <span class="n">num_sample</span><span class="o">=</span><span class="n">nsamples</span><span class="p">,</span> - <span class="n">testing_trend</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">testing_trend</span><span class="p">)</span> + <span class="n">testing_trend</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">testing_trend</span><span class="p">,</span> + <span class="p">)</span> <span class="n">samples</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">r_samples</span><span class="p">)</span> <span class="k">return</span> <span class="n">samples</span></div> -<div class="viewcode-block" id="ScalarGaSP.loo_validate"><a class="viewcode-back" href="../../../emulator/robustgasp.html#psimpy.emulator.robustgasp.ScalarGaSP.loo_validate">[docs]</a> <span class="k">def</span> <span class="nf">loo_validate</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> - <span class="sd">"""</span> + +<div class="viewcode-block" id="ScalarGaSP.loo_validate"> +<a class="viewcode-back" href="../../../emulator/robustgasp.html#psimpy.emulator.robustgasp.ScalarGaSP.loo_validate">[docs]</a> + <span class="k">def</span> <span class="nf">loo_validate</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> +<span class="w"> </span><span class="sd">"""</span> <span class="sd"> Validate trained scalar GP emulator using leave-one-out-cross-validation.</span> <span class="sd"> Returns</span> <span class="sd"> -------</span> <span class="sd"> validation : numpy array</span> <span class="sd"> Shape :code:`(n, 2)`.</span> -<span class="sd"> validation[:, 0] - leave one out fitted values,</span> -<span class="sd"> validation[:, 1] - stand deviation of each prediction</span> +<span class="sd"> validation[:, 0] - leave-one-out fitted values</span> +<span class="sd"> validation[:, 1] - standard deviation of each prediction</span> <span class="sd"> """</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">emulator</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s2">"Emulator has not been trained!"</span><span class="p">)</span> @@ -501,20 +565,88 @@ <span class="n">r_validation</span> <span class="o">=</span> <span class="n">RobustGaSP</span><span class="o">.</span><span class="n">leave_one_out_rgasp</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">emulator</span><span class="p">)</span> <span class="n">validation</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">transpose</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">r_validation</span><span class="p">))</span> - <span class="k">return</span> <span class="n">validation</span></div></div> + <span class="k">return</span> <span class="n">validation</span></div> + + + <span class="nd">@beartype</span> + <span class="k">def</span> <span class="nf">repeated_kfold_validate</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">k</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">5</span><span class="p">,</span> <span class="n">repeat</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">10</span><span class="p">)</span> <span class="o">-></span> <span class="nb">dict</span><span class="p">:</span> +<span class="w"> </span><span class="sd">"""</span> +<span class="sd"> Performs repeated K-Fold cross-validation on trained emulator. Calculates</span> +<span class="sd"> MAPE, NRMSE, and R^2 errors.</span> + +<span class="sd"> Parameters</span> +<span class="sd"> ----------</span> +<span class="sd"> k : int, optional</span> +<span class="sd"> K-factor. Default is :math:`5`.</span> +<span class="sd"> repeat : int, optiona</span> +<span class="sd"> Repeat-factor. Default is :math:`10`.</span> + +<span class="sd"> Returns</span> +<span class="sd"> -------</span> +<span class="sd"> validation_dict : dict</span> +<span class="sd"> A dictionary consists of key-value pairs of error metrics (MAPE, </span> +<span class="sd"> NRMSE, and R^2) and numpy array of respective error per validation</span> +<span class="sd"> step.</span> +<span class="sd"> """</span> + <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">emulator</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> + <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s2">"Emulator has not been trained!"</span><span class="p">)</span> + + <span class="n">X</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">design</span> + <span class="n">y</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">response</span> + + <span class="n">rkf</span> <span class="o">=</span> <span class="n">RepeatedKFold</span><span class="p">(</span><span class="n">n_splits</span><span class="o">=</span><span class="n">k</span><span class="p">,</span> <span class="n">n_repeats</span><span class="o">=</span><span class="n">repeat</span><span class="p">)</span> + <span class="n">nval</span> <span class="o">=</span> <span class="n">rkf</span><span class="o">.</span><span class="n">get_n_splits</span><span class="p">()</span> + + <span class="n">MAPE</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">empty</span><span class="p">(</span><span class="n">nval</span><span class="p">)</span> <span class="c1"># mean absolute percentage</span> + <span class="n">R_squared</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">empty</span><span class="p">(</span><span class="n">nval</span><span class="p">)</span> <span class="c1"># coefficient of determination</span> + <span class="n">NRMSE</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">empty</span><span class="p">(</span><span class="n">nval</span><span class="p">)</span> <span class="c1"># normalized root mean square</span> + <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="p">(</span><span class="n">train_index</span><span class="p">,</span> <span class="n">test_index</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">rkf</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="n">X</span><span class="p">)):</span> + <span class="n">training_inputs</span> <span class="o">=</span> <span class="n">X</span><span class="p">[</span><span class="n">train_index</span><span class="p">,</span> <span class="p">:]</span> + <span class="n">training_outputs</span> <span class="o">=</span> <span class="n">y</span><span class="p">[</span><span class="n">train_index</span><span class="p">]</span> + <span class="n">testing_inputs</span> <span class="o">=</span> <span class="n">X</span><span class="p">[</span><span class="n">test_index</span><span class="p">,</span> <span class="p">:]</span> + <span class="n">testing_outputs</span> <span class="o">=</span> <span class="n">y</span><span class="p">[</span><span class="n">test_index</span><span class="p">]</span> -<div class="viewcode-block" id="PPGaSP"><a class="viewcode-back" href="../../../emulator/robustgasp.html#psimpy.emulator.robustgasp.PPGaSP">[docs]</a><span class="k">class</span> <span class="nc">PPGaSP</span><span class="p">(</span><span class="n">RobustGaSPBase</span><span class="p">):</span> + <span class="bp">self</span><span class="o">.</span><span class="n">train</span><span class="p">(</span><span class="n">training_inputs</span><span class="p">,</span> <span class="n">training_outputs</span><span class="p">,</span> <span class="n">verbose</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span> + <span class="n">prediction</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">predict</span><span class="p">(</span><span class="n">testing_inputs</span><span class="p">)[:,</span> <span class="mi">0</span><span class="p">]</span> -<div class="viewcode-block" id="PPGaSP.train"><a class="viewcode-back" href="../../../emulator/robustgasp.html#psimpy.emulator.robustgasp.PPGaSP.train">[docs]</a> <span class="nd">@beartype</span> - <span class="k">def</span> <span class="nf">train</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">design</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="n">response</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> - <span class="n">trend</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> - <span class="sd">"""</span> + <span class="n">R_squared</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span> + <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">prediction</span><span class="p">)</span> <span class="o">></span> <span class="mi">1</span><span class="p">:</span> + <span class="n">R_squared</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="n">r2_score</span><span class="p">(</span><span class="n">testing_outputs</span><span class="p">,</span> <span class="n">prediction</span><span class="p">)</span> + + <span class="n">MAPE</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="mi">100</span> <span class="o">*</span> <span class="n">mean_absolute_percentage_error</span><span class="p">(</span><span class="n">testing_outputs</span><span class="p">,</span> <span class="n">prediction</span><span class="p">)</span> + + <span class="n">RMSD</span> <span class="o">=</span> <span class="n">root_mean_squared_error</span><span class="p">(</span><span class="n">testing_outputs</span><span class="p">,</span> <span class="n">prediction</span><span class="p">)</span> + <span class="n">mean</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">mean</span><span class="p">(</span><span class="n">testing_outputs</span><span class="p">)</span> + + <span class="k">if</span> <span class="nb">abs</span><span class="p">(</span><span class="n">mean</span><span class="p">)</span> <span class="o"><</span> <span class="n">sys</span><span class="o">.</span><span class="n">float_info</span><span class="o">.</span><span class="n">epsilon</span><span class="p">:</span> + <span class="n">NRMSE</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span> + <span class="k">else</span><span class="p">:</span> + <span class="n">NRMSE</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="n">RMSD</span> <span class="o">/</span> <span class="n">mean</span> + + <span class="n">validation_dict</span> <span class="o">=</span> <span class="p">{</span><span class="s2">"MAPE"</span><span class="p">:</span> <span class="n">MAPE</span><span class="p">,</span> <span class="s2">"NRMSE"</span><span class="p">:</span> <span class="n">NRMSE</span><span class="p">,</span> <span class="s2">"R_squared"</span><span class="p">:</span> <span class="n">R_squared</span><span class="p">}</span> + <span class="k">return</span> <span class="n">validation_dict</span></div> + + + +<div class="viewcode-block" id="PPGaSP"> +<a class="viewcode-back" href="../../../emulator/robustgasp.html#psimpy.emulator.robustgasp.PPGaSP">[docs]</a> +<span class="k">class</span> <span class="nc">PPGaSP</span><span class="p">(</span><span class="n">RobustGaSPBase</span><span class="p">):</span> +<div class="viewcode-block" id="PPGaSP.train"> +<a class="viewcode-back" href="../../../emulator/robustgasp.html#psimpy.emulator.robustgasp.PPGaSP.train">[docs]</a> + <span class="nd">@beartype</span> + <span class="k">def</span> <span class="nf">train</span><span class="p">(</span> + <span class="bp">self</span><span class="p">,</span> + <span class="n">design</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> + <span class="n">response</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> + <span class="n">trend</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> + <span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +<span class="w"> </span><span class="sd">"""</span> <span class="sd"> Train a parallel partial GP given training data.</span> <span class="sd"> Parameters</span> <span class="sd"> ----------</span> -<span class="sd"> design : numpy array </span> +<span class="sd"> design : numpy array</span> <span class="sd"> Training input points. Shape :code:`(ntrain, ndim)`.</span> <span class="sd"> ``ntrain`` is the number of training points, ``ndim`` is the input</span> <span class="sd"> dimension. If :math:`ndim=1`, both :code:`(ndim, 1)` and</span> @@ -533,8 +665,9 @@ <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">response</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span> <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span> <span class="s2">"PPGaSP should be used for models with vector output."</span> - <span class="s2">" For scalar output model, please use ScalarGaSP."</span><span class="p">)</span> - + <span class="s2">" For scalar output model, please use ScalarGaSP."</span> + <span class="p">)</span> + <span class="bp">self</span><span class="o">.</span><span class="n">emulator</span> <span class="o">=</span> <span class="n">RobustGaSP</span><span class="o">.</span><span class="n">ppgasp</span><span class="p">(</span> <span class="n">design</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">design</span><span class="p">,</span> <span class="n">response</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">response</span><span class="p">,</span> @@ -553,12 +686,17 @@ <span class="n">alpha</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">alpha</span><span class="p">,</span> <span class="n">lower_bound</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">lower_bound</span><span class="p">,</span> <span class="n">max_eval</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">max_eval</span><span class="p">,</span> - <span class="n">num_initial_values</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">num_initial_values</span><span class="p">)</span></div> + <span class="n">num_initial_values</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">num_initial_values</span><span class="p">,</span> + <span class="p">)</span></div> + -<div class="viewcode-block" id="PPGaSP.predict"><a class="viewcode-back" href="../../../emulator/robustgasp.html#psimpy.emulator.robustgasp.PPGaSP.predict">[docs]</a> <span class="nd">@beartype</span> - <span class="k">def</span> <span class="nf">predict</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">testing_input</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> - <span class="n">testing_trend</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">:</span> - <span class="sd">"""</span> +<div class="viewcode-block" id="PPGaSP.predict"> +<a class="viewcode-back" href="../../../emulator/robustgasp.html#psimpy.emulator.robustgasp.PPGaSP.predict">[docs]</a> + <span class="nd">@beartype</span> + <span class="k">def</span> <span class="nf">predict</span><span class="p">(</span> + <span class="bp">self</span><span class="p">,</span> <span class="n">testing_input</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="n">testing_trend</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span> + <span class="p">)</span> <span class="o">-></span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">:</span> +<span class="w"> </span><span class="sd">"""</span> <span class="sd"> Make prediction using the trained parallel partial GP emulator.</span> <span class="sd"> Parameters</span> @@ -594,7 +732,8 @@ <span class="bp">self</span><span class="o">.</span><span class="n">testing_input</span><span class="p">,</span> <span class="n">testing_trend</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">testing_trend</span><span class="p">,</span> <span class="n">interval_data</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> - <span class="n">outasS3</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> + <span class="n">outasS3</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> + <span class="p">)</span> <span class="n">ntest</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">testing_input</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="n">nresponse</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">response</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> @@ -605,10 +744,17 @@ <span class="k">return</span> <span class="n">predictions</span></div> -<div class="viewcode-block" id="PPGaSP.sample"><a class="viewcode-back" href="../../../emulator/robustgasp.html#psimpy.emulator.robustgasp.PPGaSP.sample">[docs]</a> <span class="nd">@beartype</span> - <span class="k">def</span> <span class="nf">sample</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">testing_input</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="n">nsamples</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> - <span class="n">testing_trend</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">:</span> - <span class="sd">"""</span> + +<div class="viewcode-block" id="PPGaSP.sample"> +<a class="viewcode-back" href="../../../emulator/robustgasp.html#psimpy.emulator.robustgasp.PPGaSP.sample">[docs]</a> + <span class="nd">@beartype</span> + <span class="k">def</span> <span class="nf">sample</span><span class="p">(</span> + <span class="bp">self</span><span class="p">,</span> + <span class="n">testing_input</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> + <span class="n">nsamples</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> + <span class="n">testing_trend</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> + <span class="p">)</span> <span class="o">-></span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">:</span> +<span class="w"> </span><span class="sd">"""</span> <span class="sd"> Draw samples using the trained parallel partial GaSP emulator.</span> <span class="sd"> Parameters</span> @@ -629,7 +775,7 @@ <span class="sd"> Returns</span> <span class="sd"> -------</span> <span class="sd"> samples : numpy array</span> -<span class="sd"> Shape :code:`(ntest, nresponse, nsamples)`. </span> +<span class="sd"> Shape :code:`(ntest, nresponse, nsamples)`.</span> <span class="sd"> `samples[:, :, i]` corresponds to i-th realization of the trained</span> <span class="sd"> emulator at ``testing_input``, i=1, ..., ``nsamples``.</span> <span class="sd"> """</span> @@ -637,16 +783,16 @@ <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s2">"Emulator has not been trained!"</span><span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">_preprocess_testing_input_trend</span><span class="p">(</span><span class="n">testing_input</span><span class="p">,</span> <span class="n">testing_trend</span><span class="p">)</span> - + <span class="n">ntest</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">testing_input</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="n">nresponse</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">response</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> - + <span class="c1"># extract trained parameters of ppgasp_emulator</span> <span class="n">sigma2_hat</span> <span class="o">=</span> <span class="n">r_at</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">emulator</span><span class="p">,</span> <span class="s2">"sigma2_hat"</span><span class="p">)</span> <span class="n">nugget</span> <span class="o">=</span> <span class="n">r_at</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">emulator</span><span class="p">,</span> <span class="s2">"nugget"</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span> <span class="n">beta_hat</span> <span class="o">=</span> <span class="n">r_at</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">emulator</span><span class="p">,</span> <span class="s2">"beta_hat"</span><span class="p">)</span> - <span class="n">range_par</span> <span class="o">=</span> <span class="mi">1</span><span class="o">/</span><span class="n">beta_hat</span> - + <span class="n">range_par</span> <span class="o">=</span> <span class="mi">1</span> <span class="o">/</span> <span class="n">beta_hat</span> + <span class="c1"># set up a rgasp_emulator using trained parameters of ppgasp_emulator</span> <span class="n">rgasp_emulator</span> <span class="o">=</span> <span class="n">RobustGaSP</span><span class="o">.</span><span class="n">rgasp</span><span class="p">(</span> <span class="n">design</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">design</span><span class="p">,</span> @@ -656,7 +802,7 @@ <span class="n">nugget</span><span class="o">=</span><span class="n">nugget</span><span class="p">,</span> <span class="n">nugget_est</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">range_par</span><span class="o">=</span><span class="n">range_par</span><span class="p">,</span> - <span class="n">method</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">method</span><span class="p">,</span> + <span class="n">method</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">method</span><span class="p">,</span> <span class="n">prior_choice</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">prior_choice</span><span class="p">,</span> <span class="n">a</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_b</span><span class="p">,</span> @@ -666,32 +812,41 @@ <span class="n">alpha</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">alpha</span><span class="p">,</span> <span class="n">lower_bound</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">lower_bound</span><span class="p">,</span> <span class="n">max_eval</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">max_eval</span><span class="p">,</span> - <span class="n">num_initial_values</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">num_initial_values</span><span class="p">)</span> - + <span class="n">num_initial_values</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">num_initial_values</span><span class="p">,</span> + <span class="p">)</span> + <span class="c1"># predictions and samples of y1 at testing_input using rgasp_emulator</span> <span class="n">r_predictions_y1</span> <span class="o">=</span> <span class="n">RobustGaSP</span><span class="o">.</span><span class="n">predict_rgasp</span><span class="p">(</span> - <span class="n">rgasp_emulator</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">testing_input</span><span class="p">,</span> <span class="n">testing_trend</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">testing_trend</span><span class="p">)</span> + <span class="n">rgasp_emulator</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">testing_input</span><span class="p">,</span> <span class="n">testing_trend</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">testing_trend</span> + <span class="p">)</span> <span class="n">predictions_y1</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">transpose</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">r_predictions_y1</span><span class="p">))</span> - <span class="n">predictions_mean_y1</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span><span class="n">predictions_y1</span><span class="p">[:,</span><span class="mi">0</span><span class="p">],</span> <span class="p">(</span><span class="n">ntest</span><span class="p">,</span> <span class="mi">1</span><span class="p">))</span> - + <span class="n">predictions_mean_y1</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span><span class="n">predictions_y1</span><span class="p">[:,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">(</span><span class="n">ntest</span><span class="p">,</span> <span class="mi">1</span><span class="p">))</span> + <span class="n">r_samples_y1</span> <span class="o">=</span> <span class="n">RobustGaSP</span><span class="o">.</span><span class="n">Sample</span><span class="p">(</span> - <span class="n">rgasp_emulator</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">testing_input</span><span class="p">,</span> <span class="n">num_sample</span><span class="o">=</span><span class="n">nsamples</span><span class="p">,</span> - <span class="n">testing_trend</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">testing_trend</span><span class="p">)</span> + <span class="n">rgasp_emulator</span><span class="p">,</span> + <span class="bp">self</span><span class="o">.</span><span class="n">testing_input</span><span class="p">,</span> + <span class="n">num_sample</span><span class="o">=</span><span class="n">nsamples</span><span class="p">,</span> + <span class="n">testing_trend</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">testing_trend</span><span class="p">,</span> + <span class="p">)</span> <span class="n">samples_y1</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">r_samples_y1</span><span class="p">)</span> <span class="c1"># use predictions_mean and samples of y1 to calculate LW term</span> <span class="n">LW_term</span> <span class="o">=</span> <span class="p">(</span><span class="n">samples_y1</span> <span class="o">-</span> <span class="n">predictions_mean_y1</span><span class="p">)</span> <span class="o">/</span> <span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="n">sigma2_hat</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span> - + <span class="c1"># predictions of y1,...,yk using ppgasp_emulator</span> <span class="n">predictions</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">predict</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">testing_input</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">testing_trend</span><span class="p">)</span> <span class="n">predictions_mean</span> <span class="o">=</span> <span class="n">predictions</span><span class="p">[:,</span> <span class="p">:,</span> <span class="mi">0</span><span class="p">]</span> - + <span class="n">samples</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">zeros</span><span class="p">((</span><span class="n">ntest</span><span class="p">,</span> <span class="n">nresponse</span><span class="p">,</span> <span class="n">nsamples</span><span class="p">))</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">nresponse</span><span class="p">):</span> - <span class="n">samples</span><span class="p">[:,</span><span class="n">i</span><span class="p">,:]</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span><span class="n">predictions_mean</span><span class="p">[:,</span> <span class="n">i</span><span class="p">],</span> <span class="p">(</span><span class="n">ntest</span><span class="p">,</span> <span class="mi">1</span><span class="p">))</span> <span class="o">+</span> \ - <span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="n">sigma2_hat</span><span class="p">[</span><span class="n">i</span><span class="p">])</span> <span class="o">*</span> <span class="n">LW_term</span> - - <span class="k">return</span> <span class="n">samples</span></div></div> + <span class="n">samples</span><span class="p">[:,</span> <span class="n">i</span><span class="p">,</span> <span class="p">:]</span> <span class="o">=</span> <span class="p">(</span> + <span class="n">np</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span><span class="n">predictions_mean</span><span class="p">[:,</span> <span class="n">i</span><span class="p">],</span> <span class="p">(</span><span class="n">ntest</span><span class="p">,</span> <span class="mi">1</span><span class="p">))</span> + <span class="o">+</span> <span class="n">np</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="n">sigma2_hat</span><span class="p">[</span><span class="n">i</span><span class="p">])</span> <span class="o">*</span> <span class="n">LW_term</span> + <span class="p">)</span> + + <span class="k">return</span> <span class="n">samples</span></div> +</div> + </pre></div> </div> @@ -701,7 +856,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2023, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/_modules/psimpy/simulator/mass_point_model.html b/docs/source/_build/html/_modules/psimpy/simulator/mass_point_model.html index 350ada4a598a9a4e9bbada44bf62950962eda55c..70df450afaa4dafdf0fd657b02c0d495311d86b9 100644 --- a/docs/source/_build/html/_modules/psimpy/simulator/mass_point_model.html +++ b/docs/source/_build/html/_modules/psimpy/simulator/mass_point_model.html @@ -15,12 +15,11 @@ <script src="../../../_static/js/html5shiv.min.js"></script> <![endif]--> - <script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script> - <script src="../../../_static/jquery.js"></script> - <script src="../../../_static/underscore.js"></script> - <script src="../../../_static/_sphinx_javascript_frameworks_compat.js"></script> - <script src="../../../_static/doctools.js"></script> - <script src="../../../_static/sphinx_highlight.js"></script> + <script src="../../../_static/jquery.js?v=5d32c60e"></script> + <script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script> + <script src="../../../_static/documentation_options.js?v=938c9ccc"></script> + <script src="../../../_static/doctools.js?v=888ff710"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> <script src="../../../_static/js/theme.js"></script> <link rel="index" title="Index" href="../../../genindex.html" /> <link rel="search" title="Search" href="../../../search.html" /> @@ -31,14 +30,18 @@ <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search" > - <a href="../../../index.html" class="icon icon-home"> psimpy + + + + <a href="../../../index.html" class="icon icon-home"> + psimpy </a> <div class="version"> - 0.1.2 + 0.2.0 </div> <div role="search"> <form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get"> - <input type="text" name="q" placeholder="Search docs" /> + <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> @@ -66,7 +69,7 @@ <div class="rst-content"> <div role="navigation" aria-label="Page navigation"> <ul class="wy-breadcrumbs"> - <li><a href="../../../index.html" class="icon icon-home"></a></li> + <li><a href="../../../index.html" class="icon icon-home" aria-label="Home"></a></li> <li class="breadcrumb-item"><a href="../../index.html">Module code</a></li> <li class="breadcrumb-item active">psimpy.simulator.mass_point_model</li> <li class="wy-breadcrumbs-aside"> @@ -83,17 +86,19 @@ <span class="kn">import</span> <span class="nn">linecache</span> <span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span> <span class="kn">from</span> <span class="nn">scipy.integrate</span> <span class="kn">import</span> <span class="n">ode</span> -<span class="kn">from</span> <span class="nn">scipy.interpolate</span> <span class="kn">import</span> <span class="n">interp2d</span> +<span class="kn">from</span> <span class="nn">scipy.interpolate</span> <span class="kn">import</span> <span class="n">RegularGridInterpolator</span> <span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Union</span> <span class="kn">from</span> <span class="nn">beartype</span> <span class="kn">import</span> <span class="n">beartype</span> -<div class="viewcode-block" id="MassPointModel"><a class="viewcode-back" href="../../../simulator/mass_point_model.html#psimpy.simulator.mass_point_model.MassPointModel">[docs]</a><span class="k">class</span> <span class="nc">MassPointModel</span><span class="p">:</span> +<div class="viewcode-block" id="MassPointModel"> +<a class="viewcode-back" href="../../../simulator/mass_point_model.html#psimpy.simulator.mass_point_model.MassPointModel">[docs]</a> +<span class="k">class</span> <span class="nc">MassPointModel</span><span class="p">:</span> - <span class="sd">"""Simulate the movement of a masspoint on a topography."""</span> +<span class="w"> </span><span class="sd">"""Simulate the movement of a masspoint on a topography."""</span> <span class="nd">@staticmethod</span> <span class="k">def</span> <span class="nf">_preprocess</span><span class="p">(</span><span class="n">elevation</span><span class="p">,</span> <span class="n">x0</span><span class="p">,</span> <span class="n">y0</span><span class="p">):</span> - <span class="sd">"""</span> +<span class="w"> </span><span class="sd">"""</span> <span class="sd"> Preprocess input data.</span> <span class="sd"> Parameters</span> @@ -154,11 +159,11 @@ <span class="n">dzdyy</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">gradient</span><span class="p">(</span><span class="n">dzdy</span><span class="p">,</span> <span class="n">y_values</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span> <span class="n">dzdxy</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">gradient</span><span class="p">(</span><span class="n">dzdx</span><span class="p">,</span> <span class="n">y_values</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span> - <span class="n">fgrad_x</span> <span class="o">=</span> <span class="n">interp2d</span><span class="p">(</span><span class="n">x_values</span><span class="p">,</span> <span class="n">y_values</span><span class="p">,</span> <span class="n">dzdx</span><span class="p">)</span> - <span class="n">fgrad_y</span> <span class="o">=</span> <span class="n">interp2d</span><span class="p">(</span><span class="n">x_values</span><span class="p">,</span> <span class="n">y_values</span><span class="p">,</span> <span class="n">dzdy</span><span class="p">)</span> - <span class="n">fgrad_xx</span> <span class="o">=</span> <span class="n">interp2d</span><span class="p">(</span><span class="n">x_values</span><span class="p">,</span> <span class="n">y_values</span><span class="p">,</span> <span class="n">dzdxx</span><span class="p">)</span> - <span class="n">fgrad_yy</span> <span class="o">=</span> <span class="n">interp2d</span><span class="p">(</span><span class="n">x_values</span><span class="p">,</span> <span class="n">y_values</span><span class="p">,</span> <span class="n">dzdyy</span><span class="p">)</span> - <span class="n">fgrad_xy</span> <span class="o">=</span> <span class="n">interp2d</span><span class="p">(</span><span class="n">x_values</span><span class="p">,</span> <span class="n">y_values</span><span class="p">,</span> <span class="n">dzdxy</span><span class="p">)</span> + <span class="n">fgrad_x</span> <span class="o">=</span> <span class="n">RegularGridInterpolator</span><span class="p">((</span><span class="n">x_values</span><span class="p">,</span> <span class="n">y_values</span><span class="p">),</span> <span class="n">dzdx</span><span class="o">.</span><span class="n">T</span><span class="p">)</span> + <span class="n">fgrad_y</span> <span class="o">=</span> <span class="n">RegularGridInterpolator</span><span class="p">((</span><span class="n">x_values</span><span class="p">,</span> <span class="n">y_values</span><span class="p">),</span> <span class="n">dzdy</span><span class="o">.</span><span class="n">T</span><span class="p">)</span> + <span class="n">fgrad_xx</span> <span class="o">=</span> <span class="n">RegularGridInterpolator</span><span class="p">((</span><span class="n">x_values</span><span class="p">,</span> <span class="n">y_values</span><span class="p">),</span> <span class="n">dzdxx</span><span class="o">.</span><span class="n">T</span><span class="p">)</span> + <span class="n">fgrad_yy</span> <span class="o">=</span> <span class="n">RegularGridInterpolator</span><span class="p">((</span><span class="n">x_values</span><span class="p">,</span> <span class="n">y_values</span><span class="p">),</span> <span class="n">dzdyy</span><span class="o">.</span><span class="n">T</span><span class="p">)</span> + <span class="n">fgrad_xy</span> <span class="o">=</span> <span class="n">RegularGridInterpolator</span><span class="p">((</span><span class="n">x_values</span><span class="p">,</span> <span class="n">y_values</span><span class="p">),</span> <span class="n">dzdxy</span><span class="o">.</span><span class="n">T</span><span class="p">)</span> <span class="k">return</span> <span class="n">fgrad_x</span><span class="p">,</span> <span class="n">fgrad_y</span><span class="p">,</span> <span class="n">fgrad_xx</span><span class="p">,</span> <span class="n">fgrad_yy</span><span class="p">,</span> <span class="n">fgrad_xy</span> @@ -167,7 +172,7 @@ <span class="k">def</span> <span class="nf">_mass_point_model</span><span class="p">(</span> <span class="n">t</span><span class="p">,</span> <span class="n">alpha</span><span class="p">,</span> <span class="n">coulomb_friction</span><span class="p">,</span> <span class="n">turbulent_friction</span><span class="p">,</span> <span class="n">fgrad_x</span><span class="p">,</span> <span class="n">fgrad_y</span><span class="p">,</span> <span class="n">fgrad_xx</span><span class="p">,</span> <span class="n">fgrad_yy</span><span class="p">,</span> <span class="n">fgrad_xy</span><span class="p">,</span> <span class="n">g</span><span class="p">,</span> <span class="n">curvature</span><span class="p">):</span> - <span class="sd">"""</span> +<span class="w"> </span><span class="sd">"""</span> <span class="sd"> Define mass point model (3d) which serves as the callable function</span> <span class="sd"> :code:`f(t,alpha,*f_args)` in :class:`scipy.integrate.ode(f)`.</span> @@ -211,8 +216,12 @@ <span class="sd"> """</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">ux</span><span class="p">,</span> <span class="n">uy</span> <span class="o">=</span> <span class="n">alpha</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">alpha</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">alpha</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">alpha</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> - <span class="n">gradx</span><span class="p">,</span> <span class="n">grady</span><span class="p">,</span> <span class="n">gradxx</span><span class="p">,</span> <span class="n">gradyy</span><span class="p">,</span> <span class="n">gradxy</span> <span class="o">=</span> <span class="n">fgrad_x</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">),</span> <span class="n">fgrad_y</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">),</span> \ - <span class="n">fgrad_xx</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">),</span> <span class="n">fgrad_yy</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">),</span> <span class="n">fgrad_xy</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">)</span> + <span class="n">point</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">])</span> + <span class="n">gradx</span> <span class="o">=</span> <span class="n">fgrad_x</span><span class="p">(</span><span class="n">point</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span> + <span class="n">grady</span> <span class="o">=</span> <span class="n">fgrad_y</span><span class="p">(</span><span class="n">point</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span> + <span class="n">gradxx</span> <span class="o">=</span> <span class="n">fgrad_xx</span><span class="p">(</span><span class="n">point</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span> + <span class="n">gradyy</span> <span class="o">=</span> <span class="n">fgrad_yy</span><span class="p">(</span><span class="n">point</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span> + <span class="n">gradxy</span> <span class="o">=</span> <span class="n">fgrad_xy</span><span class="p">(</span><span class="n">point</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span> <span class="n">sqrt_x</span> <span class="o">=</span> <span class="n">math</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">gradx</span><span class="o">**</span><span class="mi">2</span><span class="p">)</span> <span class="n">sqrt_y</span> <span class="o">=</span> <span class="n">math</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">grady</span><span class="o">**</span><span class="mi">2</span><span class="p">)</span> @@ -250,7 +259,9 @@ <span class="k">return</span> <span class="n">dalphadt</span> -<div class="viewcode-block" id="MassPointModel.run"><a class="viewcode-back" href="../../../simulator/mass_point_model.html#psimpy.simulator.mass_point_model.MassPointModel.run">[docs]</a> <span class="nd">@beartype</span> +<div class="viewcode-block" id="MassPointModel.run"> +<a class="viewcode-back" href="../../../simulator/mass_point_model.html#psimpy.simulator.mass_point_model.MassPointModel.run">[docs]</a> + <span class="nd">@beartype</span> <span class="k">def</span> <span class="nf">run</span><span class="p">(</span> <span class="bp">self</span><span class="p">,</span> <span class="n">elevation</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">coulomb_friction</span><span class="p">:</span> <span class="nb">float</span><span class="p">,</span> <span class="n">turbulent_friction</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">],</span> <span class="n">x0</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">],</span> @@ -259,7 +270,7 @@ <span class="n">tend</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">]</span> <span class="o">=</span> <span class="mi">300</span><span class="p">,</span> <span class="n">t0</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">]</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">g</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">]</span> <span class="o">=</span> <span class="mf">9.8</span><span class="p">,</span> <span class="n">atol</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">1e-6</span><span class="p">,</span> <span class="n">rtol</span><span class="p">:</span> <span class="nb">float</span> <span class="o">=</span> <span class="mf">1e-6</span><span class="p">,</span> <span class="n">curvature</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">)</span> <span class="o">-></span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">:</span> - <span class="sd">"""</span> +<span class="w"> </span><span class="sd">"""</span> <span class="sd"> Solve the mass point model using :class:`scipy.integrate.ode` solver</span> <span class="sd"> given required input data.</span> @@ -334,8 +345,9 @@ <span class="n">u</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">zeros</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">t_all</span><span class="p">))</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">t_all</span><span class="p">)):</span> - <span class="n">gradx</span> <span class="o">=</span> <span class="n">fgrad_x</span><span class="p">(</span><span class="n">alpha_all</span><span class="p">[</span><span class="n">i</span><span class="p">,</span><span class="mi">0</span><span class="p">],</span> <span class="n">alpha_all</span><span class="p">[</span><span class="n">i</span><span class="p">,</span><span class="mi">1</span><span class="p">])</span> - <span class="n">grady</span> <span class="o">=</span> <span class="n">fgrad_y</span><span class="p">(</span><span class="n">alpha_all</span><span class="p">[</span><span class="n">i</span><span class="p">,</span><span class="mi">0</span><span class="p">],</span> <span class="n">alpha_all</span><span class="p">[</span><span class="n">i</span><span class="p">,</span><span class="mi">1</span><span class="p">])</span> + <span class="n">point</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">alpha_all</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="n">alpha_all</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="mi">1</span><span class="p">]])</span> + <span class="n">gradx</span> <span class="o">=</span> <span class="n">fgrad_x</span><span class="p">(</span><span class="n">point</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span> + <span class="n">grady</span> <span class="o">=</span> <span class="n">fgrad_y</span><span class="p">(</span><span class="n">point</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span> <span class="n">ux</span> <span class="o">=</span> <span class="n">alpha_all</span><span class="p">[</span><span class="n">i</span><span class="p">,</span><span class="mi">2</span><span class="p">]</span> <span class="n">uy</span> <span class="o">=</span> <span class="n">alpha_all</span><span class="p">[</span><span class="n">i</span><span class="p">,</span><span class="mi">3</span><span class="p">]</span> <span class="n">u</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="n">math</span><span class="o">.</span><span class="n">sqrt</span><span class="p">(</span><span class="n">ux</span><span class="o">**</span><span class="mi">2</span> <span class="o">+</span> <span class="n">uy</span><span class="o">**</span><span class="mi">2</span> <span class="o">+</span> <span class="mi">2</span><span class="o">*</span><span class="n">ux</span><span class="o">*</span><span class="n">uy</span><span class="o">*</span><span class="n">gradx</span><span class="o">*</span><span class="n">grady</span><span class="o">/</span> @@ -345,7 +357,9 @@ <span class="n">u</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span><span class="n">u</span><span class="p">,(</span><span class="nb">len</span><span class="p">(</span><span class="n">u</span><span class="p">),</span><span class="o">-</span><span class="mi">1</span><span class="p">))</span> <span class="n">output</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">concatenate</span><span class="p">((</span><span class="n">t_all</span><span class="p">,</span> <span class="n">alpha_all</span><span class="p">,</span> <span class="n">u</span><span class="p">),</span> <span class="n">axis</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span> - <span class="k">return</span> <span class="n">output</span></div></div> + <span class="k">return</span> <span class="n">output</span></div> +</div> + </pre></div> </div> @@ -355,7 +369,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2023, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/_modules/psimpy/simulator/ravaflow3G.html b/docs/source/_build/html/_modules/psimpy/simulator/ravaflow3G.html index 3f80af51dd4903a997ed1acd2d5f267ba2d7500f..bc5a222d79ee68dab30e1dd5a0a526888bf64d32 100644 --- a/docs/source/_build/html/_modules/psimpy/simulator/ravaflow3G.html +++ b/docs/source/_build/html/_modules/psimpy/simulator/ravaflow3G.html @@ -84,9 +84,10 @@ <span></span><span class="kn">import</span> <span class="nn">os</span> <span class="kn">import</span> <span class="nn">linecache</span> <span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span> -<span class="kn">from</span> <span class="nn">scipy.interpolate</span> <span class="kn">import</span> <span class="n">interp2d</span> +<span class="kn">from</span> <span class="nn">scipy.interpolate</span> <span class="kn">import</span> <span class="n">RegularGridInterpolator</span> <span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Union</span> <span class="kn">from</span> <span class="nn">beartype</span> <span class="kn">import</span> <span class="n">beartype</span> +<span class="kn">import</span> <span class="nn">warnings</span> <div class="viewcode-block" id="Ravaflow3GMixture"> @@ -178,6 +179,12 @@ <span class="sd"> `'0'`: Suppress change of direction induced by frictional or viscous forces (default).</span> <span class="sd"> `'1'`: Do not suppress the change of direction.</span> <span class="sd"> """</span> + <span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span> + <span class="s2">"r.avaflow 3 and lower versions are not supported by its </span><span class="se">\</span> +<span class="s2"> developers, and their use is discouraged. Therefore, ravaflow3G </span><span class="se">\</span> +<span class="s2"> module will be deprecated in the future versions."</span><span class="p">,</span> + <span class="ne">FutureWarning</span><span class="p">,</span> + <span class="p">)</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isdir</span><span class="p">(</span><span class="n">dir_sim</span><span class="p">):</span> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">dir_sim</span><span class="si">}</span><span class="s2"> does not exist or is not a directory"</span><span class="p">)</span> @@ -290,6 +297,12 @@ <span class="sd"> Name of the shell file (including path), which will be called by</span> <span class="sd"> `GRASS <https://grass.osgeo.org/>`_ to run the simulation.</span> <span class="sd"> """</span> + <span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span> + <span class="s2">"r.avaflow 3 and lower versions are not supported by its </span><span class="se">\</span> +<span class="s2"> developers, and their use is discouraged. Therefore, ravaflow3G </span><span class="se">\</span> +<span class="s2"> module will be deprecated in the future versions."</span><span class="p">,</span> + <span class="ne">FutureWarning</span><span class="p">,</span> + <span class="p">)</span> <span class="n">sh_file</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">dir_sim</span><span class="p">,</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">prefix</span><span class="si">}</span><span class="s2">_shell.sh"</span><span class="p">)</span> <span class="n">grass_location</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">dir_sim</span><span class="p">,</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">prefix</span><span class="si">}</span><span class="s2">_glocation"</span><span class="p">)</span> @@ -365,6 +378,12 @@ <span class="sd"> sh_file : str</span> <span class="sd"> Name of the shell file (including path).</span> <span class="sd"> """</span> + <span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span> + <span class="s2">"r.avaflow 3 and lower versions are not supported by its </span><span class="se">\</span> +<span class="s2"> developers, and their use is discouraged. Therefore, ravaflow3G </span><span class="se">\</span> +<span class="s2"> module will be deprecated in the future versions."</span><span class="p">,</span> + <span class="ne">FutureWarning</span><span class="p">,</span> + <span class="p">)</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">grass_location</span><span class="p">):</span> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">grass_location</span><span class="si">}</span><span class="s2"> does not exist"</span><span class="p">)</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">grass_location</span><span class="p">,</span> <span class="s2">"PERMANENT"</span><span class="p">)):</span> @@ -407,6 +426,12 @@ <span class="sd"> impact_area : float</span> <span class="sd"> A scalar value representing the overall impact area.</span> <span class="sd"> """</span> + <span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span> + <span class="s2">"r.avaflow 3 and lower versions are not supported by its </span><span class="se">\</span> +<span class="s2"> developers, and their use is discouraged. Therefore, ravaflow3G </span><span class="se">\</span> +<span class="s2"> module will be deprecated in the future versions."</span><span class="p">,</span> + <span class="ne">FutureWarning</span><span class="p">,</span> + <span class="p">)</span> <span class="k">if</span> <span class="n">qoi</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">[</span><span class="s2">"h"</span><span class="p">,</span> <span class="s2">"v"</span><span class="p">,</span> <span class="s2">"p"</span><span class="p">,</span> <span class="s2">"t"</span><span class="p">]:</span> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">"qoi must be 'h', 'v', 'p', or 't'"</span><span class="p">)</span> @@ -457,6 +482,12 @@ <span class="sd"> qoi_max : float or numpy array</span> <span class="sd"> Maximum value(s) of ``qoi`` in one simulation.</span> <span class="sd"> """</span> + <span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span> + <span class="s2">"r.avaflow 3 and lower versions are not supported by its </span><span class="se">\</span> +<span class="s2"> developers, and their use is discouraged. Therefore, ravaflow3G </span><span class="se">\</span> +<span class="s2"> module will be deprecated in the future versions."</span><span class="p">,</span> + <span class="ne">FutureWarning</span><span class="p">,</span> + <span class="p">)</span> <span class="k">if</span> <span class="n">qoi</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">[</span><span class="s2">"h"</span><span class="p">,</span> <span class="s2">"v"</span><span class="p">,</span> <span class="s2">"p"</span><span class="p">,</span> <span class="s2">"t"</span><span class="p">]:</span> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">"qoi must be 'h', 'v', 'p', or 't'"</span><span class="p">)</span> @@ -504,6 +535,12 @@ <span class="sd"> Consist of maximum value(s) of ``qoi`` at each location.</span> <span class="sd"> Shape of :code:`(nloc,)`.</span> <span class="sd"> """</span> + <span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span> + <span class="s2">"r.avaflow 3 and lower versions are not supported by its </span><span class="se">\</span> +<span class="s2"> developers, and their use is discouraged. Therefore, ravaflow3G </span><span class="se">\</span> +<span class="s2"> module will be deprecated in the future versions."</span><span class="p">,</span> + <span class="ne">FutureWarning</span><span class="p">,</span> + <span class="p">)</span> <span class="k">if</span> <span class="ow">not</span> <span class="p">(</span><span class="n">loc</span><span class="o">.</span><span class="n">ndim</span> <span class="o">==</span> <span class="mi">2</span> <span class="ow">and</span> <span class="n">loc</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="mi">2</span><span class="p">):</span> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span> @@ -546,9 +583,12 @@ <span class="n">qoi_max_raster</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">loadtxt</span><span class="p">(</span><span class="n">qoi_max_raster_asc</span><span class="p">,</span> <span class="n">skiprows</span><span class="o">=</span><span class="mi">6</span><span class="p">)</span> <span class="n">qoi_max_raster</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">rot90</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">transpose</span><span class="p">(</span><span class="n">qoi_max_raster</span><span class="p">))</span> - <span class="n">f_qoi_max</span> <span class="o">=</span> <span class="n">interp2d</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">qoi_max_raster</span><span class="p">)</span> + <span class="n">f_qoi_max</span> <span class="o">=</span> <span class="n">RegularGridInterpolator</span><span class="p">((</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">),</span> <span class="n">qoi_max_raster</span><span class="o">.</span><span class="n">T</span><span class="p">)</span> - <span class="n">qoi_max_loc</span> <span class="o">=</span> <span class="p">[</span><span class="nb">float</span><span class="p">(</span><span class="n">f_qoi_max</span><span class="p">(</span><span class="n">loc</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="n">loc</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="mi">1</span><span class="p">]))</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">loc</span><span class="p">))]</span> + <span class="n">qoi_max_loc</span> <span class="o">=</span> <span class="p">[]</span> + <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">loc</span><span class="p">)):</span> + <span class="n">point</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">loc</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="n">loc</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="mi">1</span><span class="p">]])</span> + <span class="n">qoi_max_loc</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">float</span><span class="p">(</span><span class="n">f_qoi_max</span><span class="p">(</span><span class="n">point</span><span class="p">)[</span><span class="mi">0</span><span class="p">]))</span> <span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">qoi_max_loc</span><span class="p">)</span></div> </div> @@ -562,7 +602,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/api.html b/docs/source/_build/html/api.html index 3a2aa22767001ece5c2ab3b234343f71c4209c26..ba923a748889f7c1812e1f59b74f7890fe2ac291 100644 --- a/docs/source/_build/html/api.html +++ b/docs/source/_build/html/api.html @@ -114,7 +114,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/emulator/index.html b/docs/source/_build/html/auto_examples/emulator/index.html index fbfd6137107419329ab8b09573d0f9a5b9d19eaa..e432f784b64fe1d3ab094659640ba412b2dba077 100644 --- a/docs/source/_build/html/auto_examples/emulator/index.html +++ b/docs/source/_build/html/auto_examples/emulator/index.html @@ -127,7 +127,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/emulator/plot_ppgasp.html b/docs/source/_build/html/auto_examples/emulator/plot_ppgasp.html index 50690eb7582b16182d6ae84da96f98bafb665222..01f003311ac1f49b0e1fe02a533c68e15ae0b796 100644 --- a/docs/source/_build/html/auto_examples/emulator/plot_ppgasp.html +++ b/docs/source/_build/html/auto_examples/emulator/plot_ppgasp.html @@ -239,7 +239,7 @@ Here, we make predictions at testing input points <code class="docutils literal <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/emulator/plot_scalargasp.html b/docs/source/_build/html/auto_examples/emulator/plot_scalargasp.html index bde84bccefd553df638464b2c53b3134aaf91cd0..94aca8415a3edcdf42523ec8224077c7ca975cda 100644 --- a/docs/source/_build/html/auto_examples/emulator/plot_scalargasp.html +++ b/docs/source/_build/html/auto_examples/emulator/plot_scalargasp.html @@ -247,7 +247,7 @@ is estimated from the noisy training data.</p></li> <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/emulator/sg_execution_times.html b/docs/source/_build/html/auto_examples/emulator/sg_execution_times.html index 048c435e7bc78ab9402acd2d18755dd2def93bb0..274832523ffb878780fa1f348ec7202e89ce1415 100644 --- a/docs/source/_build/html/auto_examples/emulator/sg_execution_times.html +++ b/docs/source/_build/html/auto_examples/emulator/sg_execution_times.html @@ -106,7 +106,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/inference/index.html b/docs/source/_build/html/auto_examples/inference/index.html index 85cc9e7881504effc3ab86376fde869e0839c490..ffa84a9e27135f03bec69126add1bedd69c20829 100644 --- a/docs/source/_build/html/auto_examples/inference/index.html +++ b/docs/source/_build/html/auto_examples/inference/index.html @@ -127,7 +127,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/inference/plot_active_learning.html b/docs/source/_build/html/auto_examples/inference/plot_active_learning.html index 9f2e0749a5e15508ddecd5c3186aa8765a3440c3..6a7fa58022563dee65123402ee33575e530ab467 100644 --- a/docs/source/_build/html/auto_examples/inference/plot_active_learning.html +++ b/docs/source/_build/html/auto_examples/inference/plot_active_learning.html @@ -1154,7 +1154,7 @@ the estimated posterior.</p> <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/inference/plot_bayes_inference.html b/docs/source/_build/html/auto_examples/inference/plot_bayes_inference.html index 3b3d9e8b990c740a99020ed8a489d6f4c4885df7..5f3eaac52a29c418499e4d3f861c596e157f49f6 100644 --- a/docs/source/_build/html/auto_examples/inference/plot_bayes_inference.html +++ b/docs/source/_build/html/auto_examples/inference/plot_bayes_inference.html @@ -224,7 +224,7 @@ the <a class="reference internal" href="../../inference/bayes_inference.html#psi <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/inference/sg_execution_times.html b/docs/source/_build/html/auto_examples/inference/sg_execution_times.html index a81359fb9f19315b38f14181b7010a8b4b9f8c93..94fe048112bd49c950d15d2d9681313f61925437 100644 --- a/docs/source/_build/html/auto_examples/inference/sg_execution_times.html +++ b/docs/source/_build/html/auto_examples/inference/sg_execution_times.html @@ -106,7 +106,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/sampler/index.html b/docs/source/_build/html/auto_examples/sampler/index.html index 9779dc3e4b865c1456ab8f2db388de093062822e..e2fca6680032e77babce0786d01ae8628927ae18 100644 --- a/docs/source/_build/html/auto_examples/sampler/index.html +++ b/docs/source/_build/html/auto_examples/sampler/index.html @@ -131,7 +131,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/sampler/plot_latin.html b/docs/source/_build/html/auto_examples/sampler/plot_latin.html index 9d049087a9be871da15127612fb37fdcf87b40d6..db24cc7fdfd1e007d09d285acf057c4a9fe81c54 100644 --- a/docs/source/_build/html/auto_examples/sampler/plot_latin.html +++ b/docs/source/_build/html/auto_examples/sampler/plot_latin.html @@ -197,7 +197,7 @@ we can use the <cite>center</cite> criterion to draw <span class="math notransla <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/sampler/plot_metropolis_hastings.html b/docs/source/_build/html/auto_examples/sampler/plot_metropolis_hastings.html index ead3506534f54f3e7d90ad3ae0209786511c9996..e7b308adeab3f617ff4cf4a99314eb807e22c7a4 100644 --- a/docs/source/_build/html/auto_examples/sampler/plot_metropolis_hastings.html +++ b/docs/source/_build/html/auto_examples/sampler/plot_metropolis_hastings.html @@ -219,7 +219,7 @@ number of samples.</p> <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/sampler/plot_saltelli.html b/docs/source/_build/html/auto_examples/sampler/plot_saltelli.html index e8483263a58bcafda6caeff9449a772b3ac89cab..eaf24ea01e278c45e6a8dd3d499a745bbbd482a4 100644 --- a/docs/source/_build/html/auto_examples/sampler/plot_saltelli.html +++ b/docs/source/_build/html/auto_examples/sampler/plot_saltelli.html @@ -197,7 +197,7 @@ Sobol’ index in that case.</p> <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/sampler/sg_execution_times.html b/docs/source/_build/html/auto_examples/sampler/sg_execution_times.html index 48b7902aff4b8ad54d277546ffc8ab3a186c2cac..d442642c470490b84838db03a451150313ca5e19 100644 --- a/docs/source/_build/html/auto_examples/sampler/sg_execution_times.html +++ b/docs/source/_build/html/auto_examples/sampler/sg_execution_times.html @@ -110,7 +110,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/sensitivity/index.html b/docs/source/_build/html/auto_examples/sensitivity/index.html index 44a7cb02d116028015073bfeceda82c7b928c9e3..43dee7ff6ab1a9a8055c36eb32436a059b3e6b00 100644 --- a/docs/source/_build/html/auto_examples/sensitivity/index.html +++ b/docs/source/_build/html/auto_examples/sensitivity/index.html @@ -123,7 +123,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/sensitivity/plot_sobol_analyze.html b/docs/source/_build/html/auto_examples/sensitivity/plot_sobol_analyze.html index 087357194050024dc08b3eba3b5276967d1a489a..3da2b588bed8bdaf38135e4a3f2aef2d67d45e03 100644 --- a/docs/source/_build/html/auto_examples/sensitivity/plot_sobol_analyze.html +++ b/docs/source/_build/html/auto_examples/sensitivity/plot_sobol_analyze.html @@ -343,7 +343,7 @@ look like.</p> <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/sensitivity/sg_execution_times.html b/docs/source/_build/html/auto_examples/sensitivity/sg_execution_times.html index f040bea9ce2f8e159577b3d447ef9fc9884b7f60..03bc0fcca0d9349aa6402552be1a2732aa806c99 100644 --- a/docs/source/_build/html/auto_examples/sensitivity/sg_execution_times.html +++ b/docs/source/_build/html/auto_examples/sensitivity/sg_execution_times.html @@ -102,7 +102,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/simulator/index.html b/docs/source/_build/html/auto_examples/simulator/index.html index 3e3078764fa736fd745daa0f35c6912dc51f69cb..624f4d5a089288a978d1df6071841bc4ac0093f1 100644 --- a/docs/source/_build/html/auto_examples/simulator/index.html +++ b/docs/source/_build/html/auto_examples/simulator/index.html @@ -135,7 +135,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/simulator/plot_mass_point_model.html b/docs/source/_build/html/auto_examples/simulator/plot_mass_point_model.html index 7a2b9728f20aa02806f1e062fb3ac54f0348807e..5b45b5e5d068c7bec977167489308186fcd7bf89 100644 --- a/docs/source/_build/html/auto_examples/simulator/plot_mass_point_model.html +++ b/docs/source/_build/html/auto_examples/simulator/plot_mass_point_model.html @@ -241,7 +241,7 @@ Following plots show the simulation results.</p> <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/simulator/plot_ravaflow24.html b/docs/source/_build/html/auto_examples/simulator/plot_ravaflow24.html index 2b621fdd6483525783d80d23fef1d624add0cc13..33ef230e900a0c6ab1dcff7f81a0e2c074200cc7 100644 --- a/docs/source/_build/html/auto_examples/simulator/plot_ravaflow24.html +++ b/docs/source/_build/html/auto_examples/simulator/plot_ravaflow24.html @@ -265,7 +265,7 @@ maximum flow velocity at specific locations:</p> <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/simulator/plot_ravaflow3G.html b/docs/source/_build/html/auto_examples/simulator/plot_ravaflow3G.html index e13493b63f8ce0834243cc9df255bbaf7fd66636..409754be3a21e1d4b07476f9a7e793f4ac37b644 100644 --- a/docs/source/_build/html/auto_examples/simulator/plot_ravaflow3G.html +++ b/docs/source/_build/html/auto_examples/simulator/plot_ravaflow3G.html @@ -260,7 +260,7 @@ Maximum flow velocity at location [1500 2000] is 34.779 m/s^2 <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/simulator/plot_run_mass_point_model.html b/docs/source/_build/html/auto_examples/simulator/plot_run_mass_point_model.html index bacc5ac20e3f7b964957f7a27151b26496d55020..82cec5d3509bfb591b9a161b13d1997ca87a765c 100644 --- a/docs/source/_build/html/auto_examples/simulator/plot_run_mass_point_model.html +++ b/docs/source/_build/html/auto_examples/simulator/plot_run_mass_point_model.html @@ -284,7 +284,7 @@ numpy array.</p> <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/simulator/plot_run_ravaflow24.html b/docs/source/_build/html/auto_examples/simulator/plot_run_ravaflow24.html index cdec356aa611989ee036fccf1bedb2fd521f3c1c..612291f517a453c7411a5f82246e139110b9fd56 100644 --- a/docs/source/_build/html/auto_examples/simulator/plot_run_ravaflow24.html +++ b/docs/source/_build/html/auto_examples/simulator/plot_run_ravaflow24.html @@ -301,7 +301,7 @@ numpy array.</p> <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/simulator/plot_run_ravaflow3G.html b/docs/source/_build/html/auto_examples/simulator/plot_run_ravaflow3G.html index 0f90170566c7cd61c9a7ee5d59c8cc3005385ef9..aebc19aecf46382a19f2af742627b335685c0072 100644 --- a/docs/source/_build/html/auto_examples/simulator/plot_run_ravaflow3G.html +++ b/docs/source/_build/html/auto_examples/simulator/plot_run_ravaflow3G.html @@ -313,7 +313,7 @@ numpy array.</p> <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/auto_examples/simulator/sg_execution_times.html b/docs/source/_build/html/auto_examples/simulator/sg_execution_times.html index 63d993ae58702d082c4dec4e3f2bb331f2a9035b..9802080dc93ff42cc2bd4491d5af6684b1f79cc8 100644 --- a/docs/source/_build/html/auto_examples/simulator/sg_execution_times.html +++ b/docs/source/_build/html/auto_examples/simulator/sg_execution_times.html @@ -114,7 +114,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/changelog.html b/docs/source/_build/html/changelog.html index 1e386cbe2eee5e734706c9c8b8ec9432597a583d..7b66499d84b1a7494bf3def227b418a23cddaccf 100644 --- a/docs/source/_build/html/changelog.html +++ b/docs/source/_build/html/changelog.html @@ -85,6 +85,15 @@ <section id="changes"> <h1>Changes<a class="headerlink" href="#changes" title="Link to this heading"></a></h1> +<section id="v1-0-0"> +<h2>v1.0.0<a class="headerlink" href="#v1-0-0" title="Link to this heading"></a></h2> +<ul class="simple"> +<li><p>Removed the <cite>simulator/ravaflow24</cite> module.</p></li> +<li><p>Replaced deprecated <cite>scipy.interpolate.interp2d</cite> with <cite>scipy.interpolate.RegularGridInterpolator</cite> to maintain compatibility with newer versions of SciPy.</p></li> +<li><p>Added citation information to the README.</p></li> +<li><p>Added repeated k-fold validation for <cite>emulator/robustgasp</cite> module.</p></li> +</ul> +</section> <section id="v0-2-1"> <h2>v0.2.1<a class="headerlink" href="#v0-2-1" title="Link to this heading"></a></h2> <ul class="simple"> @@ -135,7 +144,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/emulator/index.html b/docs/source/_build/html/emulator/index.html index 2efcf98e2a14159ce83d03633d95f701cd368e9c..9b9149f0ce7ce098e9750e418b781d66c19b4f5e 100644 --- a/docs/source/_build/html/emulator/index.html +++ b/docs/source/_build/html/emulator/index.html @@ -125,7 +125,7 @@ multiple values as output.</p></li> <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/emulator/robustgasp.html b/docs/source/_build/html/emulator/robustgasp.html index 650a7e0d476c3d54c61c301e459808b8e30130f1..81fa1f61f3c976df167ac2b41acc4bd986473a27 100644 --- a/docs/source/_build/html/emulator/robustgasp.html +++ b/docs/source/_build/html/emulator/robustgasp.html @@ -323,7 +323,7 @@ Default is <span class="math notranslate nohighlight">\(2\)</span>.</p></li> </dl> <dl class="py method"> <dt class="sig sig-object py" id="psimpy.emulator.robustgasp.ScalarGaSP.train"> -<span class="sig-name descname"><span class="pre">train</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">design</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">response</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">trend</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/psimpy/emulator/robustgasp.html#ScalarGaSP.train"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#psimpy.emulator.robustgasp.ScalarGaSP.train" title="Link to this definition"></a></dt> +<span class="sig-name descname"><span class="pre">train</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">design</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">response</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">trend</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">verbose</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/psimpy/emulator/robustgasp.html#ScalarGaSP.train"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#psimpy.emulator.robustgasp.ScalarGaSP.train" title="Link to this definition"></a></dt> <dd><p>Train a scalar GP given training data.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters<span class="colon">:</span></dt> @@ -338,6 +338,8 @@ dimension. If <span class="math notranslate nohighlight">\(ndim=1\)</span>, both If <cite>None</cite>, a <code class="code docutils literal notranslate"><span class="pre">(ntrain,</span> <span class="pre">1)</span></code> matrix of ones is used. If <span class="math notranslate nohighlight">\(q=1\)</span>, both <code class="code docutils literal notranslate"><span class="pre">(ntrain,</span> <span class="pre">1)</span></code> and <code class="code docutils literal notranslate"><span class="pre">(ntrain,)</span></code> <code class="xref py py-class docutils literal notranslate"><span class="pre">numpy.ndarray</span></code> are valid.</p></li> +<li><p><strong>verbose</strong> (<em>bool</em><em>, </em><em>optional</em>) – If <cite>‘True’</cite>, Displays detailed information. +Default is <cite>True</cite>.</p></li> </ul> </dd> <dt class="field-even">Return type<span class="colon">:</span></dt> @@ -599,7 +601,7 @@ emulator at <code class="docutils literal notranslate"><span class="pre">testing <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/examples.html b/docs/source/_build/html/examples.html index 425a4630186934472d27118595478fa327f978c9..f36faa08b4215be5126d129abc017604524e3626 100644 --- a/docs/source/_build/html/examples.html +++ b/docs/source/_build/html/examples.html @@ -114,7 +114,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/genindex.html b/docs/source/_build/html/genindex.html index 27e9f2a071f86346ecb8212225d67f281b53d8d4..a75ec258a09fcbcb9b8960208abd37f152fb85b2 100644 --- a/docs/source/_build/html/genindex.html +++ b/docs/source/_build/html/genindex.html @@ -278,7 +278,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/index.html b/docs/source/_build/html/index.html index 35d512fdb62f4e4f2fd4c82058f86ac0450adecd..96c252fdd5396c5670ea3df6368f3142d7658426 100644 --- a/docs/source/_build/html/index.html +++ b/docs/source/_build/html/index.html @@ -90,7 +90,7 @@ <dd class="field-odd"><p>0.2.1</p> </dd> <dt class="field-even">Date<span class="colon">:</span></dt> -<dd class="field-even"><p>Mar 18, 2024</p> +<dd class="field-even"><p>Mar 22, 2025</p> </dd> </dl> <section id="contents"> @@ -137,7 +137,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/inference/active_learning.html b/docs/source/_build/html/inference/active_learning.html index 67ec3b03c4d45f6ddfc86c9e2f8628343311b0ac..17ac1f8e600c09e7d14b71344f674b455822983b 100644 --- a/docs/source/_build/html/inference/active_learning.html +++ b/docs/source/_build/html/inference/active_learning.html @@ -284,7 +284,7 @@ than <span class="math notranslate nohighlight">\(ninit+niter\)</span>.</p> <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/inference/bayes_inference.html b/docs/source/_build/html/inference/bayes_inference.html index aa168eb7d4710baab2f58d8caf475b794712c914..62a4a28a4af247aa965d77936287fa503c3d4999 100644 --- a/docs/source/_build/html/inference/bayes_inference.html +++ b/docs/source/_build/html/inference/bayes_inference.html @@ -299,7 +299,7 @@ acceptance ratio.</p></li> <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/inference/index.html b/docs/source/_build/html/inference/index.html index b3eaa3e4588ade3c2aa86fcfba6d82f240fd0d8b..a5aa65bc04b3111fb61894506b15b7f6a6feceb0 100644 --- a/docs/source/_build/html/inference/index.html +++ b/docs/source/_build/html/inference/index.html @@ -119,7 +119,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/quickstart.html b/docs/source/_build/html/quickstart.html index b45d889b995fcd03ec4d4c6591c1371970fe8413..b1024beea579ee92f6cc7f8c8e7ada5931db7096 100644 --- a/docs/source/_build/html/quickstart.html +++ b/docs/source/_build/html/quickstart.html @@ -171,7 +171,7 @@ before starting PSimPy to use a custom R environment.</p> <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/refs.html b/docs/source/_build/html/refs.html index 33382e55f6984bf09783629b1399fd030d687ea5..7f5af055139e168ae5a375939cb5615a21803154 100644 --- a/docs/source/_build/html/refs.html +++ b/docs/source/_build/html/refs.html @@ -159,7 +159,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/sampler/index.html b/docs/source/_build/html/sampler/index.html index 900f6bbb17ce887bdd048c94c97755869c165174..2564006690bae7815a50060abd3bad4c5c43bdb1 100644 --- a/docs/source/_build/html/sampler/index.html +++ b/docs/source/_build/html/sampler/index.html @@ -120,7 +120,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/sampler/latin.html b/docs/source/_build/html/sampler/latin.html index 7da89f3d4a37ba3dbd4a9920f5fb57ba0a41c06e..bc07215c52b1957d0d666b6439f81ed711a7843c 100644 --- a/docs/source/_build/html/sampler/latin.html +++ b/docs/source/_build/html/sampler/latin.html @@ -187,7 +187,7 @@ samples accordingly.</p> <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/sampler/metropolis_hastings.html b/docs/source/_build/html/sampler/metropolis_hastings.html index 61467990fa781d123d3d4ab8e000e94ecf1a6e10..8a9261c338a86d2571cd6fee865fdfe5555aeaf7 100644 --- a/docs/source/_build/html/sampler/metropolis_hastings.html +++ b/docs/source/_build/html/sampler/metropolis_hastings.html @@ -216,7 +216,7 @@ acceptance ratio.</p></li> <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/sampler/saltelli.html b/docs/source/_build/html/sampler/saltelli.html index 7a5025ddc0c759ae4e966b94c2560c07ecc9847c..d928fff903806099698bd58d4645142ab784c9ea 100644 --- a/docs/source/_build/html/sampler/saltelli.html +++ b/docs/source/_build/html/sampler/saltelli.html @@ -170,7 +170,7 @@ is <cite>True</cite>. Shape of <code class="code docutils literal notranslate">< <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/search.html b/docs/source/_build/html/search.html index 31338cd5de69df5bec25a9b3def7257a0ec67b02..7fe54036bdf3ef16deef20b2af70ef5f1d4dc065 100644 --- a/docs/source/_build/html/search.html +++ b/docs/source/_build/html/search.html @@ -102,7 +102,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/searchindex.js b/docs/source/_build/html/searchindex.js index 17d613a1f169b783e198b216b7a6dcc6d0582717..a391d4fe688c1fa0639bd127c0b67609b721781b 100644 --- a/docs/source/_build/html/searchindex.js +++ b/docs/source/_build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["api", "auto_examples/emulator/index", "auto_examples/emulator/plot_ppgasp", "auto_examples/emulator/plot_scalargasp", "auto_examples/emulator/sg_execution_times", "auto_examples/inference/index", "auto_examples/inference/plot_active_learning", "auto_examples/inference/plot_bayes_inference", "auto_examples/inference/sg_execution_times", "auto_examples/sampler/index", "auto_examples/sampler/plot_latin", "auto_examples/sampler/plot_metropolis_hastings", "auto_examples/sampler/plot_saltelli", "auto_examples/sampler/sg_execution_times", "auto_examples/sensitivity/index", "auto_examples/sensitivity/plot_sobol_analyze", "auto_examples/sensitivity/sg_execution_times", "auto_examples/simulator/index", "auto_examples/simulator/plot_mass_point_model", "auto_examples/simulator/plot_ravaflow24", "auto_examples/simulator/plot_ravaflow3G", "auto_examples/simulator/plot_run_mass_point_model", "auto_examples/simulator/plot_run_ravaflow24", "auto_examples/simulator/plot_run_ravaflow3G", "auto_examples/simulator/sg_execution_times", "changelog", "emulator/index", "emulator/robustgasp", "examples", "index", "inference/active_learning", "inference/bayes_inference", "inference/index", "quickstart", "refs", "sampler/index", "sampler/latin", "sampler/metropolis_hastings", "sampler/saltelli", "sensitivity/index", "sensitivity/sobol", "simulator/index", "simulator/mass_point_model", "simulator/ravaflow3G", "simulator/run_simulator"], "filenames": ["api.rst", "auto_examples/emulator/index.rst", "auto_examples/emulator/plot_ppgasp.rst", "auto_examples/emulator/plot_scalargasp.rst", "auto_examples/emulator/sg_execution_times.rst", "auto_examples/inference/index.rst", "auto_examples/inference/plot_active_learning.rst", "auto_examples/inference/plot_bayes_inference.rst", "auto_examples/inference/sg_execution_times.rst", "auto_examples/sampler/index.rst", "auto_examples/sampler/plot_latin.rst", "auto_examples/sampler/plot_metropolis_hastings.rst", "auto_examples/sampler/plot_saltelli.rst", "auto_examples/sampler/sg_execution_times.rst", "auto_examples/sensitivity/index.rst", "auto_examples/sensitivity/plot_sobol_analyze.rst", "auto_examples/sensitivity/sg_execution_times.rst", "auto_examples/simulator/index.rst", "auto_examples/simulator/plot_mass_point_model.rst", "auto_examples/simulator/plot_ravaflow24.rst", "auto_examples/simulator/plot_ravaflow3G.rst", "auto_examples/simulator/plot_run_mass_point_model.rst", "auto_examples/simulator/plot_run_ravaflow24.rst", "auto_examples/simulator/plot_run_ravaflow3G.rst", "auto_examples/simulator/sg_execution_times.rst", "changelog.rst", "emulator/index.rst", "emulator/robustgasp.rst", "examples.rst", "index.rst", "inference/active_learning.rst", "inference/bayes_inference.rst", "inference/index.rst", "quickstart.rst", "refs.rst", "sampler/index.rst", "sampler/latin.rst", "sampler/metropolis_hastings.rst", "sampler/saltelli.rst", "sensitivity/index.rst", "sensitivity/sobol.rst", "simulator/index.rst", "simulator/mass_point_model.rst", "simulator/ravaflow3G.rst", "simulator/run_simulator.rst"], "titles": ["API & Theory", "Emulator", "PPGaSP: GP emulation for multi-output functions", "ScalarGaSP: GP emulation for a single-output function", "Computation times", "Inference", "Active learning", "Bayesian inference", "Computation times", "Sampler", "Latin hypercube sampling", "Metropolis Hastings sampling", "Saltelli sampling", "Computation times", "Sensitivity", "Sobol\u2019 analysis", "Computation times", "Simulator", "Mass Point Model", "Ravaflow24 Mixture Model", "Ravaflow3G Mixture Model", "RunSimulator: Mass Point Model", "RunSimulator: Ravaflow24 Mixture Model", "RunSimulator: Ravaflow3G Mixture Model", "Computation times", "Changes", "Emulator", "RobustGaSP", "Example Gallery", "Welcome to PSimPy\u2019s documentation!", "Active Learning", "Bayes Inference", "Inference", "Getting Started", "References", "Sampler", "Latin Hypercube Sampling", "Metropolis Hastings Sampling", "Saltelli Sampling", "Sensitivity", "Sobol\u2019 Sensitivity Analysis", "Simulator", "Mass Point Model", "Ravaflow3G Mixture Model", "Run Simulator"], "terms": {"emul": [0, 4, 6, 15, 28, 29, 30, 32, 33, 34, 36, 40], "infer": [0, 6, 8, 28, 29, 30, 34], "sampler": [0, 6, 7, 10, 11, 12, 15, 28, 29, 30, 31, 36, 37, 38], "sensit": [0, 15, 26, 28, 29, 34, 38], "simul": [0, 2, 3, 6, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 33, 34, 40, 42, 43], "ppgasp": [1, 4, 25, 26], "gp": [1, 4, 30], "multi": [1, 4], "output": [1, 4, 15, 18, 19, 20, 21, 22, 23, 26, 27, 30, 34, 40, 41, 42, 43, 44], "function": [1, 4, 6, 11, 15, 22, 23, 26, 27, 30, 31, 32, 34, 35, 37, 39, 41, 44], "scalargasp": [1, 4, 6, 15, 25, 26, 30], "singl": [1, 4, 42], "download": [1, 2, 3, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 23, 33], "all": [1, 2, 3, 5, 9, 14, 15, 17, 19, 20, 21, 22, 23, 43, 44], "exampl": [1, 2, 3, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 23, 27, 29, 33, 36, 37], "python": [1, 2, 3, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 27, 33, 34, 38, 40, 41, 43, 44], "sourc": [1, 2, 3, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 23, 27, 30, 31, 33, 34, 36, 37, 38, 40, 42, 43, 44], "code": [1, 2, 3, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 23, 34, 43], "emulator_python": 1, "zip": [1, 5, 9, 14, 17], "jupyt": [1, 2, 3, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 23], "notebook": [1, 2, 3, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 23], "emulator_jupyt": 1, "galleri": [1, 2, 3, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 23, 29], "gener": [1, 2, 3, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 23, 27, 36, 37, 40, 43], "sphinx": [1, 2, 3, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 23], "click": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23], "here": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 27, 42, 43], "full": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23], "thi": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 25, 26, 27, 30, 31, 32, 33, 35, 36, 39, 40, 41, 44], "show": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23], "how": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 25, 27], "appli": [2, 3, 34, 37, 43], "gaussian": [2, 3, 6, 11, 26, 27, 30, 32, 33, 34, 40], "process": [2, 3, 6, 21, 22, 23, 26, 27, 30, 32, 33, 34, 40], "us": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 25, 26, 27, 30, 31, 33, 34, 36, 37, 38, 40, 41, 42, 43, 44], "class": [2, 3, 6, 7, 11, 15, 18, 19, 20, 21, 22, 23, 25, 26, 32, 35, 39, 41], "The": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 27, 30, 31, 33, 34, 36, 37, 38, 40, 41, 42, 43, 44], "we": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 27, 33, 36, 43], "ar": [2, 3, 6, 10, 12, 15, 18, 19, 20, 21, 22, 23, 26, 27, 30, 31, 32, 33, 35, 37, 38, 39, 41, 42, 43, 44], "go": [2, 21, 22, 23], "look": [2, 10, 11, 15, 18], "i": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 26, 27, 30, 31, 33, 36, 37, 38, 40, 41, 42, 43, 44], "diamond": 2, "diplomat": 2, "militari": 2, "oper": 2, "non": [2, 42, 43], "warfight": 2, "domain": 2, "comput": [2, 6, 11, 12, 15, 18, 19, 20, 21, 22, 23, 26, 31, 34, 38, 39, 40, 41], "model": [2, 15, 17, 24, 26, 27, 30, 33, 34, 40, 41], "It": [2, 3, 6, 11, 12, 18, 19, 20, 21, 22, 23, 26, 27, 30, 36, 37, 38, 42, 43, 44], "testb": 2, "illustr": [2, 6, 10, 18, 19, 20, 21, 27], "pp": [2, 27], "gasp": [2, 27], "r": [2, 3, 6, 7, 11, 15, 18, 19, 20, 22, 23, 25, 27, 33, 34, 41, 43], "packag": [2, 19, 25, 27, 33, 38, 40], "robustgasp": [2, 25, 33, 34], "see": [2, 15, 21, 27, 40, 43], "gu": [2, 27, 34], "et": [2, 15, 27, 30, 38, 40, 42, 43], "al": [2, 15, 27, 30, 38, 40, 42, 43], "2019": [2, 27, 34], "more": [2, 27, 40, 41, 42, 43], "detail": [2, 15, 27, 30, 38, 40, 43], "ha": [2, 7, 12, 22, 23, 27, 30, 33, 43], "13": [2, 3, 6, 34], "input": [2, 3, 15, 18, 19, 20, 21, 22, 23, 27, 30, 31, 36, 40, 41, 42, 43, 44], "paramet": [2, 3, 6, 7, 11, 15, 18, 19, 20, 21, 22, 23, 26, 27, 30, 31, 33, 34, 36, 37, 38, 40, 42, 43, 44], "5": [2, 3, 6, 7, 10, 11, 15, 18, 21, 27, 34, 42, 43], "name": [2, 19, 20, 21, 22, 23, 27, 30, 31, 33, 42, 43, 44], "mathbf": [2, 7, 11, 27, 31, 41, 42], "y": [2, 3, 6, 10, 12, 15, 18, 19, 20, 27, 30, 36, 40, 41, 42, 43], "f": [2, 3, 6, 12, 15, 19, 20, 21, 22, 23, 27, 34, 41, 42], "x": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 27, 30, 31, 36, 37, 40, 41, 42, 43], "where": [2, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 27, 31, 37, 42, 43], "x_1": [2, 7, 11, 15, 27, 36], "ldot": [2, 27], "x_": [2, 27], "t": [2, 18, 27, 33, 34, 42, 43], "y_1": 2, "y_5": 2, "train": [2, 3, 6, 15, 27, 30, 36], "test": [2, 18, 19, 20, 21, 22, 23, 25], "data": [2, 3, 6, 15, 18, 19, 20, 21, 22, 23, 27, 30, 31, 42, 43, 44], "provid": [2, 19, 20, 27, 30, 37, 42, 43, 44], "folder": [2, 18, 19, 20, 21, 22, 23], "first": [2, 3, 6, 12, 15, 18, 19, 20, 21, 22, 23, 25, 30, 33, 36, 40, 44], "load": [2, 18], "import": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 27, 30, 31, 36, 37, 38, 40, 42, 43, 44], "numpi": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 27, 30, 31, 36, 37, 38, 40, 42, 43, 44], "np": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 25, 31, 37], "o": [2, 6, 7, 10, 11, 12, 18, 19, 20, 21, 22, 23, 34], "dir_data": [2, 18, 19, 20, 21, 22, 23], "path": [2, 18, 19, 20, 21, 22, 23, 33, 42, 43], "abspath": [2, 18, 19, 20, 21, 22, 23], "humanityx": 2, "genfromtxt": 2, "join": [2, 18, 19, 20, 21, 22, 23], "csv": 2, "delimit": [2, 19], "humanityi": 2, "print": [2, 11, 12, 15, 19, 20, 21, 22, 23], "number": [2, 3, 6, 10, 11, 12, 15, 21, 27, 30, 31, 33, 36, 37, 38, 40, 43, 44], "point": [2, 3, 6, 15, 17, 19, 20, 24, 27, 30, 31, 36, 37, 38, 40, 41, 44], "shape": [2, 27, 30, 31, 36, 37, 38, 40, 42, 43, 44], "0": [2, 3, 4, 6, 7, 8, 10, 11, 12, 13, 15, 16, 18, 19, 20, 21, 22, 24, 27, 29, 30, 31, 36, 37, 38, 40, 42, 43, 44], "dimens": [2, 3, 6, 27, 30, 31, 36, 37, 38, 40], "1": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 27, 29, 30, 31, 33, 34, 36, 37, 38, 40, 42, 43, 44], "humanityxt": 2, "humanityyt": 2, "120": 2, "you": [2, 3, 18, 19, 20, 21, 33], "mai": [2, 18, 19, 20, 21, 22, 23, 33, 37], "need": [2, 6, 7, 11, 12, 15, 18, 19, 20, 21, 22, 23, 26, 27, 33, 36, 41, 44], "modifi": [2, 18, 19, 20, 21], "accord": [2, 3, 18, 19, 20, 21, 27], "save": [2, 18, 19, 20, 21, 22, 23, 43, 44], "them": [2, 19, 20, 22, 23, 44], "your": [2, 18, 19, 20, 21, 33], "local": [2, 18, 19, 20, 21, 22, 23, 42], "machin": [2, 18, 19, 20, 21, 22, 23, 30], "human": 2, "correspond": [2, 3, 21, 22, 23, 27, 30, 31, 36, 37, 38, 42, 43, 44], "design": [2, 3, 15, 27, 30, 34], "respons": [2, 3, 15, 27], "respect": [2, 19, 20, 27, 42, 43], "which": [2, 3, 6, 7, 10, 11, 12, 15, 19, 20, 21, 22, 23, 26, 27, 30, 31, 33, 37, 40, 41, 43, 44], "make": [2, 3, 11, 27, 30, 31, 33, 34], "predict": [2, 3, 27, 30, 33], "onc": [2, 6, 19, 20, 21, 27], "true": [2, 3, 6, 10, 12, 15, 19, 20, 21, 22, 23, 27, 37, 38, 40, 42, 43, 44], "valid": [2, 3, 15, 27, 40], "perform": [2, 3, 7, 11, 18, 27, 33, 40, 41, 44], "To": [2, 6, 7, 11, 19, 20, 22, 23, 27], "build": [2, 3, 6, 26, 30], "abov": [2, 3, 10, 12, 15, 18, 19, 20, 21, 22, 23], "from": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 25, 30, 31, 33, 36, 37, 38, 40, 41, 42, 43, 44], "psimpi": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 25, 27, 30, 31, 33, 36, 37, 38, 40, 42, 43, 44], "Then": [2, 3, 6, 11, 27, 36], "creat": [2, 3, 6, 7, 10, 11, 12, 18, 19, 20, 21, 22, 23, 33, 43], "an": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 27, 30, 32, 34, 37, 40, 41, 42, 44], "instanc": [2, 3, 6, 7, 10, 11, 12, 18, 19, 20, 22, 23, 30, 31], "ndim": [2, 3, 6, 7, 10, 11, 12, 15, 27, 30, 31, 36, 37, 38, 40], "must": [2, 3, 19, 20, 22, 23, 30, 37, 40, 43, 44], "specifi": [2, 3, 19, 20, 22, 23, 27, 43], "option": [2, 3, 10, 19, 20, 27, 30, 31, 33, 36, 37, 38, 40, 43, 44], "method": [2, 3, 6, 7, 10, 11, 12, 18, 19, 20, 21, 22, 23, 26, 32, 33, 35, 39, 41], "kernel_typ": [2, 3, 27], "etc": [2, 3, 6, 18, 19, 20, 21], "can": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 25, 26, 27, 30, 31, 33, 36, 37, 38, 40, 41, 42], "set": [2, 3, 6, 10, 12, 15, 18, 21, 22, 23, 25, 27, 30, 31, 33, 37, 44], "up": [2, 3, 6, 27, 30, 31, 37], "desir": [2, 3, 19, 20], "leav": [2, 3, 15, 19, 20, 22, 23, 27], "default": [2, 3, 10, 18, 19, 20, 21, 22, 23, 27, 30, 33, 36, 37, 40, 43, 44], "valu": [2, 3, 6, 7, 15, 18, 19, 20, 21, 22, 23, 26, 27, 30, 31, 36, 37, 38, 40, 42, 43, 44], "next": [2, 6, 11], "base": [2, 3, 6, 12, 15, 21, 22, 23, 27, 30, 31, 33, 34, 37, 38, 40, 41, 43], "upper": [2, 3, 6, 15, 25, 30, 31, 36, 37, 38], "bound": [2, 3, 6, 7, 10, 12, 15, 25, 27, 30, 31, 36, 37, 38], "rang": [2, 3, 6, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 27, 36, 40, 43], "299": 2, "331": 2, "54": [2, 6], "297": [2, 34], "1066": 2, "298": 2, "2833": 2, "9167": 2, "2838": 2, "6795": [2, 6], "7972": 2, "2889": 2, "300": [2, 6, 42, 43], "6043": [2, 6], "4275": 2, "301": 2, "0958": 2, "initi": [2, 3, 6, 15, 18, 21, 27, 30, 36, 37, 40, 42], "98662": 2, "9908": 2, "942133": 2, "965665": 2, "978334": 2, "965676": 2, "99359": 2, "975944": 2, "985778": 2, "6": [2, 6, 7, 10, 18, 19, 20, 34, 36, 42], "012085": 2, "008551": 2, "021916": 2, "start": [2, 3, 6, 15, 21, 22, 23, 29, 37], "optim": [2, 3, 6, 15, 27, 30], "iter": [2, 3, 6, 10, 11, 15, 30, 36, 37], "46": [2, 34], "margin": [2, 3, 6, 15, 27], "posterior": [2, 3, 6, 7, 15, 30, 31, 32, 34], "5279": 2, "534": [2, 20, 24], "25": [2, 6, 15], "46132": 2, "2": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 22, 23, 27, 29, 30, 31, 34, 36, 37, 38, 40, 42, 43], "891428": 2, "30812": 2, "26": [2, 6, 21], "95519": 2, "291": 2, "1829": 2, "48": 2, "17274": 2, "84": [2, 6], "56133": 2, "874385": 2, "39": [2, 3, 6], "12121": 2, "51": 2, "81304": 2, "5407651": 2, "728696": 2, "020605": 2, "nugget": [2, 3, 6, 15, 27], "converg": [2, 3, 6, 15], "12": [2, 6, 15, 16, 19, 21, 34], "37503": 2, "38367": 2, "28307": 2, "33172": 2, "3579": 2, "33174": 2, "38944": 2, "35296": 2, "37329": 2, "42767": 2, "42037": 2, "44799": 2, "43": 2, "308119": 2, "1831": 2, "17271": 2, "56135": 2, "1212": 2, "81301": 2, "With": [2, 3], "ani": [2, 3, 15, 18, 27, 31, 36], "arbitrari": [2, 3], "matplotlib": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20], "pyplot": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20], "plt": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20], "fig": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20], "ax": [2, 3, 6, 7, 10, 11, 12, 18, 19, 20], "subplot": [2, 3, 6, 7, 10, 11, 15, 18, 19, 20], "figsiz": [2, 3, 6, 7, 10, 11, 15, 18, 19, 20], "15": [2, 3, 6, 18, 21, 34], "set_xlabel": [2, 3, 6, 7, 10, 11, 12, 18, 19, 20], "actual": [2, 3], "y_": 2, "set_ylabel": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20], "set_xlim": [2, 3, 6, 7, 10, 11, 18], "min": [2, 3], "max": [2, 3, 21, 27], "set_ylim": [2, 3, 6, 7, 10, 11], "_": [2, 3, 6, 10, 27], "plot": [2, 3, 6, 7, 10, 15, 18], "errorbar": [2, 3], "3": [2, 3, 6, 12, 15, 18, 22, 23, 25, 27, 33, 34, 40, 42, 43], "fmt": [2, 3], "linestyl": [2, 3, 15], "label": [2, 3, 6, 27], "std": [2, 3, 40], "legend": [2, 3, 6], "tight_layout": [2, 3, 6, 7, 11, 12, 15, 18, 19, 20], "also": [2, 3, 7, 12, 21, 22, 23, 26, 27, 33, 37, 40], "draw": [2, 3, 6, 10, 11, 12, 15, 27, 30, 31, 36, 37, 38], "sampl": [2, 3, 6, 7, 9, 13, 15, 21, 30, 31, 35, 40, 44], "ppgaspsampl": 2, "nsampl": [2, 3, 7, 10, 11, 15, 27, 31, 36, 37], "10": [2, 3, 6, 7, 10, 11, 12, 18, 19, 20, 34, 43], "total": [2, 3, 4, 6, 7, 8, 10, 11, 12, 13, 15, 16, 18, 19, 20, 21, 22, 23, 24, 34, 40, 42], "run": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 25, 26, 27, 30, 31, 33, 34, 40, 41, 42, 43], "time": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 26, 27, 42, 43, 44], "script": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23], "minut": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23], "4": [2, 3, 6, 7, 10, 11, 15, 20, 21, 22, 23, 27, 34, 37, 42, 43], "728": [2, 4], "second": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 38, 40, 42, 43, 44], "plot_ppgasp": [2, 4], "py": [2, 3, 4, 6, 7, 8, 10, 11, 12, 13, 15, 16, 18, 19, 20, 21, 22, 23, 24, 33], "ipynb": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23], "task": [3, 21, 26, 30, 40, 44], "sin": [3, 15], "few": 3, "given": [3, 6, 7, 10, 11, 12, 18, 19, 20, 21, 22, 23, 27, 30, 31, 37, 40, 41, 42, 43, 44], "below": [3, 11, 12, 15, 18, 27], "8": [3, 6, 15, 27, 34, 42], "select": [3, 30], "def": [3, 6, 7, 11, 15, 22, 23], "return": [3, 6, 7, 11, 15, 18, 19, 21, 22, 23, 26, 27, 30, 31, 36, 37, 38, 40, 42, 43, 44], "arang": [3, 18, 19, 20, 21], "1983": 3, "214": 3, "66427": 3, "79116": 3, "237467": 3, "21875": 3, "9": [3, 6, 15, 25, 27, 33, 34, 42], "one": [3, 6, 7, 12, 15, 19, 20, 21, 22, 23, 27, 30, 31, 36, 40, 43], "out": [3, 15, 27, 34, 41], "cross": [3, 18, 27], "loo_valid": [3, 27], "let": [3, 10, 15, 27, 42], "": [3, 6, 7, 10, 11, 15, 18, 19, 20, 21, 27, 30, 33, 34, 35, 38, 42, 43], "v": [3, 18, 19, 20, 43], "error": [3, 21, 22, 23], "bar": [3, 15], "indic": [3, 12, 15, 30, 31, 34, 37, 38, 39, 40], "standard": [3, 27], "deviat": [3, 27], "our": [3, 22, 23, 33], "deposit": [3, 43], "testing_input": [3, 27, 30], "should": [3, 6, 11, 27, 30, 31, 33, 36, 38, 43, 44], "note": [3, 6, 11, 18, 22, 23, 27, 30, 33, 36, 43], "testing_trend": [3, 27, 30], "trend": [3, 27, 30], "dure": [3, 22, 23], "mean": [3, 11, 12, 22, 23, 27, 30, 31, 37, 43], "scatter": [3, 6, 7, 10, 11, 12, 15, 18], "c": [3, 6, 7, 10, 11, 15, 18, 27, 42], "k": [3, 6, 27, 41, 42], "zorder": [3, 6], "fill_between": 3, "alpha": [3, 6, 7, 11, 15, 27, 42], "95": [3, 6, 15, 40], "ci": 3, "xlabel": 3, "ylabel": 3, "xlim": 3, "sphinx_gallery_thumbnail_numb": [3, 11], "nois": 3, "free": 3, "often": [3, 27, 33, 36, 44], "case": [3, 6, 12, 15, 19, 20, 21, 22, 23, 30, 36], "determinist": [3, 40], "If": [3, 12, 15, 19, 20, 21, 22, 23, 27, 30, 31, 33, 36, 37, 38, 40, 42, 43, 44], "deal": 3, "noisi": 3, "nugget_est": [3, 27], "estim": [3, 6, 7, 15, 27, 31, 32, 34, 37], "558": [3, 4], "plot_scalargasp": [3, 4], "00": [4, 8, 13, 16, 24], "05": [4, 11, 13], "286": 4, "execut": [4, 8, 13, 16, 24, 41, 44], "auto_examples_emul": 4, "file": [4, 8, 13, 16, 19, 20, 21, 22, 23, 24, 30, 42, 43, 44], "04": [4, 13, 24, 34], "mb": [4, 8, 13, 16, 24], "bayesian": [5, 6, 8, 27, 30, 31, 34], "activ": [5, 8, 33, 34], "learn": [5, 8, 27, 34], "inference_python": 5, "inference_jupyt": 5, "activelearn": [6, 32], "unnorm": [6, 7, 11, 30, 31, 32], "involv": [6, 22, 23, 30], "onli": [6, 22, 23, 30, 40, 41, 43, 44], "purpos": [6, 10, 22, 23, 30, 38], "rather": [6, 27], "than": [6, 27, 30, 43], "real": [6, 15, 31, 41, 44], "For": [6, 10, 19, 20, 21, 27, 30, 31, 43], "simplic": [6, 15], "requir": [6, 10, 11, 12, 18, 19, 20, 21, 22, 23, 25, 30, 41, 42, 43, 44], "argument": [6, 7, 30, 31, 37], "includ": [6, 18, 19, 20, 21, 22, 23, 33, 42, 43], "likelihood": [6, 7, 27, 30, 31, 34], "pure": [6, 41], "made": 6, "realist": 6, "refer": [6, 27, 29, 30, 33, 43], "zhao": [6, 15, 27, 30, 34, 42], "kowalski": [6, 30, 34], "2022": [6, 30, 34], "defin": [6, 11, 15, 21, 22, 23, 27, 30, 33, 41, 42, 43, 44], "prior": [6, 7, 30, 31], "distribut": [6, 10, 11, 15, 27, 31, 32, 36, 37], "its": [6, 7, 10, 11, 15, 19, 20, 21, 27, 33, 36, 37, 40, 43], "variabl": [6, 10, 12, 21, 22, 23, 27, 30, 33, 36, 44], "observ": [6, 30, 31], "thei": [6, 19, 20], "basic": [6, 27, 31], "problem": [6, 12, 27, 31, 42], "arrai": [6, 7, 10, 11, 12, 15, 19, 20, 21, 22, 23, 27, 30, 31, 36, 37, 38, 40, 42, 43, 44], "x1": [6, 7, 11, 15, 31, 37], "x2": [6, 7, 11, 15, 31, 37], "y1": 6, "y2": 6, "uniform": [6, 7], "l": [6, 7, 27, 31], "exp": [6, 7, 11, 27], "100": [6, 7, 11, 12, 15, 40], "imagin": 6, "complex": [6, 31, 41], "solver": [6, 42], "computation": [6, 15, 26, 27, 30], "feasibl": 6, "grid": [6, 7, 10, 15, 31, 32, 43], "metropoli": [6, 7, 9, 13, 31, 32, 35], "hast": [6, 7, 9, 13, 31, 32, 35], "becaus": 6, "evalu": [6, 15, 26, 27, 30, 34, 40], "mani": [6, 15, 31, 41], "essenti": [6, 27, 41, 44], "lead": [6, 10, 12, 15, 22, 23, 27], "therefor": [6, 27, 31], "resort": [6, 15], "small": 6, "do": [6, 22, 23, 43], "so": [6, 41], "pass": [6, 21], "follow": [6, 7, 10, 11, 12, 15, 18, 21, 22, 23, 27, 33, 36, 37, 42], "run_sim_obj": [6, 30], "runsimul": [6, 17, 24, 30, 41], "carri": 6, "inform": [6, 15, 19, 20, 30, 43, 44], "lhs_sampler": [6, 10, 15, 30], "lh": [6, 10, 15, 30, 35], "order": [6, 12, 15, 21, 33, 38, 40, 43], "init": 6, "scalar_gasp": [6, 15, 30], "structur": [6, 30], "run_simul": [6, 22, 23, 44], "var_inp_paramet": [6, 21, 22, 23, 44], "seed": [6, 7, 10, 11, 15, 36, 37, 40], "object": [6, 21, 22, 23, 30], "active_learn": [6, 30, 33], "call": [6, 7, 10, 11, 12, 18, 19, 20, 21, 22, 23, 30, 31, 37, 41, 43, 44], "initial_simul": [6, 30], "iterative_emul": [6, 30], "new": [6, 11, 27, 30, 31, 37], "alloc": 6, "40": [6, 7], "60": 6, "adapt": [6, 27, 34, 43], "n0": [6, 30], "niter": [6, 30], "init_var_sampl": [6, 30], "init_sim_output": [6, 30], "mode": [6, 15, 19, 27, 30, 40], "parallel": [6, 15, 21, 22, 23, 27, 30, 34, 40, 41, 44], "max_work": [6, 15, 21, 22, 23, 30, 40, 44], "var_sampl": [6, 21, 22, 23, 30, 44], "420": 6, "7131": 6, "416": 6, "6473": 6, "414262": 6, "332945": 6, "23": [6, 24], "146": 6, "5038": 6, "30": [6, 15, 22, 23, 27, 34], "59659": 6, "130": 6, "5917": 6, "fals": [6, 12, 15, 19, 20, 22, 23, 27, 37, 38, 42, 43, 44], "9828751": 6, "9733764": 6, "16": [6, 21, 34], "5982": 6, "6064": 6, "418": 6, "0103": 6, "415": 6, "1878": 6, "360206": 6, "303755": 6, "27": [6, 21], "148": 6, "6792": 6, "19535": 6, "133": 6, "3286": 6, "9589025": 6, "9524277": 6, "19529": 6, "3285": 6, "372": 6, "0419": 6, "369": 6, "5298": 6, "7": [6, 15, 27, 34, 43], "440838": 6, "390595": 6, "34": [6, 20], "149": 6, "9595": 6, "64772": 6, "135": 6, "0584": 6, "9360715": 6, "9297509": 6, "64717": 6, "0548": 6, "412": 6, "0792": 6, "409": 6, "2967": 6, "241583": 6, "185933": 6, "28": 6, "151": 6, "304": 6, "31": [6, 21], "21546": 6, "136": [6, 34], "8634": 6, "9143024": 6, "9081287": 6, "33": 6, "21602": 6, "8597": 6, "373": 6, "5991": 6, "371": 6, "0765": 6, "471983": 6, "421529": 6, "152": 6, "6009": 6, "32": 6, "2851": 6, "141": 6, "3769": 6, "8935228": 6, "8874894": 6, "28086": 6, "3732": 6, "363": [6, 34], "7651": 6, "361": 6, "3088": 6, "275302": 6, "226176": 6, "153": 6, "5419": 6, "43467": 6, "787": 6, "8736668": 6, "8677675": 6, "43465": 6, "388": 6, "6202": 6, "385": 6, "9961": 6, "772404": 6, "719922": 6, "154": 6, "9929": 6, "6944": 6, "2097": 6, "854674": 6, "848903": 6, "6947": 6, "2113": 6, "368": 6, "5149": 6, "366": 6, "0266": 6, "370298": 6, "320531": 6, "22": [6, 21], "155": 6, "4764": 6, "87171": 6, "8922": 6, "8364895": 6, "8308412": 6, "4765": 6, "90549": 6, "0137": 6, "303": 6, "005": [6, 34], "959": 6, "060099": 6, "019179": 6, "14": [6, 15, 21, 34], "8802": 6, "04396": 6, "6136": 6, "8190626": 6, "813532": 6, "04591": 6, "6189": 6, "271": 6, "7327": 6, "269": 6, "8979": 6, "434655": 6, "397958": 6, "156": 6, "1383": 6, "47655": 6, "3798": 6, "802347": 6, "7969293": 6, "46977": 6, "4259": 6, "229": 6, "754": 6, "228": 6, "2026": 6, "595079": 6, "564052": 6, "184": 6, "50828": 6, "8102": 6, "7863001": 6, "7809907": 6, "50295": 6, "8055": 6, "206": 6, "5918": 6, "205": 6, "1968": 6, "131835": 6, "103936": 6, "2348": 6, "79817": 6, "165": 6, "7708824": 6, "7656772": 6, "82609": 6, "1902": 6, "258": 6, "3488": 6, "256": 6, "166975": 6, "132086": 6, "4062": 6, "76576": 6, "157": 6, "0386": 6, "7560578": 6, "7509526": 6, "73883": 6, "9472": 6, "237": 6, "2817": 6, "235": 6, "745633": 6, "713589": 6, "5552": 6, "35": [6, 43], "36218": 6, "5205": 6, "7417925": 6, "7367837": 6, "37291": 6, "5609": 6, "250": 6, "7264": 6, "249": 6, "0334": 6, "014527": 6, "980667": 6, "21": [6, 34], "8768": 6, "90648": 6, "161": 6, "054": 6, "7280556": 6, "7231396": 6, "8767": 6, "92228": 6, "1123": 6, "238": 6, "9065": 6, "2933": 6, "778129": 6, "745866": 6, "6342": 6, "36": [6, 20], "30829": 6, "162": 6, "0199": 6, "7148183": 6, "7099916": 6, "30018": 6, "8524": 6, "245": 6, "248": 6, "243": [6, 34], "592": 6, "904959": 6, "871839": 6, "17": [6, 34], "3684": 6, "27097": 6, "5809": 6, "7020536": 6, "6973131": 6, "28256": 6, "5015": 6, "8438": 6, "91003": 6, "876875": 6, "29": [6, 21, 23], "014": 6, "15503": 6, "4561": 6, "6897369": 6, "6850796": 6, "0141": 6, "19571": 6, "4856": 6, "5607": 6, "9566": 6, "751214": 6, "719132": 6, "8456": 6, "99431": 6, "166": 6, "8476": 6, "6778449": 6, "6732679": 6, "8455": 6, "9843": 6, "8112": 6, "218": 6, "5445": 6, "217": 6, "0688": 6, "37089": 6, "341377": 6, "2612": 6, "37": 6, "52584": 6, "170": 6, "9858": 6, "666356": 6, "6618565": 6, "261": 6, "5272": 6, "9907": 6, "1098": 6, "226": 6, "5696": 6, "562197": 6, "531391": 6, "6105": 6, "33828": 6, "173": 6, "6169": 6, "6552501": 6, "6508256": 6, "6106": 6, "20479": 6, "2666": 6, "211": 6, "684": 6, "210": 6, "2546": 6, "23368": 6, "205093": 6, "4968": 6, "0747": 6, "6445083": 6, "6401563": 6, "8923": 6, "52424": 6, "017": 6, "199": 6, "9789": 6, "198": 6, "6286": 6, "999579": 6, "972572": 6, "0734": 6, "55227": 6, "0759": 6, "634113": 6, "6298312": 6, "0733": 6, "52729": 6, "172": [6, 15], "8307": 6, "202": 6, "9237": 6, "201": 6, "5534": 6, "058473": 6, "031069": 6, "171": [6, 15], "57767": 6, "5286": 6, "6240477": 6, "6198339": 6, "1709": 6, "52827": 6, "3748": 6, "190": [6, 19], "9983": 6, "189": 6, "7086": 6, "819965": 6, "794172": 6, "4187": 6, "85886": 6, "177": 6, "5027": 6, "6142969": 6, "610149": 6, "4192": 6, "86442": 6, "4215": 6, "5705": 6, "183": 6, "3242": 6, "69141": 6, "666484": 6, "150": 6, "3527": 6, "92872": 6, "0128": 6, "6048462": 6, "6007621": 6, "24": [6, 21], "352": 6, "92941": 6, "176": 6, "9876": 6, "689": 6, "2934": 6, "13378": 6, "105867": 6, "2293": 6, "73939": 6, "179": 6, "5156": 6, "5956819": 6, "5916596": 6, "2285": 6, "6686": 6, "2687": 6, "204": 6, "4555": 6, "203": 6, "0749": 6, "08911": 6, "061499": 6, "0359": 6, "07659": 6, "181": [6, 34], "8027": 6, "5867911": 6, "5828289": 6, "0361": 6, "09612": 6, "862": 6, "207": 6, "5545": 6, "15109": 6, "123061": 6, "147": 6, "2549": 6, "89036": 6, "8898": 6, "5781618": 6, "5742579": 6, "18": [6, 21, 23, 24, 29], "2555": 6, "87001": 6, "82": 6, "9279": 6, "8008": 6, "338559": 6, "316015": 6, "0908": 6, "10173": 6, "5697827": 6, "5659353": 6, "091": 6, "11888": 6, "144": 6, "6147": 6, "54517": 6, "188": 6, "5363": 6, "5616429": 6, "5578505": 6, "19": [6, 34], "6151": 6, "27548": 6, "187": 6, "7642": 6, "9825": 6, "882": 6, "259651": 6, "23764": 6, "143": 6, "1453": 6, "74403": 6, "5537325": 6, "5499935": 6, "1451": 6, "74424": 6, "158": 6, "5408": 6, "4703": 6, "170816": 6, "149405": 6, "6959": 6, "65865": 6, "5460417": 6, "5423547": 6, "6958": 6, "65944": 6, "683": 6, "6385": 6, "09366": 6, "072771": 6, "140": 6, "1644": 6, "1494": 6, "5385617": 6, "5349251": 6, "1642": 6, "1205": 6, "7268": 6, "6685": 6, "134536": 6, "113371": 6, "138": 6, "6449": 6, "25719": 6, "5312838": 6, "5276964": 6, "6457": 6, "20511": 6, "159": 6, "9013": 6, "8216": 6, "198026": 6, "176432": 6, "799": 6, "12962": 6, "5242001": 6, "5206605": 6, "7995": 6, "23426": 6, "0852": 6, "0245": 6, "141704": 6, "12049": 6, "9791": 6, "28276": 6, "5173027": 6, "5138097": 6, "11": [6, 34], "9787": 6, "25762": 6, "7189": 6, "681": 6, "074379": 6, "05362": 6, "137": [6, 24], "3328": 6, "89731": 6, "5105845": 6, "5071368": 6, "3327": 6, "89795": 6, "3891": 6, "3129": 6, "187782": 6, "166257": 6, "134": 6, "9406": 6, "6762": 6, "5040385": 6, "5006351": 6, "9398": 6, "83421": 6, "832": 6, "7527": 6, "196639": 6, "175055": 6, "132": 6, "5023": 6, "64711": 6, "4976583": 6, "4942979": 6, "5029": 6, "69952": 6, "0987": 6, "0785": 6, "021975": 6, "00157": 6, "9007": 6, "04164": 6, "4914376": 6, "4881192": 6, "9016": 6, "90702": 6, "5391": 6, "4821": 6, "130783": 6, "109643": 6, "127": 6, "8529": 6, "65861": 6, "4853704": 6, "482093": 6, "8537": 6, "65893": 6, "6837": 6, "7068": 6, "893674": 6, "874135": 6, "126": 6, "3069": 6, "14805": 6, "4794513": 6, "4762139": 6, "3061": 6, "14945": 6, "4263": 6, "4308": 6, "948526": 6, "928616": 6, "123": 6, "3139": 6, "00776": 6, "4736748": 6, "4704763": 6, "3124": 6, "00792": 6, "8343": 6, "8766": 6, "836686": 6, "817532": 6, "121": 6, "3189": 6, "40012": 6, "4680358": 6, "4648754": 6, "3199": 6, "3783": 6, "8069": 6, "8696": 6, "776137": 6, "757392": 6, "119": 6, "9576": 6, "60408": 6, "4625295": 6, "4594063": 6, "9574": 6, "6049": 6, "7754": 6, "8519": 6, "735509": 6, "717038": 6, "117": 6, "3956": 6, "9288": 6, "4571512": 6, "4540644": 6, "3963": 6, "93923": 6, "122": 6, "4858": 6, "6587": 6, "449715": 6, "433174": 6, "1863": 6, "45945": 6, "4518966": 6, "4488452": 6, "1857": 6, "45861": 6, "124": 6, "7933": 6, "9507": 6, "495867": 6, "479014": 6, "114": 6, "3601": 6, "5128": 6, "4467614": 6, "4437447": 6, "51309": 6, "8507": 6, "0279": 6, "437013": 6, "420558": 6, "112": [6, 34], "4649": 6, "12543": 6, "4417416": 6, "4387588": 6, "4657": 6, "13681": 6, "2532": 6, "113": 6, "4817": 6, "285064": 6, "269635": 6, "110": 6, "9429": 6, "20": [6, 10, 12, 18, 19, 20, 21, 22, 23, 27, 43], "87695": 6, "4368334": 6, "4338837": 6, "9428": 6, "87687": 6, "107": 6, "5519": 6, "106": 6, "8257": 6, "151038": 6, "136513": 6, "109": 6, "6259": 6, "96839": 6, "432033": 6, "4291158": 6, "6258": 6, "96622": 6, "105": 6, "9321": 6, "2168": 6, "118642": 6, "104337": 6, "2887": 6, "81197": 6, "427337": 6, "4244515": 6, "2885": 6, "80782": 6, "103": 6, "7434": 6, "0429": 6, "074868": 6, "060858": 6, "104": 6, "942": 6, "35122": 6, "422742": 6, "4198875": 6, "3513": 6, "102": 6, "2359": 6, "101": 6, "5455": 6, "044717": 6, "030911": 6, "382": 6, "92818": 6, "4182447": 6, "4154206": 6, "38": 6, "3824": 6, "93008": 6, "947": 6, "2383": 6, "098939": 6, "084767": 6, "98": 6, "23267": 6, "94201": 6, "4138422": 6, "4110477": 6, "23364": 6, "94106": 6, "99": 6, "2743": 6, "1198": 6, "105486": 6, "94": 6, "36122": 6, "8138": 6, "4095313": 6, "406766": 6, "36013": 6, "81444": 6, "08534": 6, "44329": 6, "901707": 6, "888866": 6, "14024": 6, "52605": 6, "4053093": 6, "4025725": 6, "13983": 6, "52612": 6, "92": 6, "02781": 6, "91": [6, 19], "4064": 6, "840556": 6, "828128": 6, "90551": 6, "93414": 6, "4011735": 6, "3984647": 6, "90572": 6, "93369": 6, "2185": 6, "5215": 6, "06437": 6, "05043": 6, "85": 6, "41126": 6, "01591": 6, "3971213": 6, "3944398": 6, "40862": 6, "01616": 6, "12819": 6, "83": 6, "56012": 6, "682564": 6, "671202": 6, "90": [6, 43], "63195": 6, "03987": 6, "39315": 6, "3904954": 6, "63178": 6, "02786": 6, "finish": [6, 19, 20], "obtain": [6, 15, 27, 31, 37], "final": [6, 37], "logarithm": [6, 7, 30, 31, 37, 43], "approx_ln_pxl": [6, 30], "contour": [6, 7], "gridestim": [6, 7, 32], "grid_estim": [6, 7], "ln_pxl": [6, 7, 30, 31], "x_ndim": [6, 7, 31], "nbin": [6, 7, 31], "50": [6, 7, 15, 21, 22, 23], "marker": [6, 7, 10, 11, 12, 15, 18], "pick": [6, 10, 12, 30, 36], "1e": [6, 7, 42], "nan": [6, 7], "transpos": [6, 7, 11, 18, 27], "level": [6, 7, 11, 18, 19, 20, 30, 40], "colorbar": [6, 7, 18, 19, 20], "set_titl": [6, 7, 10, 11, 18, 19, 20], "860": 6, "plot_active_learn": [6, 8], "p": [7, 11, 27, 31, 34, 41, 43], "x_2": [7, 11, 15], "01": [7, 11, 24, 34], "x_i": [7, 15], "d": [7, 18, 19, 31, 42], "left": [7, 11, 15, 27, 31, 36, 42], "frac": [7, 11, 27, 31, 42], "right": [7, 11, 15, 27, 30, 31, 36, 41, 42], "bayes_infer": [7, 31], "figur": [7, 10, 11, 12, 15, 18, 36, 42], "mask": 7, "insignific": 7, "metropolishastingsestim": [7, 32], "mh_sampler": [7, 11, 31], "take": [7, 15, 21, 22, 23, 30, 42], "metropolishast": [7, 11, 31, 35], "mh_estim": 7, "metropolis_hast": [7, 11, 37], "scipi": [7, 11, 30, 42], "stat": [7, 11], "multivariate_norm": [7, 11], "init_st": [7, 11, 37], "f_sampl": [7, 11, 37], "rv": [7, 11], "nburn": [7, 11, 37], "nthin": [7, 11, 37], "kwgs_f_sampl": [7, 11, 37], "random_st": [7, 11], "random": [7, 10, 11, 12, 27, 36, 37, 40], "default_rng": [7, 11], "5000": [7, 11, 18], "mh_sampl": [7, 11, 31, 37], "mh_accept": [7, 11, 31, 37], "drawn": [7, 27, 31, 36, 37, 40], "poperti": 7, "mh": 7, "besid": 7, "instanti": 7, "ln_prior": [7, 31], "ln_likelihood": [7, 31], "natur": [7, 30, 31, 37], "product": [7, 11, 21, 22, 23, 27, 30, 31], "619": [7, 8], "plot_bayes_infer": [7, 8], "06": [8, 42], "auto_examples_infer": 8, "000": [8, 24], "saltelli": [9, 13, 15, 34, 35, 40], "latin": [9, 13, 15, 30, 35], "hypercub": [9, 13, 15, 30, 35], "sampler_python": 9, "sampler_jupyt": 9, "have": [10, 22, 23, 27, 30, 33, 43], "two": [10, 12, 15, 22, 23, 30, 31, 34], "dimension": [10, 12, 27, 31, 34, 36, 41], "each": [10, 11, 15, 21, 22, 23, 27, 30, 31, 36, 37, 38, 40, 42, 43, 44], "uniformli": [10, 15, 36], "same": [10, 21, 22, 23, 31], "everi": 10, "when": [10, 11, 21, 22, 23, 40], "lhs_sampl": [10, 36], "blue": [10, 11], "criterion": [10, 15, 36, 43], "visibl": 10, "major": [10, 15], "axi": [10, 15, 31, 44], "both": [10, 15, 27, 43], "There": 10, "differ": [10, 15, 21, 22, 23, 44], "other": [10, 15, 18, 19, 20, 21, 22, 23, 27, 33, 36], "center": [10, 11, 36], "maximin": [10, 15, 36], "And": 10, "500": [10, 19, 20, 21], "251": [10, 13], "plot_latin": [10, 13], "target": [11, 37], "probabl": [11, 30, 31, 36, 37], "propto": 11, "hand": 11, "side": 11, "equat": [11, 27, 31, 41, 42], "densiti": [11, 30, 31, 37], "sinc": [11, 21, 27], "integr": [11, 31, 42], "equal": [11, 36, 37, 43], "happen": 11, "normal": [11, 27, 31, 37, 42], "constant": [11, 27, 30, 31, 37], "unknown": [11, 27, 31], "difficult": [11, 37], "target_dist": 11, "els": 11, "like": [11, 15, 18, 27, 31, 34, 37], "itertool": [11, 21, 22, 23], "x1_valu": 11, "linspac": 11, "x2_valu": 11, "target_valu": 11, "zero": [11, 27, 30], "j": [11, 27, 34, 43], "contourf": [11, 18, 19, 20], "cmap": 11, "choos": [11, 22, 23, 30, 37], "propos": [11, 31, 37], "determin": [11, 30, 43], "state": [11, 18, 21, 31, 37], "current": [11, 26, 32, 35, 37, 39, 41], "A": [11, 27, 30, 34, 37, 42, 43, 44], "usual": [11, 27, 37], "choic": 11, "reproduc": 11, "1000": [11, 12, 18], "accept": [11, 31, 37], "ratio": [11, 27, 31, 37, 43], "3712": 11, "704": [11, 13], "plot_metropolis_hast": [11, 13], "assum": [12, 15, 27, 42], "three": [12, 34, 36, 44], "z": [12, 18, 34, 36, 42], "200": [12, 15, 18, 21], "2000": [12, 18, 19, 20, 21], "saltelli_sampl": [12, 15], "calc_second_ord": [12, 15, 38, 40], "nbase": [12, 15, 38], "128": 12, "In": [12, 15, 19, 20, 21, 22, 23, 27, 30, 31, 33, 36, 42, 43], "sobol": [12, 14, 16, 35, 38, 39], "analysi": [12, 14, 16, 33, 34, 38, 39], "effect": [12, 15, 34, 40, 42, 43], "shown": [12, 31, 36, 42], "add_subplot": 12, "project": [12, 33], "3d": 12, "set_zlabel": 12, "len": [12, 21, 22, 23, 44], "640": 12, "want": [12, 21, 22, 23, 27, 33, 36, 41], "1024": [12, 15], "reason": [12, 21, 22, 23], "index": [12, 15, 34, 40], "directli": [12, 27, 31, 43], "355": [12, 13], "plot_saltelli": [12, 13], "310": 13, "auto_examples_sampl": 13, "sensitivity_python": 14, "sensitivity_jupyt": 14, "sobolanalyz": [15, 39], "u": [15, 27, 36, 42], "consid": [15, 36, 43], "ishigami": 15, "le": [15, 34], "gratiet": [15, 34], "2014": [15, 34], "x_3": 15, "mathrm": 15, "_2": 15, "pi": 15, "x3": 15, "variat": [15, 27], "quantifi": 15, "contribut": 15, "interact": [15, 34], "step": [15, 18, 21, 27, 30, 33, 37, 42, 43], "sobol_analyz": 15, "s_re": [15, 40], "s1": [15, 40], "analyt": [15, 31, 41], "solut": [15, 30, 42], "314": 15, "442": 15, "31430871": 15, "44545644": 15, "01325799": 15, "result": [15, 18, 19, 20, 27, 31], "repres": [15, 19, 20, 21, 22, 23, 27, 31, 37, 42, 43], "well": [15, 18], "confid": [15, 40], "interv": [15, 36, 40], "red": [15, 18], "star": 15, "name_var": 15, "st": [15, 40], "color": 15, "69b3a2": 15, "3399e6": 15, "width": 15, "capsiz": 15, "ax1": 15, "yerr": 15, "set_xtick": 15, "set_xticklabel": 15, "tick_param": 15, "bottom": 15, "labelcolor": 15, "yaxi": 15, "grei": 15, "ax2": 15, "twinx": 15, "between": [15, 27, 33], "effet": 15, "interest": [15, 22, 23, 43, 44], "world": [15, 31, 41, 44], "applic": [15, 43], "veri": 15, "expens": [15, 26, 27, 30, 33, 34], "techniqu": [15, 30], "effici": [15, 30, 33, 34], "conduct": 15, "2021": [15, 27, 34, 42], "theori": [15, 29, 30, 38, 40, 43], "approxim": [15, 26, 27, 30, 31, 34, 37], "befor": [15, 22, 23, 31, 33, 43], "move": 15, "induc": [15, 42, 43], "uncertainti": [15, 26, 27, 30, 33, 34, 44], "account": [15, 42], "realiz": [15, 21, 27, 40], "n": [15, 21, 27, 31, 36, 38], "3988": 15, "3996": 15, "0213": 15, "427975": 15, "447992": 15, "440426": 15, "284": 15, "0714": 15, "183999": 15, "786247": 15, "315419": 15, "721972": 15, "732027": 15, "728226": 15, "28708846": 15, "47245889": 15, "0073529": 15, "674": [15, 16], "plot_sobol_analyz": [15, 16], "auto_examples_sensit": 16, "mass": [17, 19, 20, 24, 33, 34, 41, 43], "ravaflow3g": [17, 19, 24, 25, 33], "mixtur": [17, 24], "simulator_python": 17, "simulator_jupyt": 17, "movement": [18, 42], "masspoint": [18, 21, 42], "topographi": [18, 19, 20, 21, 42], "masspointmodel": [18, 21, 22, 23, 41], "mpm": [18, 21], "topograph": [18, 21, 34], "digit": [18, 21], "elev": [18, 19, 20, 21, 22, 23, 42, 43], "esri": [18, 21, 42], "ascii": [18, 19, 20, 21, 42], "format": [18, 19, 20, 21, 42, 43], "friction": [18, 21, 42, 43], "coeffici": [18, 21, 42, 43], "coulomb": [18, 21, 42], "turbul": [18, 21, 42, 43], "locat": [18, 19, 20, 21, 36, 42, 43], "veloc": [18, 19, 20, 21, 42, 43], "end": [18, 21, 22, 23, 27, 42, 43], "synthet": [18, 19, 20, 21], "synthetic_topo": [18, 19, 20, 21, 22, 23], "asc": [18, 19, 20, 21, 22], "linecach": [18, 19, 20], "visul": [18, 19, 20], "dot": [18, 27], "header": [18, 19, 20], "getlin": [18, 19, 20], "header_valu": [18, 19, 20], "float": [18, 19, 20, 25, 27, 30, 40, 42, 43], "h": [18, 19, 20, 27, 34, 43], "split": [18, 19, 20], "strip": [18, 19, 20], "ncol": [18, 19, 20], "nrow": [18, 19, 20], "xll": [18, 19, 20], "yll": [18, 19, 20], "cellsiz": [18, 19, 20, 43], "int": [18, 19, 20, 27, 30, 31, 36, 37, 38, 40, 42, 43, 44], "x_valu": 18, "y_valu": 18, "z_valu": 18, "loadtxt": [18, 19], "skiprow": [18, 19], "rot90": 18, "x0": [18, 21, 42], "y0": [18, 21, 42], "z0": 18, "height_ratio": 18, "fig0": [18, 19, 20], "cbar": 18, "orient": [18, 19, 20], "horizont": 18, "fraction": [18, 19, 20], "pad": 18, "section": [18, 27, 33], "mu": [18, 42], "xi": [18, 31, 42], "suppress": [18, 43], "rais": [18, 19], "warn": [18, 19], "filterwarn": 18, "ignor": [18, 43], "coulomb_frict": [18, 21, 42], "turbulent_frict": [18, 19, 20, 21, 22, 23, 42, 43], "histori": [18, 21, 42], "035": 18, "plot_mass_point_model": [18, 24], "flow": [19, 20, 33, 34, 41, 42, 43], "ravaflow24mixtur": [19, 22], "dir_sim": [19, 20, 22, 23, 43], "directori": [19, 20, 22, 23, 43, 44], "avaflow": [19, 20, 22, 23, 33, 34, 41, 43], "temp_ravaflow24mixture_exampl": 19, "cwd": [19, 20, 21, 22, 23], "getcwd": [19, 20, 21, 22, 23], "exist": [19, 20, 21, 22, 23, 44], "mkdir": [19, 20, 21, 22, 23], "now": [19, 20, 21, 22, 23, 33], "time_step": [19, 20, 43], "time_end": [19, 20, 22, 23, 43], "curvature_control": [19, 20, 43], "entrainment_control": [19, 20, 43], "stopping_control": [19, 20, 43], "voellmy_model": [19, 20, 22, 23], "home": [19, 22, 29], "src": 19, "88": 19, "futurewarn": 19, "modul": [19, 25, 26, 30, 31, 32, 33, 35, 39, 40, 41, 43, 44], "deprec": [19, 43], "futur": 19, "version": [19, 25, 27, 33, 35, 38], "pleas": [19, 22, 23, 27, 30, 33, 43], "instead": [19, 21, 22, 23], "raster": [19, 20, 42, 43], "hreleas": [19, 20, 22, 23, 43], "releas": [19, 20, 25, 29, 43], "height": [19, 20, 43], "prefix": [19, 20, 21, 22, 23, 30, 43, 44], "georeferenc": [19, 20, 43], "grass": [19, 20, 43], "epsg": [19, 20, 22, 23, 43], "internal_frict": [19, 20, 43], "basal_frict": [19, 20, 22, 23, 43], "entrainment_coef": [19, 20, 43], "tif": [19, 20, 22, 23], "synthetic_rel": [19, 20, 22, 23], "shell": [19, 20, 43], "preprocess": [19, 20, 22, 23, 43], "grass_loc": [19, 20, 22, 23, 43], "sh_file": [19, 20, 22, 23, 43], "2326": [19, 20, 22, 23], "266": 19, "your_prefix_result": [19, 20], "synthetic_result": [19, 20], "extract": [19, 20, 43], "visual": [19, 20], "overal": [19, 20, 22, 23, 31, 37, 43], "impact": [19, 20, 22, 23, 43], "area": [19, 20, 22, 23, 43], "maximum": [19, 20, 21, 27, 30, 40, 43, 44], "specif": [19, 20, 27, 41, 42, 43], "impact_area": [19, 20, 22, 23, 43], "extract_impact_area": [19, 20, 22, 23, 43], "m": [19, 20, 27, 34, 36, 42, 43], "v_mmax": [19, 20], "extract_qoi_max": [19, 20, 43], "aggreg": [19, 20, 43], "loc": [19, 20, 43], "1500": [19, 20], "v_max_loc": [19, 20], "extract_qoi_max_loc": [19, 20, 43], "traceback": 19, "most": [19, 30], "recent": 19, "last": [19, 36], "doc": [19, 22, 25], "plot_ravaflow24": 19, "line": [19, 22, 23], "325": 19, "qoi_max_rast": 19, "qoi_max_raster_asc": 19, "root": 19, "miniconda3": 19, "env": 19, "lib": 19, "python3": 19, "site": 19, "npyio": 19, "1373": 19, "arr": 19, "_read": 19, "fname": 19, "dtype": 19, "comment": 19, "992": 19, "fh": 19, "_datasourc": 19, "open": [19, 33, 34, 43], "rt": 19, "encod": [19, 27], "193": 19, "newlin": 19, "533": 19, "filenotfounderror": 19, "found": [19, 22, 38, 40], "synthetic_ascii": 19, "synthetic_hflow_max": 19, "wise": [19, 20], "heatmap": [19, 20], "head": [19, 20], "coordin": [19, 20, 31, 42, 43], "hmax_asc": [19, 20], "_result": [19, 20], "_ascii": [19, 20], "_hflow_max": [19, 20], "h_max": [19, 20], "v_max": [19, 20], "cbar0": [19, 20], "1f": [19, 20], "vertic": [19, 20], "fig1": [19, 20], "cbar1": [19, 20], "delet": [19, 20, 21, 22, 23], "therein": [19, 20, 21, 22, 23], "shutil": [19, 20, 21, 22, 23], "rmtree": [19, 20, 21, 22, 23], "275": 19, "ravaflow3gmixtur": [20, 23, 41], "temp_ravaflow3gmixture_exampl": 20, "1359200": 20, "41": 20, "802": 20, "685": 20, "779": 20, "plot_ravaflow3g": [20, 24], "multipl": [21, 22, 23, 26, 27, 40, 43, 44], "serial": [21, 22, 23, 30, 40, 41, 44], "parallelli": [21, 22, 23, 44], "mpm_simul": 21, "solv": [21, 41, 42], "while": 21, "keep": [21, 22, 23], "fix": [21, 22, 23, 27, 44], "iput": 21, "list": [21, 30, 31, 37, 44], "string": [21, 22, 23, 30], "Their": 21, "2001": 21, "400": 21, "dictionari": [21, 44], "fix_inp": [21, 22, 23, 44], "tend": [21, 42], "ux0": [21, 42], "uy0": [21, 42], "curvatur": [21, 34, 42, 43], "automat": [21, 25, 33], "later": [21, 22, 23, 25, 33], "inspect": [21, 22, 23], "dir_out": [21, 22, 23, 44], "save_out": [21, 22, 23, 44], "temp_run_masspointmodel_exampl": 21, "run_mpm_simul": 21, "give": [21, 31, 36, 37], "uniqu": 21, "avoid": [21, 25], "conflict": [21, 22, 23], "serial_prefix": [21, 22, 23], "str": [21, 22, 23, 27, 30, 36, 40, 42, 43, 44], "parallel_prefix": [21, 22, 23], "serial_run": [21, 22, 23, 30, 44], "parallel_run": [21, 22, 23, 30, 44], "serial_tim": [21, 22, 23], "serial_output": [21, 22, 23], "control": [21, 30, 43, 44], "parallel_tim": [21, 22, 23], "parallel_output": [21, 22, 23], "691016674041748": 21, "2793431282043457": 21, "done": 21, "listdir": [21, 22, 23], "parallel1_output": [21, 23], "npy": [21, 23], "parallel0_output": [21, 23], "parallel11_output": 21, "serial2_output": [21, 23], "parallel3_output": [21, 23], "parallel7_output": 21, "parallel10_output": 21, "parallel9_output": 21, "parallel6_output": 21, "parallel4_output": 21, "parallel5_output": 21, "serial3_output": [21, 23], "serial9_output": 21, "serial0_output": [21, 23], "serial5_output": 21, "parallel2_output": [21, 23], "serial8_output": 21, "serial10_output": 21, "serial1_output": [21, 23], "serial6_output": 21, "parallel8_output": 21, "serial11_output": 21, "serial4_output": 21, "serial7_output": 21, "access": 21, "attribut": [21, 30], "max_v": 21, "parallel0": [21, 22], "parallel11": 21, "55505557211892": 21, "014114896121015": 21, "245546886730782": 21, "78487303612985": 21, "34198274528081": 21, "371864007499866": 21, "249957243412815": 21, "485487855011687": 21, "031665649204944": 21, "589324449452967": 21, "092803891476187": 21, "99727320816709": 21, "fail": [21, 22, 23], "due": [21, 22, 23, 31], "whatev": [21, 22, 23], "massag": [21, 22, 23], "screen": [21, 22, 23], "continu": [21, 22, 23], "writ": [21, 22, 23], "element": [21, 22, 23, 27, 31, 37, 41], "messag": [21, 22, 23], "976": 21, "plot_run_mass_point_model": [21, 24], "temp1_run_ravaflow24mixture_exampl": 22, "reduc": [22, 23, 26, 30, 37], "write": [22, 23], "demonstr": [22, 23], "four": [22, 23], "treat": [22, 23, 27], "special": [22, 23, 40], "Such": [22, 23, 41], "seper": [22, 23], "o_paramet": [22, 23, 44], "temp2_run_ravaflow24mixture_exampl": 22, "otherwis": [22, 23], "reli": [22, 23, 33, 38, 40], "third": [22, 23], "parti": [22, 23], "softwar": [22, 23, 33, 34, 43], "bodi": [22, 23, 44], "recommend": [22, 23, 43], "addit": [22, 23, 27, 44], "doe": [22, 23], "disk": [22, 23, 44], "similarli": [22, 23, 27], "append": [22, 23, 44], "except": [22, 43], "occur": 22, "serial0": 22, "serial0_result": [22, 23], "serial0_ascii": 22, "serial0_hflow_max": 22, "serial1": 22, "serial1_result": [22, 23], "serial1_ascii": 22, "serial1_hflow_max": 22, "serial2": 22, "serial2_result": [22, 23], "serial2_ascii": 22, "serial2_hflow_max": 22, "serial3": 22, "serial3_result": [22, 23], "serial3_ascii": 22, "serial3_hflow_max": 22, "parallel0_result": [22, 23], "parallel0_ascii": 22, "parallel0_hflow_max": 22, "parallel1": 22, "parallel1_result": [22, 23], "parallel1_ascii": 22, "parallel1_hflow_max": 22, "parallel2": 22, "parallel2_result": [22, 23], "parallel2_ascii": 22, "parallel2_hflow_max": 22, "parallel3": 22, "parallel3_result": [22, 23], "parallel3_ascii": 22, "parallel3_hflow_max": 22, "2748091220855713": 22, "4030134677886963": 22, "parallel3_gloc": [22, 23], "serial2_gloc": [22, 23], "serial1_gloc": [22, 23], "parallel0_shel": [22, 23], "sh": [22, 23], "parallel1_shel": [22, 23], "parallel3_shel": [22, 23], "serial3_shel": [22, 23], "parallel2_gloc": [22, 23], "serial1_shel": [22, 23], "serial2_shel": [22, 23], "parallel1_gloc": [22, 23], "parallel0_gloc": [22, 23], "serial0_shel": [22, 23], "serial3_gloc": [22, 23], "parallel2_shel": [22, 23], "serial0_gloc": [22, 23], "703": 22, "plot_run_ravaflow24": 22, "temp1_run_ravaflow3gmixture_exampl": 23, "temp2_run_ravaflow3gmixture_exampl": 23, "942800": 23, "1425600": 23, "640400": 23, "838400": 23, "49": 23, "1287362575531": 23, "414560079574585": 23, "603": [23, 24], "plot_run_ravaflow3g": [23, 24], "02": [24, 34], "auto_examples_simul": 24, "introduc": 25, "updat": [25, 27, 31], "accordingli": [25, 36], "remov": 25, "constraint": 25, "depend": [25, 27, 33, 37, 41], "elabor": 25, "instal": [25, 29, 41], "pip": [25, 33], "conda": 25, "forg": [25, 33], "channel": 25, "add": [25, 33], "info": 25, "about": [25, 31], "float128": 25, "issu": 25, "window": 25, "system": [25, 33, 41, 42, 44], "metadata": [25, 43], "host": [26, 30, 32, 35, 39, 40, 41, 44], "known": [26, 27], "surrog": 26, "meta": 26, "type": [26, 27, 30, 31, 36, 37, 38, 40, 41, 42, 43, 44], "cheap": 26, "greatli": [26, 27], "cost": 26, "intens": 26, "global": [26, 33, 34], "anlaysi": 26, "quantif": [26, 33, 34], "calibr": [26, 30, 33, 34], "implement": [26, 27, 30, 31, 32, 33, 35, 39, 41, 43, 44], "scalar": [26, 27, 30, 37, 40, 43], "stand": 27, "robust": [27, 34], "stochast": [27, 34, 40], "develop": [27, 34, 43], "improv": [25, 27], "built": [27, 40], "partial": [27, 34, 41], "berger": [27, 34], "2016": [27, 34], "rpy2": 27, "allow": [27, 31], "within": [27, 40, 43, 44], "map": [27, 41], "space": [27, 36, 41], "perspect": 27, "belief": [27, 31], "modest": 27, "much": 27, "faster": 27, "demand": 27, "analys": [27, 33, 44], "chapter": 27, "cdot": [27, 42], "denot": [27, 30, 42], "x_p": 27, "mathcal": [27, 41], "subset": [27, 41], "mathbb": [27, 41], "sim": 27, "fulli": 27, "covari": 27, "parametr": 27, "regress": 27, "boldsymbol": [27, 42], "beta": 27, "sum_": [27, 31], "q": 27, "h_": 27, "beta_": 27, "vector": [27, 42], "chosen": [27, 40], "basi": 27, "commonli": 27, "some": 27, "prescrib": 27, "polynomi": 27, "stationari": [27, 37], "typic": 27, "separ": [27, 43], "form": 27, "sigma": 27, "prod_": 27, "c_": 27, "correl": 27, "th": [27, 31], "compon": [27, 42], "_i": [27, 31], "counterpart": 27, "_j": 27, "variou": 27, "what": 27, "matern": 27, "famili": 27, "replac": 27, "without": [27, 33], "loss": 27, "sqrt": [27, 42], "il": 27, "jl": 27, "psi_l": 27, "psi_": 27, "length": [27, 31], "varianc": [27, 30, 31, 33, 34, 37, 38], "psi": 27, "psi_1": 27, "psi_p": 27, "knowledg": [27, 31], "viewpoint": 27, "limit": [27, 31], "tr": 27, "pair": [27, 40, 44], "finit": [27, 41], "jointli": 27, "joint": 27, "matrix": 27, "untri": 27, "mid": [27, 31], "begin": [27, 42], "cc": 27, "properti": [27, 31, 37], "multivari": 27, "condit": 27, "again": 27, "eq": 27, "conditionalgaussian": 27, "easili": 27, "extend": [27, 36], "almost": 27, "instantan": 27, "moreov": 27, "associ": 27, "2c": 27, "either": [27, 30], "over": [27, 43], "y_i": 27, "tild": 27, "_1": 27, "view": 27, "decompos": 27, "lower": [27, 30, 31, 36, 37, 38], "triangular": 27, "conjug": 27, "choleski": 27, "decomposit": 27, "cccc": 27, "vdot": 27, "ddot": 27, "w": [27, 34], "w_1": 27, "w_": 27, "consist": [27, 30, 36, 43, 44], "independ": 27, "w_i": 27, "2018": [27, 30, 34], "zero_mean": 27, "No": 27, "range_par": 27, "na": 27, "post_mod": 27, "prior_choic": 27, "ref_approx": 27, "b": 27, "none": [27, 30, 31, 36, 37, 38, 40, 43, 44], "matern_5_2": 27, "isotrop": 27, "lbfg": 27, "lower_bound": 27, "max_ev": 27, "num_initial_valu": 27, "ye": 27, "bool": [27, 37, 38, 40, 42, 43, 44], "One": [27, 30], "ndarrai": [27, 30, 31, 37, 40, 42, 44], "By": [27, 30], "student": 27, "mmle": 27, "mle": 27, "ref_xi": 27, "ref_gamma": 27, "ntrain": 27, "matern_3_2": 27, "rough": 27, "pow_exp": 27, "power": 27, "exponenti": 27, "kernel": 27, "low": [27, 31], "storag": 27, "broyden": 27, "fletcher": 27, "goldarb": 27, "shanno": 27, "nelder": 27, "mead": 27, "brent": 27, "entri": 27, "being": [27, 36, 43], "invers": 27, "constrain": 27, "unconstrain": 27, "ones": 27, "ntest": 27, "low95": 27, "upper95": 27, "sd": 27, "column": [27, 42], "contain": [27, 31, 37, 44], "fit": 27, "nrespons": 27, "date": 29, "jan": 34, "2024": 29, "get": 29, "overview": 29, "prerequisit": 29, "api": 29, "chang": [29, 43], "idea": 30, "behind": 30, "amount": 30, "achiev": 30, "certain": [30, 44], "accuraci": 30, "expect": 30, "suppos": 30, "facilit": 30, "wang": [30, 34], "li": [30, 34], "kandasami": [30, 34], "2017": [30, 34, 38, 40, 43], "scalar_gasp_trend": 30, "entropi": 30, "brute": 30, "args_prior": [30, 31], "kwgs_prior": [30, 31], "args_likelihood": [30, 31], "kwgs_likelihood": [30, 31], "args_optim": 30, "kwgs_optim": 30, "contruct": 30, "e": [30, 36, 40], "via": [30, 34, 37], "boundari": [30, 31, 36, 37, 38], "callabl": [30, 31, 37, 44], "construct": [30, 32, 37], "These": 30, "linear": [30, 41], "find": 30, "minim": 30, "func": 30, "_uncertainty_ind": 30, "optimizeresult": 30, "posit": [30, 31, 37, 42, 43], "dict": [30, 31, 37, 40, 44], "keyword": [30, 31, 37, 44], "sim0": 30, "sim1": 30, "cpu": [30, 40, 44], "tupl": [30, 31, 37, 43], "intial": 30, "ninit": 30, "iter_prefix": 30, "sequenti": [30, 44], "inter": 30, "simulaiton": 30, "iter_sim0": 30, "iter_sim1": 30, "sim_output": 30, "ln_pxl_valu": 30, "duplic": 30, "stop": [30, 43], "awai": [30, 41], "smaller": [30, 43], "statist": [31, 34], "probabilist": [31, 33], "light": 31, "theorem": 31, "collect": 31, "degre": [31, 43], "multipli": [31, 43], "incorpor": 31, "subject": [31, 44], "becom": 31, "avail": [31, 40], "hardli": 31, "possibl": 31, "denomin": 31, "nomal": 31, "numer": [31, 34, 37, 41, 42], "regular": 31, "increas": 31, "dramat": 31, "approx": 31, "delta": 31, "args_ln_pxl": 31, "kwgs_ln_pxl": 31, "bin": [31, 36], "1d": 31, "along": [31, 33, 42], "whether": [31, 37, 44], "old": [31, 37], "thu": [31, 37], "framework": [33, 34], "enabl": 33, "systemat": 33, "relat": [33, 44], "physic": [33, 34], "computationlli": 33, "sensitv": [33, 38], "ensur": [25, 33], "cover": 33, "sure": 33, "latest": 33, "offici": [33, 43], "websit": 33, "ad": [33, 43], "crucial": 33, "commun": [33, 34], "been": [33, 43], "initegr": 33, "util": [33, 42], "tool": 33, "interfac": [33, 43, 44], "3g": [33, 41, 43], "intend": 33, "document": 33, "guid": [25, 33], "command": 33, "recommond": 33, "virtual": 33, "ceat": 33, "lastli": [], "anaconda": 33, "miniconda": 33, "haven": 33, "afterward": 33, "your_env_nam": 33, "termin": 33, "repo": [], "http": 34, "cran": [], "org": 34, "successfulli": 33, "librari": 34, "configur": [], "r_home": [25, 33], "know": [], "quit": [], "config": [], "var": [], "your_r_hom": [], "reactiv": [], "deactiv": [], "id": 33, "would": [], "ipython": [], "extra": [], "ipykernel": [], "user": [41, 43, 44], "meng": 34, "yang": 34, "jesu": 34, "palomo": 34, "jame": 34, "journal": 34, "doi": 34, "32614": 34, "rj": 34, "011": 34, "massiv": 34, "annal": 34, "1317": 34, "1347": 34, "1214": 34, "aoas934": 34, "amann": 34, "landslid": [34, 41], "1007": 34, "s10346": 34, "021": 34, "01690": 34, "hu": 34, "research": 34, "phd": 34, "thesi": 34, "rwth": 34, "aachen": 34, "univers": 34, "18154": 34, "11693": 34, "xiao": 34, "jing": 34, "6a": 34, "3038": 34, "3066": 34, "aos1648": 34, "hong": 34, "qiao": 34, "lai": 34, "neural": 34, "3072": 34, "3094": 34, "1162": 34, "neco_a_01127": 34, "kirthevasan": 34, "jeff": 34, "schneider": 34, "barnab": 34, "\u00e1": 34, "\u00f3": 34, "czo": 34, "queri": 34, "scientif": 34, "experi": 34, "artifici": 34, "intellig": 34, "45": 34, "56": 34, "1016": 34, "artint": 34, "002": 34, "julia": 34, "2033": 34, "2045": 34, "022": 34, "01857": 34, "andrea": 34, "best": 34, "145": 34, "280": 34, "2002": [34, 38, 40], "s0010": 34, "4655": 34, "00280": 34, "paola": 34, "annoni": 34, "ivano": 34, "azzini": 34, "francesca": 34, "campolongo": 34, "marco": 34, "ratto": 34, "stefano": 34, "tarantola": 34, "259": 34, "270": 34, "2010": [34, 38, 40, 43], "cpc": 34, "2009": 34, "09": 34, "018": 34, "jon": 34, "herman": [34, 38, 40], "Will": 34, "usher": [34, 38, 40], "salib": [34, 38, 40], "21105": 34, "joss": 34, "00097": 34, "thoma": 34, "fischer": [34, 42, 43], "shiva": 34, "pudasaini": 34, "avalanch": 34, "cold": 34, "region": 34, "scienc": 34, "technologi": 34, "74": 34, "75": 34, "2012": [34, 42, 43], "coldregion": 34, "mergili": [34, 43], "krenn": 34, "v1": 34, "advanc": 34, "propag": 34, "phase": [34, 43], "geoscientif": 34, "553": 34, "569": 34, "5194": 34, "gmd": 34, "christen": [34, 43], "bartelt": 34, "ramm": 34, "dens": 34, "snow": 34, "terrain": 34, "63": 34, "loic": 34, "clair": 34, "cannamela": 34, "bertrand": 34, "iooss": 34, "approach": 34, "multifidel": 34, "siam": 34, "asa": 34, "336": 34, "1137": 34, "130926869": 34, "fill": 36, "divid": 36, "shuffl": 36, "g": [36, 40, 42], "x_6": 36, "middl": 36, "combin": [36, 43], "exclud": [36, 43], "straightforwardli": 36, "pseudo": [36, 37, 40], "randomli": 36, "maxim": [36, 43], "minimum": 36, "distanc": 36, "transform": 36, "wide": [37, 41], "markov": 37, "chain": 37, "mont": 37, "carlo": 37, "mcmc": 37, "algorithm": 37, "sequenc": [37, 38], "direct": [37, 42, 43], "higher": 37, "moment": 37, "histogram": 37, "work": [33, 37], "At": 37, "calcul": [37, 38, 40], "reject": 37, "repeat": 37, "larg": 37, "burn": 37, "thine": 37, "ln_target": 37, "f_densiti": 37, "symmetr": 37, "args_target": 37, "kwgs_target": 37, "args_f_sampl": 37, "args_f_dens": 37, "kwgs_f_densiti": 37, "asymmetr": 37, "burnin": 37, "descript": [38, 40], "skip_valu": 38, "skip": 38, "ideal": 38, "extens": 38, "nresampl": 40, "conf_level": 40, "analyz": 40, "varaibl": [40, 44], "nsaltelli": 40, "nrealiz": 40, "secord": 40, "size": [40, 43], "bootstrap": 40, "colomn": 40, "relev": [40, 41, 43, 44], "s2": 40, "studi": 41, "field": 41, "vari": 41, "simpl": 41, "differenti": 41, "scheme": [41, 42], "voellmi": [41, 42, 43], "shallow": [41, 43], "extrem": 42, "simplifi": [42, 43], "condens": 42, "cartesian": 42, "orthogon": 42, "t_x": 42, "t_y": 42, "t_n": 42, "surfac": 42, "tangent": 42, "goven": 42, "describ": [42, 44], "u_": 42, "partial_x": 42, "partial_i": 42, "g_": 42, "g_n": 42, "dry": 42, "tensor": 42, "rewritten": 42, "_0": 42, "forward": 42, "rung": 42, "kutta": 42, "explicit": 42, "dopri5": 42, "od": 42, "mass_point_model": 42, "dt": 42, "t0": 42, "atol": 42, "rtol": 42, "graviti": [42, 43], "acceler": [42, 43], "absolut": 42, "toler": 42, "rel": 42, "2d": 42, "row": 42, "quantiti": [42, 43], "gi": 43, "support": 43, "manual": [33, 43], "ravaflow24": 43, "cfl": 43, "time_step_length": 43, "001": 43, "diffusion_control": 43, "surface_control": 43, "stopping_threshold": 43, "friction_control": 43, "non_hydro_control": 43, "phase_sep_control": 43, "hydrograph_control": 43, "deceleration_control": 43, "around": 43, "diffus": 43, "experiment": 43, "neglect": 43, "deceler": 43, "term": 43, "balanc": 43, "forc": 43, "entrain": 43, "momentum": 43, "entrainmnet": 43, "kinet": 43, "energi": 43, "threshold": 43, "dynam": 43, "pressur": 43, "cell": 43, "euqal": 43, "hydrostat": 43, "dispers": 43, "enhanc": 43, "impos": 43, "hydrograph": 43, "reset": 43, "profil": 43, "entir": 43, "materi": 43, "through": 43, "centr": 43, "viscou": 43, "hrelease_ratio": 43, "gdal": 43, "Its": [43, 44], "unit": 43, "meter": 43, "volum": 43, "intern": [43, 44], "angl": 43, "basal": 43, "european": 43, "petroleum": 43, "survei": 43, "group": 43, "qoi": 43, "pa": 43, "larger": 43, "regard": 43, "spatio": 43, "tempor": 43, "spatial": 43, "qoi_max": 43, "nloc": 43, "qoi_max_loc": 43, "signatur": 44, "part": 44, "kei": 44, "onto": 44, "correspondingli": 44, "environ": 25, "seamless": 25, "precis": 25, "mar": 29, "quick": 33, "re": 33, "predefin": 33, "smoothli": 33, "setup": 33, "prefer": 33, "yourself": 33, "custom": 33}, "objects": {"psimpy.emulator.robustgasp": [[27, 0, 1, "", "PPGaSP"], [27, 0, 1, "", "ScalarGaSP"]], "psimpy.emulator.robustgasp.PPGaSP": [[27, 1, 1, "", "predict"], [27, 1, 1, "", "sample"], [27, 1, 1, "", "train"]], "psimpy.emulator.robustgasp.ScalarGaSP": [[27, 1, 1, "", "loo_validate"], [27, 1, 1, "", "predict"], [27, 1, 1, "", "sample"], [27, 1, 1, "", "train"]], "psimpy.inference.active_learning": [[30, 0, 1, "", "ActiveLearning"]], "psimpy.inference.active_learning.ActiveLearning": [[30, 1, 1, "", "approx_ln_pxl"], [30, 1, 1, "", "initial_simulation"], [30, 1, 1, "", "iterative_emulation"]], "psimpy.inference.bayes_inference": [[31, 0, 1, "", "GridEstimation"], [31, 0, 1, "", "MetropolisHastingsEstimation"]], "psimpy.inference.bayes_inference.GridEstimation": [[31, 1, 1, "", "run"]], "psimpy.inference.bayes_inference.MetropolisHastingsEstimation": [[31, 1, 1, "", "run"]], "psimpy.sampler.latin": [[36, 0, 1, "", "LHS"]], "psimpy.sampler.latin.LHS": [[36, 1, 1, "", "sample"]], "psimpy.sampler.metropolis_hastings": [[37, 0, 1, "", "MetropolisHastings"]], "psimpy.sampler.metropolis_hastings.MetropolisHastings": [[37, 1, 1, "", "sample"]], "psimpy.sampler.saltelli": [[38, 0, 1, "", "Saltelli"]], "psimpy.sampler.saltelli.Saltelli": [[38, 1, 1, "", "sample"]], "psimpy.sensitivity.sobol": [[40, 0, 1, "", "SobolAnalyze"]], "psimpy.sensitivity.sobol.SobolAnalyze": [[40, 1, 1, "", "run"]], "psimpy.simulator.mass_point_model": [[42, 0, 1, "", "MassPointModel"]], "psimpy.simulator.mass_point_model.MassPointModel": [[42, 1, 1, "", "run"]], "psimpy.simulator.ravaflow3G": [[43, 0, 1, "", "Ravaflow3GMixture"]], "psimpy.simulator.ravaflow3G.Ravaflow3GMixture": [[43, 1, 1, "", "extract_impact_area"], [43, 1, 1, "", "extract_qoi_max"], [43, 1, 1, "", "extract_qoi_max_loc"], [43, 1, 1, "", "preprocess"], [43, 1, 1, "", "run"]], "psimpy.simulator.run_simulator": [[44, 0, 1, "", "RunSimulator"]], "psimpy.simulator.run_simulator.RunSimulator": [[44, 2, 1, "", "outputs"], [44, 1, 1, "", "parallel_run"], [44, 1, 1, "", "serial_run"], [44, 2, 1, "", "var_samples"]]}, "objtypes": {"0": "py:class", "1": "py:method", "2": "py:attribute"}, "objnames": {"0": ["py", "class", "Python class"], "1": ["py", "method", "Python method"], "2": ["py", "attribute", "Python attribute"]}, "titleterms": {"api": 0, "theori": [0, 27, 42], "emul": [1, 2, 3, 26, 27], "ppgasp": [2, 27], "gp": [2, 3, 27], "multi": 2, "output": [2, 3], "function": [2, 3], "scalargasp": [3, 27], "singl": 3, "comput": [4, 8, 13, 16, 24], "time": [4, 8, 13, 16, 24], "infer": [5, 7, 31, 32], "activ": [6, 30], "learn": [6, 30], "bayesian": 7, "sampler": [9, 35], "latin": [10, 36], "hypercub": [10, 36], "sampl": [10, 11, 12, 27, 36, 37, 38], "metropoli": [11, 37], "hast": [11, 37], "saltelli": [12, 38], "sensit": [14, 39, 40], "sobol": [15, 40], "analysi": [15, 40], "simul": [17, 41, 44], "mass": [18, 21, 42], "point": [18, 21, 42], "model": [18, 19, 20, 21, 22, 23, 42, 43], "ravaflow24": [19, 22], "mixtur": [19, 20, 22, 23, 43], "ravaflow3g": [20, 23, 43], "runsimul": [21, 22, 23, 44], "chang": 25, "v0": 25, "2": 25, "0": 25, "1": 25, "robustgasp": 27, "recap": 27, "prior": 27, "posterior": 27, "from": 27, "class": [27, 30, 31, 36, 37, 38, 40, 42, 43, 44], "method": [27, 30, 31, 36, 37, 38, 40, 42, 43, 44], "exampl": 28, "galleri": 28, "welcom": 29, "psimpi": 29, "": 29, "document": 29, "content": 29, "activelearn": 30, "bay": 31, "gridestim": 31, "metropolishastingsestim": 31, "get": 33, "start": 33, "overview": 33, "prerequisit": 33, "instal": 33, "conda": 33, "environ": 33, "recommend": 33, "refer": 34, "lh": 36, "metropolishast": 37, "sobolanalyz": 40, "masspointmodel": 42, "ravaflow3gmixtur": 43, "run": 44, "attribut": 44}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "sphinxcontrib.bibtex": 9, "sphinx": 60}, "alltitles": {"API & Theory": [[0, "api-theory"]], "Emulator": [[1, "emulator"], [26, "emulator"]], "PPGaSP: GP emulation for multi-output functions": [[2, "ppgasp-gp-emulation-for-multi-output-functions"]], "ScalarGaSP: GP emulation for a single-output function": [[3, "scalargasp-gp-emulation-for-a-single-output-function"]], "Computation times": [[4, "computation-times"], [8, "computation-times"], [13, "computation-times"], [16, "computation-times"], [24, "computation-times"]], "Inference": [[5, "inference"], [32, "inference"]], "Active learning": [[6, "active-learning"]], "Bayesian inference": [[7, "bayesian-inference"]], "Sampler": [[9, "sampler"], [35, "sampler"]], "Latin hypercube sampling": [[10, "latin-hypercube-sampling"]], "Metropolis Hastings sampling": [[11, "metropolis-hastings-sampling"]], "Saltelli sampling": [[12, "saltelli-sampling"]], "Sensitivity": [[14, "sensitivity"], [39, "sensitivity"]], "Sobol\u2019 analysis": [[15, "sobol-analysis"]], "Simulator": [[17, "simulator"], [41, "simulator"]], "Mass Point Model": [[18, "mass-point-model"], [42, "mass-point-model"]], "Ravaflow24 Mixture Model": [[19, "ravaflow24-mixture-model"]], "Ravaflow3G Mixture Model": [[20, "ravaflow3g-mixture-model"], [43, "ravaflow3g-mixture-model"]], "RunSimulator: Mass Point Model": [[21, "runsimulator-mass-point-model"]], "RunSimulator: Ravaflow24 Mixture Model": [[22, "runsimulator-ravaflow24-mixture-model"]], "RunSimulator: Ravaflow3G Mixture Model": [[23, "runsimulator-ravaflow3g-mixture-model"]], "Changes": [[25, "changes"]], "v0.2.1": [[25, "v0-2-1"]], "v0.2.0": [[25, "v0-2-0"]], "v0.1.2": [[25, "v0-1-2"]], "v0.1.1": [[25, "v0-1-1"]], "v0.1.0": [[25, "v0-1-0"]], "RobustGaSP": [[27, "robustgasp"]], "Theory recap of GP emulation": [[27, "theory-recap-of-gp-emulation"]], "GP prior": [[27, "gp-prior"]], "GP posterior": [[27, "gp-posterior"]], "Sample from GP": [[27, "sample-from-gp"]], "ScalarGaSP Class": [[27, "scalargasp-class"]], "Methods": [[27, "methods"], [27, "id8"], [30, "methods"], [31, "methods"], [31, "id1"], [36, "methods"], [37, "methods"], [38, "methods"], [40, "methods"], [42, "methods"], [43, "methods"], [44, "methods"]], "PPGaSP Class": [[27, "ppgasp-class"]], "Example Gallery": [[28, "example-gallery"]], "Welcome to PSimPy\u2019s documentation!": [[29, "welcome-to-psimpy-s-documentation"]], "Contents": [[29, "contents"]], "Active Learning": [[30, "active-learning"]], "ActiveLearning Class": [[30, "activelearning-class"]], "Bayes Inference": [[31, "bayes-inference"]], "GridEstimation Class": [[31, "gridestimation-class"]], "MetropolisHastingsEstimation Class": [[31, "metropolishastingsestimation-class"]], "Getting Started": [[33, "getting-started"]], "Overview": [[33, "overview"]], "Prerequisites": [[33, "prerequisites"]], "Installation": [[33, "installation"]], "Installation in a Conda Environment (Recommended)": [[33, "installation-in-a-conda-environment-recommended"]], "References": [[34, "references"]], "Latin Hypercube Sampling": [[36, "latin-hypercube-sampling"]], "LHS Class": [[36, "lhs-class"]], "Metropolis Hastings Sampling": [[37, "metropolis-hastings-sampling"]], "MetropolisHastings Class": [[37, "metropolishastings-class"]], "Saltelli Sampling": [[38, "saltelli-sampling"]], "Saltelli Class": [[38, "saltelli-class"]], "Sobol\u2019 Sensitivity Analysis": [[40, "sobol-sensitivity-analysis"]], "SobolAnalyze Class": [[40, "sobolanalyze-class"]], "Theory of mass point model": [[42, "theory-of-mass-point-model"]], "MassPointModel Class": [[42, "masspointmodel-class"]], "Ravaflow3GMixture Class": [[43, "ravaflow3gmixture-class"]], "Run Simulator": [[44, "run-simulator"]], "RunSimulator Class": [[44, "runsimulator-class"]], "Attributes": [[44, "attributes"]]}, "indexentries": {"ppgasp (class in psimpy.emulator.robustgasp)": [[27, "psimpy.emulator.robustgasp.PPGaSP"]], "scalargasp (class in psimpy.emulator.robustgasp)": [[27, "psimpy.emulator.robustgasp.ScalarGaSP"]], "loo_validate() (scalargasp method)": [[27, "psimpy.emulator.robustgasp.ScalarGaSP.loo_validate"]], "predict() (ppgasp method)": [[27, "psimpy.emulator.robustgasp.PPGaSP.predict"]], "predict() (scalargasp method)": [[27, "psimpy.emulator.robustgasp.ScalarGaSP.predict"]], "sample() (ppgasp method)": [[27, "psimpy.emulator.robustgasp.PPGaSP.sample"]], "sample() (scalargasp method)": [[27, "psimpy.emulator.robustgasp.ScalarGaSP.sample"]], "train() (ppgasp method)": [[27, "psimpy.emulator.robustgasp.PPGaSP.train"]], "train() (scalargasp method)": [[27, "psimpy.emulator.robustgasp.ScalarGaSP.train"]], "activelearning (class in psimpy.inference.active_learning)": [[30, "psimpy.inference.active_learning.ActiveLearning"]], "approx_ln_pxl() (activelearning method)": [[30, "psimpy.inference.active_learning.ActiveLearning.approx_ln_pxl"]], "initial_simulation() (activelearning method)": [[30, "psimpy.inference.active_learning.ActiveLearning.initial_simulation"]], "iterative_emulation() (activelearning method)": [[30, "psimpy.inference.active_learning.ActiveLearning.iterative_emulation"]], "gridestimation (class in psimpy.inference.bayes_inference)": [[31, "psimpy.inference.bayes_inference.GridEstimation"]], "metropolishastingsestimation (class in psimpy.inference.bayes_inference)": [[31, "psimpy.inference.bayes_inference.MetropolisHastingsEstimation"]], "run() (gridestimation method)": [[31, "psimpy.inference.bayes_inference.GridEstimation.run"]], "run() (metropolishastingsestimation method)": [[31, "psimpy.inference.bayes_inference.MetropolisHastingsEstimation.run"]], "lhs (class in psimpy.sampler.latin)": [[36, "psimpy.sampler.latin.LHS"]], "sample() (lhs method)": [[36, "psimpy.sampler.latin.LHS.sample"]], "metropolishastings (class in psimpy.sampler.metropolis_hastings)": [[37, "psimpy.sampler.metropolis_hastings.MetropolisHastings"]], "sample() (metropolishastings method)": [[37, "psimpy.sampler.metropolis_hastings.MetropolisHastings.sample"]], "saltelli (class in psimpy.sampler.saltelli)": [[38, "psimpy.sampler.saltelli.Saltelli"]], "sample() (saltelli method)": [[38, "psimpy.sampler.saltelli.Saltelli.sample"]], "sobolanalyze (class in psimpy.sensitivity.sobol)": [[40, "psimpy.sensitivity.sobol.SobolAnalyze"]], "run() (sobolanalyze method)": [[40, "psimpy.sensitivity.sobol.SobolAnalyze.run"]], "masspointmodel (class in psimpy.simulator.mass_point_model)": [[42, "psimpy.simulator.mass_point_model.MassPointModel"]], "run() (masspointmodel method)": [[42, "psimpy.simulator.mass_point_model.MassPointModel.run"]], "ravaflow3gmixture (class in psimpy.simulator.ravaflow3g)": [[43, "psimpy.simulator.ravaflow3G.Ravaflow3GMixture"]], "extract_impact_area() (ravaflow3gmixture method)": [[43, "psimpy.simulator.ravaflow3G.Ravaflow3GMixture.extract_impact_area"]], "extract_qoi_max() (ravaflow3gmixture method)": [[43, "psimpy.simulator.ravaflow3G.Ravaflow3GMixture.extract_qoi_max"]], "extract_qoi_max_loc() (ravaflow3gmixture method)": [[43, "psimpy.simulator.ravaflow3G.Ravaflow3GMixture.extract_qoi_max_loc"]], "preprocess() (ravaflow3gmixture method)": [[43, "psimpy.simulator.ravaflow3G.Ravaflow3GMixture.preprocess"]], "run() (ravaflow3gmixture method)": [[43, "psimpy.simulator.ravaflow3G.Ravaflow3GMixture.run"]], "runsimulator (class in psimpy.simulator.run_simulator)": [[44, "psimpy.simulator.run_simulator.RunSimulator"]], "outputs (runsimulator attribute)": [[44, "psimpy.simulator.run_simulator.RunSimulator.outputs"]], "parallel_run() (runsimulator method)": [[44, "psimpy.simulator.run_simulator.RunSimulator.parallel_run"]], "serial_run() (runsimulator method)": [[44, "psimpy.simulator.run_simulator.RunSimulator.serial_run"]], "var_samples (runsimulator attribute)": [[44, "psimpy.simulator.run_simulator.RunSimulator.var_samples"]]}}) \ No newline at end of file +Search.setIndex({"docnames": ["api", "auto_examples/emulator/index", "auto_examples/emulator/plot_ppgasp", "auto_examples/emulator/plot_scalargasp", "auto_examples/emulator/sg_execution_times", "auto_examples/inference/index", "auto_examples/inference/plot_active_learning", "auto_examples/inference/plot_bayes_inference", "auto_examples/inference/sg_execution_times", "auto_examples/sampler/index", "auto_examples/sampler/plot_latin", "auto_examples/sampler/plot_metropolis_hastings", "auto_examples/sampler/plot_saltelli", "auto_examples/sampler/sg_execution_times", "auto_examples/sensitivity/index", "auto_examples/sensitivity/plot_sobol_analyze", "auto_examples/sensitivity/sg_execution_times", "auto_examples/simulator/index", "auto_examples/simulator/plot_mass_point_model", "auto_examples/simulator/plot_ravaflow24", "auto_examples/simulator/plot_ravaflow3G", "auto_examples/simulator/plot_run_mass_point_model", "auto_examples/simulator/plot_run_ravaflow24", "auto_examples/simulator/plot_run_ravaflow3G", "auto_examples/simulator/sg_execution_times", "changelog", "emulator/index", "emulator/robustgasp", "examples", "index", "inference/active_learning", "inference/bayes_inference", "inference/index", "quickstart", "refs", "sampler/index", "sampler/latin", "sampler/metropolis_hastings", "sampler/saltelli", "sensitivity/index", "sensitivity/sobol", "simulator/index", "simulator/mass_point_model", "simulator/ravaflow3G", "simulator/run_simulator"], "filenames": ["api.rst", "auto_examples/emulator/index.rst", "auto_examples/emulator/plot_ppgasp.rst", "auto_examples/emulator/plot_scalargasp.rst", "auto_examples/emulator/sg_execution_times.rst", "auto_examples/inference/index.rst", "auto_examples/inference/plot_active_learning.rst", "auto_examples/inference/plot_bayes_inference.rst", "auto_examples/inference/sg_execution_times.rst", "auto_examples/sampler/index.rst", "auto_examples/sampler/plot_latin.rst", "auto_examples/sampler/plot_metropolis_hastings.rst", "auto_examples/sampler/plot_saltelli.rst", "auto_examples/sampler/sg_execution_times.rst", "auto_examples/sensitivity/index.rst", "auto_examples/sensitivity/plot_sobol_analyze.rst", "auto_examples/sensitivity/sg_execution_times.rst", "auto_examples/simulator/index.rst", "auto_examples/simulator/plot_mass_point_model.rst", "auto_examples/simulator/plot_ravaflow24.rst", "auto_examples/simulator/plot_ravaflow3G.rst", "auto_examples/simulator/plot_run_mass_point_model.rst", "auto_examples/simulator/plot_run_ravaflow24.rst", "auto_examples/simulator/plot_run_ravaflow3G.rst", "auto_examples/simulator/sg_execution_times.rst", "changelog.rst", "emulator/index.rst", "emulator/robustgasp.rst", "examples.rst", "index.rst", "inference/active_learning.rst", "inference/bayes_inference.rst", "inference/index.rst", "quickstart.rst", "refs.rst", "sampler/index.rst", "sampler/latin.rst", "sampler/metropolis_hastings.rst", "sampler/saltelli.rst", "sensitivity/index.rst", "sensitivity/sobol.rst", "simulator/index.rst", "simulator/mass_point_model.rst", "simulator/ravaflow3G.rst", "simulator/run_simulator.rst"], "titles": ["API & Theory", "Emulator", "PPGaSP: GP emulation for multi-output functions", "ScalarGaSP: GP emulation for a single-output function", "Computation times", "Inference", "Active learning", "Bayesian inference", "Computation times", "Sampler", "Latin hypercube sampling", "Metropolis Hastings sampling", "Saltelli sampling", "Computation times", "Sensitivity", "Sobol\u2019 analysis", "Computation times", "Simulator", "Mass Point Model", "Ravaflow24 Mixture Model", "Ravaflow3G Mixture Model", "RunSimulator: Mass Point Model", "RunSimulator: Ravaflow24 Mixture Model", "RunSimulator: Ravaflow3G Mixture Model", "Computation times", "Changes", "Emulator", "RobustGaSP", "Example Gallery", "Welcome to PSimPy\u2019s documentation!", "Active Learning", "Bayes Inference", "Inference", "Getting Started", "References", "Sampler", "Latin Hypercube Sampling", "Metropolis Hastings Sampling", "Saltelli Sampling", "Sensitivity", "Sobol\u2019 Sensitivity Analysis", "Simulator", "Mass Point Model", "Ravaflow3G Mixture Model", "Run Simulator"], "terms": {"emul": [0, 4, 6, 15, 25, 28, 29, 30, 32, 33, 34, 36, 40], "infer": [0, 6, 8, 28, 29, 30, 34], "sampler": [0, 6, 7, 10, 11, 12, 15, 28, 29, 30, 31, 36, 37, 38], "sensit": [0, 15, 26, 28, 29, 34, 38], "simul": [0, 2, 3, 6, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 33, 34, 40, 42, 43], "ppgasp": [1, 4, 25, 26], "gp": [1, 4, 30], "multi": [1, 4], "output": [1, 4, 15, 18, 19, 20, 21, 22, 23, 26, 27, 30, 34, 40, 41, 42, 43, 44], "function": [1, 4, 6, 11, 15, 22, 23, 26, 27, 30, 31, 32, 34, 35, 37, 39, 41, 44], "scalargasp": [1, 4, 6, 15, 25, 26, 30], "singl": [1, 4, 42], "download": [1, 2, 3, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 23, 33], "all": [1, 2, 3, 5, 9, 14, 15, 17, 19, 20, 21, 22, 23, 43, 44], "exampl": [1, 2, 3, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 23, 27, 29, 33, 36, 37], "python": [1, 2, 3, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 27, 33, 34, 38, 40, 41, 43, 44], "sourc": [1, 2, 3, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 23, 27, 30, 31, 33, 34, 36, 37, 38, 40, 42, 43, 44], "code": [1, 2, 3, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 23, 34, 43], "emulator_python": 1, "zip": [1, 5, 9, 14, 17], "jupyt": [1, 2, 3, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 23], "notebook": [1, 2, 3, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 23], "emulator_jupyt": 1, "galleri": [1, 2, 3, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 23, 29], "gener": [1, 2, 3, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 23, 27, 36, 37, 40, 43], "sphinx": [1, 2, 3, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 23], "click": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23], "here": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 27, 42, 43], "full": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23], "thi": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 25, 26, 27, 30, 31, 32, 33, 35, 36, 39, 40, 41, 44], "show": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23], "how": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 25, 27], "appli": [2, 3, 34, 37, 43], "gaussian": [2, 3, 6, 11, 26, 27, 30, 32, 33, 34, 40], "process": [2, 3, 6, 21, 22, 23, 26, 27, 30, 32, 33, 34, 40], "us": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 25, 26, 27, 30, 31, 33, 34, 36, 37, 38, 40, 41, 42, 43, 44], "class": [2, 3, 6, 7, 11, 15, 18, 19, 20, 21, 22, 23, 25, 26, 32, 35, 39, 41], "The": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 27, 30, 31, 33, 34, 36, 37, 38, 40, 41, 42, 43, 44], "we": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 27, 33, 36, 43], "ar": [2, 3, 6, 10, 12, 15, 18, 19, 20, 21, 22, 23, 26, 27, 30, 31, 32, 33, 35, 37, 38, 39, 41, 42, 43, 44], "go": [2, 21, 22, 23], "look": [2, 10, 11, 15, 18], "i": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 26, 27, 30, 31, 33, 36, 37, 38, 40, 41, 42, 43, 44], "diamond": 2, "diplomat": 2, "militari": 2, "oper": 2, "non": [2, 42, 43], "warfight": 2, "domain": 2, "comput": [2, 6, 11, 12, 15, 18, 19, 20, 21, 22, 23, 26, 31, 34, 38, 39, 40, 41], "model": [2, 15, 17, 24, 26, 27, 30, 33, 34, 40, 41], "It": [2, 3, 6, 11, 12, 18, 19, 20, 21, 22, 23, 26, 27, 30, 36, 37, 38, 42, 43, 44], "testb": 2, "illustr": [2, 6, 10, 18, 19, 20, 21, 27], "pp": [2, 27], "gasp": [2, 27], "r": [2, 3, 6, 7, 11, 15, 18, 19, 20, 22, 23, 25, 27, 33, 34, 41, 43], "packag": [2, 19, 25, 27, 33, 38, 40], "robustgasp": [2, 25, 33, 34], "see": [2, 15, 21, 27, 40, 43], "gu": [2, 27, 34], "et": [2, 15, 27, 30, 38, 40, 42, 43], "al": [2, 15, 27, 30, 38, 40, 42, 43], "2019": [2, 27, 34], "more": [2, 27, 40, 41, 42, 43], "detail": [2, 15, 27, 30, 38, 40, 43], "ha": [2, 7, 12, 22, 23, 27, 30, 33, 43], "13": [2, 3, 6, 34], "input": [2, 3, 15, 18, 19, 20, 21, 22, 23, 27, 30, 31, 36, 40, 41, 42, 43, 44], "paramet": [2, 3, 6, 7, 11, 15, 18, 19, 20, 21, 22, 23, 26, 27, 30, 31, 33, 34, 36, 37, 38, 40, 42, 43, 44], "5": [2, 3, 6, 7, 10, 11, 15, 18, 21, 27, 34, 42, 43], "name": [2, 19, 20, 21, 22, 23, 27, 30, 31, 33, 42, 43, 44], "mathbf": [2, 7, 11, 27, 31, 41, 42], "y": [2, 3, 6, 10, 12, 15, 18, 19, 20, 27, 30, 36, 40, 41, 42, 43], "f": [2, 3, 6, 12, 15, 19, 20, 21, 22, 23, 27, 34, 41, 42], "x": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 27, 30, 31, 36, 37, 40, 41, 42, 43], "where": [2, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 27, 31, 37, 42, 43], "x_1": [2, 7, 11, 15, 27, 36], "ldot": [2, 27], "x_": [2, 27], "t": [2, 18, 27, 33, 34, 42, 43], "y_1": 2, "y_5": 2, "train": [2, 3, 6, 15, 27, 30, 36], "test": [2, 18, 19, 20, 21, 22, 23, 25], "data": [2, 3, 6, 15, 18, 19, 20, 21, 22, 23, 27, 30, 31, 42, 43, 44], "provid": [2, 19, 20, 27, 30, 37, 42, 43, 44], "folder": [2, 18, 19, 20, 21, 22, 23], "first": [2, 3, 6, 12, 15, 18, 19, 20, 21, 22, 23, 25, 30, 33, 36, 40, 44], "load": [2, 18], "import": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 27, 30, 31, 36, 37, 38, 40, 42, 43, 44], "numpi": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 27, 30, 31, 36, 37, 38, 40, 42, 43, 44], "np": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 25, 31, 37], "o": [2, 6, 7, 10, 11, 12, 18, 19, 20, 21, 22, 23, 34], "dir_data": [2, 18, 19, 20, 21, 22, 23], "path": [2, 18, 19, 20, 21, 22, 23, 33, 42, 43], "abspath": [2, 18, 19, 20, 21, 22, 23], "humanityx": 2, "genfromtxt": 2, "join": [2, 18, 19, 20, 21, 22, 23], "csv": 2, "delimit": [2, 19], "humanityi": 2, "print": [2, 11, 12, 15, 19, 20, 21, 22, 23], "number": [2, 3, 6, 10, 11, 12, 15, 21, 27, 30, 31, 33, 36, 37, 38, 40, 43, 44], "point": [2, 3, 6, 15, 17, 19, 20, 24, 27, 30, 31, 36, 37, 38, 40, 41, 44], "shape": [2, 27, 30, 31, 36, 37, 38, 40, 42, 43, 44], "0": [2, 3, 4, 6, 7, 8, 10, 11, 12, 13, 15, 16, 18, 19, 20, 21, 22, 24, 27, 29, 30, 31, 36, 37, 38, 40, 42, 43, 44], "dimens": [2, 3, 6, 27, 30, 31, 36, 37, 38, 40], "1": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 27, 29, 30, 31, 33, 34, 36, 37, 38, 40, 42, 43, 44], "humanityxt": 2, "humanityyt": 2, "120": 2, "you": [2, 3, 18, 19, 20, 21, 33], "mai": [2, 18, 19, 20, 21, 22, 23, 33, 37], "need": [2, 6, 7, 11, 12, 15, 18, 19, 20, 21, 22, 23, 26, 27, 33, 36, 41, 44], "modifi": [2, 18, 19, 20, 21], "accord": [2, 3, 18, 19, 20, 21, 27], "save": [2, 18, 19, 20, 21, 22, 23, 43, 44], "them": [2, 19, 20, 22, 23, 44], "your": [2, 18, 19, 20, 21, 33], "local": [2, 18, 19, 20, 21, 22, 23, 42], "machin": [2, 18, 19, 20, 21, 22, 23, 30], "human": 2, "correspond": [2, 3, 21, 22, 23, 27, 30, 31, 36, 37, 38, 42, 43, 44], "design": [2, 3, 15, 27, 30, 34], "respons": [2, 3, 15, 27], "respect": [2, 19, 20, 27, 42, 43], "which": [2, 3, 6, 7, 10, 11, 12, 15, 19, 20, 21, 22, 23, 26, 27, 30, 31, 33, 37, 40, 41, 43, 44], "make": [2, 3, 11, 27, 30, 31, 33, 34], "predict": [2, 3, 27, 30, 33], "onc": [2, 6, 19, 20, 21, 27], "true": [2, 3, 6, 10, 12, 15, 19, 20, 21, 22, 23, 27, 37, 38, 40, 42, 43, 44], "valid": [2, 3, 15, 25, 27, 40], "perform": [2, 3, 7, 11, 18, 27, 33, 40, 41, 44], "To": [2, 6, 7, 11, 19, 20, 22, 23, 27], "build": [2, 3, 6, 26, 30], "abov": [2, 3, 10, 12, 15, 18, 19, 20, 21, 22, 23], "from": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 25, 30, 31, 33, 36, 37, 38, 40, 41, 42, 43, 44], "psimpi": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 25, 27, 30, 31, 33, 36, 37, 38, 40, 42, 43, 44], "Then": [2, 3, 6, 11, 27, 36], "creat": [2, 3, 6, 7, 10, 11, 12, 18, 19, 20, 21, 22, 23, 33, 43], "an": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 27, 30, 32, 34, 37, 40, 41, 42, 44], "instanc": [2, 3, 6, 7, 10, 11, 12, 18, 19, 20, 22, 23, 30, 31], "ndim": [2, 3, 6, 7, 10, 11, 12, 15, 27, 30, 31, 36, 37, 38, 40], "must": [2, 3, 19, 20, 22, 23, 30, 37, 40, 43, 44], "specifi": [2, 3, 19, 20, 22, 23, 27, 43], "option": [2, 3, 10, 19, 20, 27, 30, 31, 33, 36, 37, 38, 40, 43, 44], "method": [2, 3, 6, 7, 10, 11, 12, 18, 19, 20, 21, 22, 23, 26, 32, 33, 35, 39, 41], "kernel_typ": [2, 3, 27], "etc": [2, 3, 6, 18, 19, 20, 21], "can": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 25, 26, 27, 30, 31, 33, 36, 37, 38, 40, 41, 42], "set": [2, 3, 6, 10, 12, 15, 18, 21, 22, 23, 25, 27, 30, 31, 33, 37, 44], "up": [2, 3, 6, 27, 30, 31, 37], "desir": [2, 3, 19, 20], "leav": [2, 3, 15, 19, 20, 22, 23, 27], "default": [2, 3, 10, 18, 19, 20, 21, 22, 23, 27, 30, 33, 36, 37, 40, 43, 44], "valu": [2, 3, 6, 7, 15, 18, 19, 20, 21, 22, 23, 26, 27, 30, 31, 36, 37, 38, 40, 42, 43, 44], "next": [2, 6, 11], "base": [2, 3, 6, 12, 15, 21, 22, 23, 27, 30, 31, 33, 34, 37, 38, 40, 41, 43], "upper": [2, 3, 6, 15, 25, 30, 31, 36, 37, 38], "bound": [2, 3, 6, 7, 10, 12, 15, 25, 27, 30, 31, 36, 37, 38], "rang": [2, 3, 6, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 27, 36, 40, 43], "299": 2, "331": 2, "54": [2, 6], "297": [2, 34], "1066": 2, "298": 2, "2833": 2, "9167": 2, "2838": 2, "6795": [2, 6], "7972": 2, "2889": 2, "300": [2, 6, 42, 43], "6043": [2, 6], "4275": 2, "301": 2, "0958": 2, "initi": [2, 3, 6, 15, 18, 21, 27, 30, 36, 37, 40, 42], "98662": 2, "9908": 2, "942133": 2, "965665": 2, "978334": 2, "965676": 2, "99359": 2, "975944": 2, "985778": 2, "6": [2, 6, 7, 10, 18, 19, 20, 34, 36, 42], "012085": 2, "008551": 2, "021916": 2, "start": [2, 3, 6, 15, 21, 22, 23, 29, 37], "optim": [2, 3, 6, 15, 27, 30], "iter": [2, 3, 6, 10, 11, 15, 30, 36, 37], "46": [2, 34], "margin": [2, 3, 6, 15, 27], "posterior": [2, 3, 6, 7, 15, 30, 31, 32, 34], "5279": 2, "534": [2, 20, 24], "25": [2, 6, 15], "46132": 2, "2": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 22, 23, 27, 29, 30, 31, 34, 36, 37, 38, 40, 42, 43], "891428": 2, "30812": 2, "26": [2, 6, 21], "95519": 2, "291": 2, "1829": 2, "48": 2, "17274": 2, "84": [2, 6], "56133": 2, "874385": 2, "39": [2, 3, 6], "12121": 2, "51": 2, "81304": 2, "5407651": 2, "728696": 2, "020605": 2, "nugget": [2, 3, 6, 15, 27], "converg": [2, 3, 6, 15], "12": [2, 6, 15, 16, 19, 21, 34], "37503": 2, "38367": 2, "28307": 2, "33172": 2, "3579": 2, "33174": 2, "38944": 2, "35296": 2, "37329": 2, "42767": 2, "42037": 2, "44799": 2, "43": 2, "308119": 2, "1831": 2, "17271": 2, "56135": 2, "1212": 2, "81301": 2, "With": [2, 3], "ani": [2, 3, 15, 18, 27, 31, 36], "arbitrari": [2, 3], "matplotlib": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20], "pyplot": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20], "plt": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20], "fig": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20], "ax": [2, 3, 6, 7, 10, 11, 12, 18, 19, 20], "subplot": [2, 3, 6, 7, 10, 11, 15, 18, 19, 20], "figsiz": [2, 3, 6, 7, 10, 11, 15, 18, 19, 20], "15": [2, 3, 6, 18, 21, 34], "set_xlabel": [2, 3, 6, 7, 10, 11, 12, 18, 19, 20], "actual": [2, 3], "y_": 2, "set_ylabel": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20], "set_xlim": [2, 3, 6, 7, 10, 11, 18], "min": [2, 3], "max": [2, 3, 21, 27], "set_ylim": [2, 3, 6, 7, 10, 11], "_": [2, 3, 6, 10, 27], "plot": [2, 3, 6, 7, 10, 15, 18], "errorbar": [2, 3], "3": [2, 3, 6, 12, 15, 18, 22, 23, 25, 27, 33, 34, 40, 42, 43], "fmt": [2, 3], "linestyl": [2, 3, 15], "label": [2, 3, 6, 27], "std": [2, 3, 40], "legend": [2, 3, 6], "tight_layout": [2, 3, 6, 7, 11, 12, 15, 18, 19, 20], "also": [2, 3, 7, 12, 21, 22, 23, 26, 27, 33, 37, 40], "draw": [2, 3, 6, 10, 11, 12, 15, 27, 30, 31, 36, 37, 38], "sampl": [2, 3, 6, 7, 9, 13, 15, 21, 30, 31, 35, 40, 44], "ppgaspsampl": 2, "nsampl": [2, 3, 7, 10, 11, 15, 27, 31, 36, 37], "10": [2, 3, 6, 7, 10, 11, 12, 18, 19, 20, 34, 43], "total": [2, 3, 4, 6, 7, 8, 10, 11, 12, 13, 15, 16, 18, 19, 20, 21, 22, 23, 24, 34, 40, 42], "run": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 25, 26, 27, 30, 31, 33, 34, 40, 41, 42, 43], "time": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 26, 27, 42, 43, 44], "script": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23], "minut": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23], "4": [2, 3, 6, 7, 10, 11, 15, 20, 21, 22, 23, 27, 34, 37, 42, 43], "728": [2, 4], "second": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23, 38, 40, 42, 43, 44], "plot_ppgasp": [2, 4], "py": [2, 3, 4, 6, 7, 8, 10, 11, 12, 13, 15, 16, 18, 19, 20, 21, 22, 23, 24, 33], "ipynb": [2, 3, 6, 7, 10, 11, 12, 15, 18, 19, 20, 21, 22, 23], "task": [3, 21, 26, 30, 40, 44], "sin": [3, 15], "few": 3, "given": [3, 6, 7, 10, 11, 12, 18, 19, 20, 21, 22, 23, 27, 30, 31, 37, 40, 41, 42, 43, 44], "below": [3, 11, 12, 15, 18, 27], "8": [3, 6, 15, 27, 34, 42], "select": [3, 30], "def": [3, 6, 7, 11, 15, 22, 23], "return": [3, 6, 7, 11, 15, 18, 19, 21, 22, 23, 26, 27, 30, 31, 36, 37, 38, 40, 42, 43, 44], "arang": [3, 18, 19, 20, 21], "1983": 3, "214": 3, "66427": 3, "79116": 3, "237467": 3, "21875": 3, "9": [3, 6, 15, 25, 27, 33, 34, 42], "one": [3, 6, 7, 12, 15, 19, 20, 21, 22, 23, 27, 30, 31, 36, 40, 43], "out": [3, 15, 27, 34, 41], "cross": [3, 18, 27], "loo_valid": [3, 27], "let": [3, 10, 15, 27, 42], "": [3, 6, 7, 10, 11, 15, 18, 19, 20, 21, 27, 30, 33, 34, 35, 38, 42, 43], "v": [3, 18, 19, 20, 43], "error": [3, 21, 22, 23], "bar": [3, 15], "indic": [3, 12, 15, 30, 31, 34, 37, 38, 39, 40], "standard": [3, 27], "deviat": [3, 27], "our": [3, 22, 23, 33], "deposit": [3, 43], "testing_input": [3, 27, 30], "should": [3, 6, 11, 27, 30, 31, 33, 36, 38, 43, 44], "note": [3, 6, 11, 18, 22, 23, 27, 30, 33, 36, 43], "testing_trend": [3, 27, 30], "trend": [3, 27, 30], "dure": [3, 22, 23], "mean": [3, 11, 12, 22, 23, 27, 30, 31, 37, 43], "scatter": [3, 6, 7, 10, 11, 12, 15, 18], "c": [3, 6, 7, 10, 11, 15, 18, 27, 42], "k": [3, 6, 25, 27, 41, 42], "zorder": [3, 6], "fill_between": 3, "alpha": [3, 6, 7, 11, 15, 27, 42], "95": [3, 6, 15, 40], "ci": 3, "xlabel": 3, "ylabel": 3, "xlim": 3, "sphinx_gallery_thumbnail_numb": [3, 11], "nois": 3, "free": 3, "often": [3, 27, 33, 36, 44], "case": [3, 6, 12, 15, 19, 20, 21, 22, 23, 30, 36], "determinist": [3, 40], "If": [3, 12, 15, 19, 20, 21, 22, 23, 27, 30, 31, 33, 36, 37, 38, 40, 42, 43, 44], "deal": 3, "noisi": 3, "nugget_est": [3, 27], "estim": [3, 6, 7, 15, 27, 31, 32, 34, 37], "558": [3, 4], "plot_scalargasp": [3, 4], "00": [4, 8, 13, 16, 24], "05": [4, 11, 13], "286": 4, "execut": [4, 8, 13, 16, 24, 41, 44], "auto_examples_emul": 4, "file": [4, 8, 13, 16, 19, 20, 21, 22, 23, 24, 30, 42, 43, 44], "04": [4, 13, 24, 34], "mb": [4, 8, 13, 16, 24], "bayesian": [5, 6, 8, 27, 30, 31, 34], "activ": [5, 8, 33, 34], "learn": [5, 8, 27, 34], "inference_python": 5, "inference_jupyt": 5, "activelearn": [6, 32], "unnorm": [6, 7, 11, 30, 31, 32], "involv": [6, 22, 23, 30], "onli": [6, 22, 23, 30, 40, 41, 43, 44], "purpos": [6, 10, 22, 23, 30, 38], "rather": [6, 27], "than": [6, 27, 30, 43], "real": [6, 15, 31, 41, 44], "For": [6, 10, 19, 20, 21, 27, 30, 31, 43], "simplic": [6, 15], "requir": [6, 10, 11, 12, 18, 19, 20, 21, 22, 23, 25, 30, 41, 42, 43, 44], "argument": [6, 7, 30, 31, 37], "includ": [6, 18, 19, 20, 21, 22, 23, 33, 42, 43], "likelihood": [6, 7, 27, 30, 31, 34], "pure": [6, 41], "made": 6, "realist": 6, "refer": [6, 27, 29, 30, 33, 43], "zhao": [6, 15, 27, 30, 34, 42], "kowalski": [6, 30, 34], "2022": [6, 30, 34], "defin": [6, 11, 15, 21, 22, 23, 27, 30, 33, 41, 42, 43, 44], "prior": [6, 7, 30, 31], "distribut": [6, 10, 11, 15, 27, 31, 32, 36, 37], "its": [6, 7, 10, 11, 15, 19, 20, 21, 27, 33, 36, 37, 40, 43], "variabl": [6, 10, 12, 21, 22, 23, 27, 30, 33, 36, 44], "observ": [6, 30, 31], "thei": [6, 19, 20], "basic": [6, 27, 31], "problem": [6, 12, 27, 31, 42], "arrai": [6, 7, 10, 11, 12, 15, 19, 20, 21, 22, 23, 27, 30, 31, 36, 37, 38, 40, 42, 43, 44], "x1": [6, 7, 11, 15, 31, 37], "x2": [6, 7, 11, 15, 31, 37], "y1": 6, "y2": 6, "uniform": [6, 7], "l": [6, 7, 27, 31], "exp": [6, 7, 11, 27], "100": [6, 7, 11, 12, 15, 40], "imagin": 6, "complex": [6, 31, 41], "solver": [6, 42], "computation": [6, 15, 26, 27, 30], "feasibl": 6, "grid": [6, 7, 10, 15, 31, 32, 43], "metropoli": [6, 7, 9, 13, 31, 32, 35], "hast": [6, 7, 9, 13, 31, 32, 35], "becaus": 6, "evalu": [6, 15, 26, 27, 30, 34, 40], "mani": [6, 15, 31, 41], "essenti": [6, 27, 41, 44], "lead": [6, 10, 12, 15, 22, 23, 27], "therefor": [6, 27, 31], "resort": [6, 15], "small": 6, "do": [6, 22, 23, 43], "so": [6, 41], "pass": [6, 21], "follow": [6, 7, 10, 11, 12, 15, 18, 21, 22, 23, 27, 33, 36, 37, 42], "run_sim_obj": [6, 30], "runsimul": [6, 17, 24, 30, 41], "carri": 6, "inform": [6, 15, 19, 20, 25, 27, 30, 43, 44], "lhs_sampler": [6, 10, 15, 30], "lh": [6, 10, 15, 30, 35], "order": [6, 12, 15, 21, 33, 38, 40, 43], "init": 6, "scalar_gasp": [6, 15, 30], "structur": [6, 30], "run_simul": [6, 22, 23, 44], "var_inp_paramet": [6, 21, 22, 23, 44], "seed": [6, 7, 10, 11, 15, 36, 37, 40], "object": [6, 21, 22, 23, 30], "active_learn": [6, 30, 33], "call": [6, 7, 10, 11, 12, 18, 19, 20, 21, 22, 23, 30, 31, 37, 41, 43, 44], "initial_simul": [6, 30], "iterative_emul": [6, 30], "new": [6, 11, 27, 30, 31, 37], "alloc": 6, "40": [6, 7], "60": 6, "adapt": [6, 27, 34, 43], "n0": [6, 30], "niter": [6, 30], "init_var_sampl": [6, 30], "init_sim_output": [6, 30], "mode": [6, 15, 19, 27, 30, 40], "parallel": [6, 15, 21, 22, 23, 27, 30, 34, 40, 41, 44], "max_work": [6, 15, 21, 22, 23, 30, 40, 44], "var_sampl": [6, 21, 22, 23, 30, 44], "420": 6, "7131": 6, "416": 6, "6473": 6, "414262": 6, "332945": 6, "23": [6, 24], "146": 6, "5038": 6, "30": [6, 15, 22, 23, 27, 34], "59659": 6, "130": 6, "5917": 6, "fals": [6, 12, 15, 19, 20, 22, 23, 27, 37, 38, 42, 43, 44], "9828751": 6, "9733764": 6, "16": [6, 21, 34], "5982": 6, "6064": 6, "418": 6, "0103": 6, "415": 6, "1878": 6, "360206": 6, "303755": 6, "27": [6, 21], "148": 6, "6792": 6, "19535": 6, "133": 6, "3286": 6, "9589025": 6, "9524277": 6, "19529": 6, "3285": 6, "372": 6, "0419": 6, "369": 6, "5298": 6, "7": [6, 15, 27, 34, 43], "440838": 6, "390595": 6, "34": [6, 20], "149": 6, "9595": 6, "64772": 6, "135": 6, "0584": 6, "9360715": 6, "9297509": 6, "64717": 6, "0548": 6, "412": 6, "0792": 6, "409": 6, "2967": 6, "241583": 6, "185933": 6, "28": 6, "151": 6, "304": 6, "31": [6, 21], "21546": 6, "136": [6, 34], "8634": 6, "9143024": 6, "9081287": 6, "33": 6, "21602": 6, "8597": 6, "373": 6, "5991": 6, "371": 6, "0765": 6, "471983": 6, "421529": 6, "152": 6, "6009": 6, "32": 6, "2851": 6, "141": 6, "3769": 6, "8935228": 6, "8874894": 6, "28086": 6, "3732": 6, "363": [6, 34], "7651": 6, "361": 6, "3088": 6, "275302": 6, "226176": 6, "153": 6, "5419": 6, "43467": 6, "787": 6, "8736668": 6, "8677675": 6, "43465": 6, "388": 6, "6202": 6, "385": 6, "9961": 6, "772404": 6, "719922": 6, "154": 6, "9929": 6, "6944": 6, "2097": 6, "854674": 6, "848903": 6, "6947": 6, "2113": 6, "368": 6, "5149": 6, "366": 6, "0266": 6, "370298": 6, "320531": 6, "22": [6, 21, 29], "155": 6, "4764": 6, "87171": 6, "8922": 6, "8364895": 6, "8308412": 6, "4765": 6, "90549": 6, "0137": 6, "303": 6, "005": [6, 34], "959": 6, "060099": 6, "019179": 6, "14": [6, 15, 21, 34], "8802": 6, "04396": 6, "6136": 6, "8190626": 6, "813532": 6, "04591": 6, "6189": 6, "271": 6, "7327": 6, "269": 6, "8979": 6, "434655": 6, "397958": 6, "156": 6, "1383": 6, "47655": 6, "3798": 6, "802347": 6, "7969293": 6, "46977": 6, "4259": 6, "229": 6, "754": 6, "228": 6, "2026": 6, "595079": 6, "564052": 6, "184": 6, "50828": 6, "8102": 6, "7863001": 6, "7809907": 6, "50295": 6, "8055": 6, "206": 6, "5918": 6, "205": 6, "1968": 6, "131835": 6, "103936": 6, "2348": 6, "79817": 6, "165": 6, "7708824": 6, "7656772": 6, "82609": 6, "1902": 6, "258": 6, "3488": 6, "256": 6, "166975": 6, "132086": 6, "4062": 6, "76576": 6, "157": 6, "0386": 6, "7560578": 6, "7509526": 6, "73883": 6, "9472": 6, "237": 6, "2817": 6, "235": 6, "745633": 6, "713589": 6, "5552": 6, "35": [6, 43], "36218": 6, "5205": 6, "7417925": 6, "7367837": 6, "37291": 6, "5609": 6, "250": 6, "7264": 6, "249": 6, "0334": 6, "014527": 6, "980667": 6, "21": [6, 34], "8768": 6, "90648": 6, "161": 6, "054": 6, "7280556": 6, "7231396": 6, "8767": 6, "92228": 6, "1123": 6, "238": 6, "9065": 6, "2933": 6, "778129": 6, "745866": 6, "6342": 6, "36": [6, 20], "30829": 6, "162": 6, "0199": 6, "7148183": 6, "7099916": 6, "30018": 6, "8524": 6, "245": 6, "248": 6, "243": [6, 34], "592": 6, "904959": 6, "871839": 6, "17": [6, 34], "3684": 6, "27097": 6, "5809": 6, "7020536": 6, "6973131": 6, "28256": 6, "5015": 6, "8438": 6, "91003": 6, "876875": 6, "29": [6, 21, 23], "014": 6, "15503": 6, "4561": 6, "6897369": 6, "6850796": 6, "0141": 6, "19571": 6, "4856": 6, "5607": 6, "9566": 6, "751214": 6, "719132": 6, "8456": 6, "99431": 6, "166": 6, "8476": 6, "6778449": 6, "6732679": 6, "8455": 6, "9843": 6, "8112": 6, "218": 6, "5445": 6, "217": 6, "0688": 6, "37089": 6, "341377": 6, "2612": 6, "37": 6, "52584": 6, "170": 6, "9858": 6, "666356": 6, "6618565": 6, "261": 6, "5272": 6, "9907": 6, "1098": 6, "226": 6, "5696": 6, "562197": 6, "531391": 6, "6105": 6, "33828": 6, "173": 6, "6169": 6, "6552501": 6, "6508256": 6, "6106": 6, "20479": 6, "2666": 6, "211": 6, "684": 6, "210": 6, "2546": 6, "23368": 6, "205093": 6, "4968": 6, "0747": 6, "6445083": 6, "6401563": 6, "8923": 6, "52424": 6, "017": 6, "199": 6, "9789": 6, "198": 6, "6286": 6, "999579": 6, "972572": 6, "0734": 6, "55227": 6, "0759": 6, "634113": 6, "6298312": 6, "0733": 6, "52729": 6, "172": [6, 15], "8307": 6, "202": 6, "9237": 6, "201": 6, "5534": 6, "058473": 6, "031069": 6, "171": [6, 15], "57767": 6, "5286": 6, "6240477": 6, "6198339": 6, "1709": 6, "52827": 6, "3748": 6, "190": [6, 19], "9983": 6, "189": 6, "7086": 6, "819965": 6, "794172": 6, "4187": 6, "85886": 6, "177": 6, "5027": 6, "6142969": 6, "610149": 6, "4192": 6, "86442": 6, "4215": 6, "5705": 6, "183": 6, "3242": 6, "69141": 6, "666484": 6, "150": 6, "3527": 6, "92872": 6, "0128": 6, "6048462": 6, "6007621": 6, "24": [6, 21], "352": 6, "92941": 6, "176": 6, "9876": 6, "689": 6, "2934": 6, "13378": 6, "105867": 6, "2293": 6, "73939": 6, "179": 6, "5156": 6, "5956819": 6, "5916596": 6, "2285": 6, "6686": 6, "2687": 6, "204": 6, "4555": 6, "203": 6, "0749": 6, "08911": 6, "061499": 6, "0359": 6, "07659": 6, "181": [6, 34], "8027": 6, "5867911": 6, "5828289": 6, "0361": 6, "09612": 6, "862": 6, "207": 6, "5545": 6, "15109": 6, "123061": 6, "147": 6, "2549": 6, "89036": 6, "8898": 6, "5781618": 6, "5742579": 6, "18": [6, 21, 23, 24], "2555": 6, "87001": 6, "82": 6, "9279": 6, "8008": 6, "338559": 6, "316015": 6, "0908": 6, "10173": 6, "5697827": 6, "5659353": 6, "091": 6, "11888": 6, "144": 6, "6147": 6, "54517": 6, "188": 6, "5363": 6, "5616429": 6, "5578505": 6, "19": [6, 34], "6151": 6, "27548": 6, "187": 6, "7642": 6, "9825": 6, "882": 6, "259651": 6, "23764": 6, "143": 6, "1453": 6, "74403": 6, "5537325": 6, "5499935": 6, "1451": 6, "74424": 6, "158": 6, "5408": 6, "4703": 6, "170816": 6, "149405": 6, "6959": 6, "65865": 6, "5460417": 6, "5423547": 6, "6958": 6, "65944": 6, "683": 6, "6385": 6, "09366": 6, "072771": 6, "140": 6, "1644": 6, "1494": 6, "5385617": 6, "5349251": 6, "1642": 6, "1205": 6, "7268": 6, "6685": 6, "134536": 6, "113371": 6, "138": 6, "6449": 6, "25719": 6, "5312838": 6, "5276964": 6, "6457": 6, "20511": 6, "159": 6, "9013": 6, "8216": 6, "198026": 6, "176432": 6, "799": 6, "12962": 6, "5242001": 6, "5206605": 6, "7995": 6, "23426": 6, "0852": 6, "0245": 6, "141704": 6, "12049": 6, "9791": 6, "28276": 6, "5173027": 6, "5138097": 6, "11": [6, 34], "9787": 6, "25762": 6, "7189": 6, "681": 6, "074379": 6, "05362": 6, "137": [6, 24], "3328": 6, "89731": 6, "5105845": 6, "5071368": 6, "3327": 6, "89795": 6, "3891": 6, "3129": 6, "187782": 6, "166257": 6, "134": 6, "9406": 6, "6762": 6, "5040385": 6, "5006351": 6, "9398": 6, "83421": 6, "832": 6, "7527": 6, "196639": 6, "175055": 6, "132": 6, "5023": 6, "64711": 6, "4976583": 6, "4942979": 6, "5029": 6, "69952": 6, "0987": 6, "0785": 6, "021975": 6, "00157": 6, "9007": 6, "04164": 6, "4914376": 6, "4881192": 6, "9016": 6, "90702": 6, "5391": 6, "4821": 6, "130783": 6, "109643": 6, "127": 6, "8529": 6, "65861": 6, "4853704": 6, "482093": 6, "8537": 6, "65893": 6, "6837": 6, "7068": 6, "893674": 6, "874135": 6, "126": 6, "3069": 6, "14805": 6, "4794513": 6, "4762139": 6, "3061": 6, "14945": 6, "4263": 6, "4308": 6, "948526": 6, "928616": 6, "123": 6, "3139": 6, "00776": 6, "4736748": 6, "4704763": 6, "3124": 6, "00792": 6, "8343": 6, "8766": 6, "836686": 6, "817532": 6, "121": 6, "3189": 6, "40012": 6, "4680358": 6, "4648754": 6, "3199": 6, "3783": 6, "8069": 6, "8696": 6, "776137": 6, "757392": 6, "119": 6, "9576": 6, "60408": 6, "4625295": 6, "4594063": 6, "9574": 6, "6049": 6, "7754": 6, "8519": 6, "735509": 6, "717038": 6, "117": 6, "3956": 6, "9288": 6, "4571512": 6, "4540644": 6, "3963": 6, "93923": 6, "122": 6, "4858": 6, "6587": 6, "449715": 6, "433174": 6, "1863": 6, "45945": 6, "4518966": 6, "4488452": 6, "1857": 6, "45861": 6, "124": 6, "7933": 6, "9507": 6, "495867": 6, "479014": 6, "114": 6, "3601": 6, "5128": 6, "4467614": 6, "4437447": 6, "51309": 6, "8507": 6, "0279": 6, "437013": 6, "420558": 6, "112": [6, 34], "4649": 6, "12543": 6, "4417416": 6, "4387588": 6, "4657": 6, "13681": 6, "2532": 6, "113": 6, "4817": 6, "285064": 6, "269635": 6, "110": 6, "9429": 6, "20": [6, 10, 12, 18, 19, 20, 21, 22, 23, 27, 43], "87695": 6, "4368334": 6, "4338837": 6, "9428": 6, "87687": 6, "107": 6, "5519": 6, "106": 6, "8257": 6, "151038": 6, "136513": 6, "109": 6, "6259": 6, "96839": 6, "432033": 6, "4291158": 6, "6258": 6, "96622": 6, "105": 6, "9321": 6, "2168": 6, "118642": 6, "104337": 6, "2887": 6, "81197": 6, "427337": 6, "4244515": 6, "2885": 6, "80782": 6, "103": 6, "7434": 6, "0429": 6, "074868": 6, "060858": 6, "104": 6, "942": 6, "35122": 6, "422742": 6, "4198875": 6, "3513": 6, "102": 6, "2359": 6, "101": 6, "5455": 6, "044717": 6, "030911": 6, "382": 6, "92818": 6, "4182447": 6, "4154206": 6, "38": 6, "3824": 6, "93008": 6, "947": 6, "2383": 6, "098939": 6, "084767": 6, "98": 6, "23267": 6, "94201": 6, "4138422": 6, "4110477": 6, "23364": 6, "94106": 6, "99": 6, "2743": 6, "1198": 6, "105486": 6, "94": 6, "36122": 6, "8138": 6, "4095313": 6, "406766": 6, "36013": 6, "81444": 6, "08534": 6, "44329": 6, "901707": 6, "888866": 6, "14024": 6, "52605": 6, "4053093": 6, "4025725": 6, "13983": 6, "52612": 6, "92": 6, "02781": 6, "91": [6, 19], "4064": 6, "840556": 6, "828128": 6, "90551": 6, "93414": 6, "4011735": 6, "3984647": 6, "90572": 6, "93369": 6, "2185": 6, "5215": 6, "06437": 6, "05043": 6, "85": 6, "41126": 6, "01591": 6, "3971213": 6, "3944398": 6, "40862": 6, "01616": 6, "12819": 6, "83": 6, "56012": 6, "682564": 6, "671202": 6, "90": [6, 43], "63195": 6, "03987": 6, "39315": 6, "3904954": 6, "63178": 6, "02786": 6, "finish": [6, 19, 20], "obtain": [6, 15, 27, 31, 37], "final": [6, 37], "logarithm": [6, 7, 30, 31, 37, 43], "approx_ln_pxl": [6, 30], "contour": [6, 7], "gridestim": [6, 7, 32], "grid_estim": [6, 7], "ln_pxl": [6, 7, 30, 31], "x_ndim": [6, 7, 31], "nbin": [6, 7, 31], "50": [6, 7, 15, 21, 22, 23], "marker": [6, 7, 10, 11, 12, 15, 18], "pick": [6, 10, 12, 30, 36], "1e": [6, 7, 42], "nan": [6, 7], "transpos": [6, 7, 11, 18, 27], "level": [6, 7, 11, 18, 19, 20, 30, 40], "colorbar": [6, 7, 18, 19, 20], "set_titl": [6, 7, 10, 11, 18, 19, 20], "860": 6, "plot_active_learn": [6, 8], "p": [7, 11, 27, 31, 34, 41, 43], "x_2": [7, 11, 15], "01": [7, 11, 24, 34], "x_i": [7, 15], "d": [7, 18, 19, 31, 42], "left": [7, 11, 15, 27, 31, 36, 42], "frac": [7, 11, 27, 31, 42], "right": [7, 11, 15, 27, 30, 31, 36, 41, 42], "bayes_infer": [7, 31], "figur": [7, 10, 11, 12, 15, 18, 36, 42], "mask": 7, "insignific": 7, "metropolishastingsestim": [7, 32], "mh_sampler": [7, 11, 31], "take": [7, 15, 21, 22, 23, 30, 42], "metropolishast": [7, 11, 31, 35], "mh_estim": 7, "metropolis_hast": [7, 11, 37], "scipi": [7, 11, 25, 30, 42], "stat": [7, 11], "multivariate_norm": [7, 11], "init_st": [7, 11, 37], "f_sampl": [7, 11, 37], "rv": [7, 11], "nburn": [7, 11, 37], "nthin": [7, 11, 37], "kwgs_f_sampl": [7, 11, 37], "random_st": [7, 11], "random": [7, 10, 11, 12, 27, 36, 37, 40], "default_rng": [7, 11], "5000": [7, 11, 18], "mh_sampl": [7, 11, 31, 37], "mh_accept": [7, 11, 31, 37], "drawn": [7, 27, 31, 36, 37, 40], "poperti": 7, "mh": 7, "besid": 7, "instanti": 7, "ln_prior": [7, 31], "ln_likelihood": [7, 31], "natur": [7, 30, 31, 37], "product": [7, 11, 21, 22, 23, 27, 30, 31], "619": [7, 8], "plot_bayes_infer": [7, 8], "06": [8, 42], "auto_examples_infer": 8, "000": [8, 24], "saltelli": [9, 13, 15, 34, 35, 40], "latin": [9, 13, 15, 30, 35], "hypercub": [9, 13, 15, 30, 35], "sampler_python": 9, "sampler_jupyt": 9, "have": [10, 22, 23, 27, 30, 33, 43], "two": [10, 12, 15, 22, 23, 30, 31, 34], "dimension": [10, 12, 27, 31, 34, 36, 41], "each": [10, 11, 15, 21, 22, 23, 27, 30, 31, 36, 37, 38, 40, 42, 43, 44], "uniformli": [10, 15, 36], "same": [10, 21, 22, 23, 31], "everi": 10, "when": [10, 11, 21, 22, 23, 40], "lhs_sampl": [10, 36], "blue": [10, 11], "criterion": [10, 15, 36, 43], "visibl": 10, "major": [10, 15], "axi": [10, 15, 31, 44], "both": [10, 15, 27, 43], "There": 10, "differ": [10, 15, 21, 22, 23, 44], "other": [10, 15, 18, 19, 20, 21, 22, 23, 27, 33, 36], "center": [10, 11, 36], "maximin": [10, 15, 36], "And": 10, "500": [10, 19, 20, 21], "251": [10, 13], "plot_latin": [10, 13], "target": [11, 37], "probabl": [11, 30, 31, 36, 37], "propto": 11, "hand": 11, "side": 11, "equat": [11, 27, 31, 41, 42], "densiti": [11, 30, 31, 37], "sinc": [11, 21, 27], "integr": [11, 31, 42], "equal": [11, 36, 37, 43], "happen": 11, "normal": [11, 27, 31, 37, 42], "constant": [11, 27, 30, 31, 37], "unknown": [11, 27, 31], "difficult": [11, 37], "target_dist": 11, "els": 11, "like": [11, 15, 18, 27, 31, 34, 37], "itertool": [11, 21, 22, 23], "x1_valu": 11, "linspac": 11, "x2_valu": 11, "target_valu": 11, "zero": [11, 27, 30], "j": [11, 27, 34, 43], "contourf": [11, 18, 19, 20], "cmap": 11, "choos": [11, 22, 23, 30, 37], "propos": [11, 31, 37], "determin": [11, 30, 43], "state": [11, 18, 21, 31, 37], "current": [11, 26, 32, 35, 37, 39, 41], "A": [11, 27, 30, 34, 37, 42, 43, 44], "usual": [11, 27, 37], "choic": 11, "reproduc": 11, "1000": [11, 12, 18], "accept": [11, 31, 37], "ratio": [11, 27, 31, 37, 43], "3712": 11, "704": [11, 13], "plot_metropolis_hast": [11, 13], "assum": [12, 15, 27, 42], "three": [12, 34, 36, 44], "z": [12, 18, 34, 36, 42], "200": [12, 15, 18, 21], "2000": [12, 18, 19, 20, 21], "saltelli_sampl": [12, 15], "calc_second_ord": [12, 15, 38, 40], "nbase": [12, 15, 38], "128": 12, "In": [12, 15, 19, 20, 21, 22, 23, 27, 30, 31, 33, 36, 42, 43], "sobol": [12, 14, 16, 35, 38, 39], "analysi": [12, 14, 16, 33, 34, 38, 39], "effect": [12, 15, 34, 40, 42, 43], "shown": [12, 31, 36, 42], "add_subplot": 12, "project": [12, 33], "3d": 12, "set_zlabel": 12, "len": [12, 21, 22, 23, 44], "640": 12, "want": [12, 21, 22, 23, 27, 33, 36, 41], "1024": [12, 15], "reason": [12, 21, 22, 23], "index": [12, 15, 34, 40], "directli": [12, 27, 31, 43], "355": [12, 13], "plot_saltelli": [12, 13], "310": 13, "auto_examples_sampl": 13, "sensitivity_python": 14, "sensitivity_jupyt": 14, "sobolanalyz": [15, 39], "u": [15, 27, 36, 42], "consid": [15, 36, 43], "ishigami": 15, "le": [15, 34], "gratiet": [15, 34], "2014": [15, 34], "x_3": 15, "mathrm": 15, "_2": 15, "pi": 15, "x3": 15, "variat": [15, 27], "quantifi": 15, "contribut": 15, "interact": [15, 34], "step": [15, 18, 21, 27, 30, 33, 37, 42, 43], "sobol_analyz": 15, "s_re": [15, 40], "s1": [15, 40], "analyt": [15, 31, 41], "solut": [15, 30, 42], "314": 15, "442": 15, "31430871": 15, "44545644": 15, "01325799": 15, "result": [15, 18, 19, 20, 27, 31], "repres": [15, 19, 20, 21, 22, 23, 27, 31, 37, 42, 43], "well": [15, 18], "confid": [15, 40], "interv": [15, 36, 40], "red": [15, 18], "star": 15, "name_var": 15, "st": [15, 40], "color": 15, "69b3a2": 15, "3399e6": 15, "width": 15, "capsiz": 15, "ax1": 15, "yerr": 15, "set_xtick": 15, "set_xticklabel": 15, "tick_param": 15, "bottom": 15, "labelcolor": 15, "yaxi": 15, "grei": 15, "ax2": 15, "twinx": 15, "between": [15, 27, 33], "effet": 15, "interest": [15, 22, 23, 43, 44], "world": [15, 31, 41, 44], "applic": [15, 43], "veri": 15, "expens": [15, 26, 27, 30, 33, 34], "techniqu": [15, 30], "effici": [15, 30, 33, 34], "conduct": 15, "2021": [15, 27, 34, 42], "theori": [15, 29, 30, 38, 40, 43], "approxim": [15, 26, 27, 30, 31, 34, 37], "befor": [15, 22, 23, 31, 33, 43], "move": 15, "induc": [15, 42, 43], "uncertainti": [15, 26, 27, 30, 33, 34, 44], "account": [15, 42], "realiz": [15, 21, 27, 40], "n": [15, 21, 27, 31, 36, 38], "3988": 15, "3996": 15, "0213": 15, "427975": 15, "447992": 15, "440426": 15, "284": 15, "0714": 15, "183999": 15, "786247": 15, "315419": 15, "721972": 15, "732027": 15, "728226": 15, "28708846": 15, "47245889": 15, "0073529": 15, "674": [15, 16], "plot_sobol_analyz": [15, 16], "auto_examples_sensit": 16, "mass": [17, 19, 20, 24, 33, 34, 41, 43], "ravaflow3g": [17, 19, 24, 25, 33], "mixtur": [17, 24], "simulator_python": 17, "simulator_jupyt": 17, "movement": [18, 42], "masspoint": [18, 21, 42], "topographi": [18, 19, 20, 21, 42], "masspointmodel": [18, 21, 22, 23, 41], "mpm": [18, 21], "topograph": [18, 21, 34], "digit": [18, 21], "elev": [18, 19, 20, 21, 22, 23, 42, 43], "esri": [18, 21, 42], "ascii": [18, 19, 20, 21, 42], "format": [18, 19, 20, 21, 42, 43], "friction": [18, 21, 42, 43], "coeffici": [18, 21, 42, 43], "coulomb": [18, 21, 42], "turbul": [18, 21, 42, 43], "locat": [18, 19, 20, 21, 36, 42, 43], "veloc": [18, 19, 20, 21, 42, 43], "end": [18, 21, 22, 23, 27, 42, 43], "synthet": [18, 19, 20, 21], "synthetic_topo": [18, 19, 20, 21, 22, 23], "asc": [18, 19, 20, 21, 22], "linecach": [18, 19, 20], "visul": [18, 19, 20], "dot": [18, 27], "header": [18, 19, 20], "getlin": [18, 19, 20], "header_valu": [18, 19, 20], "float": [18, 19, 20, 25, 27, 30, 40, 42, 43], "h": [18, 19, 20, 27, 34, 43], "split": [18, 19, 20], "strip": [18, 19, 20], "ncol": [18, 19, 20], "nrow": [18, 19, 20], "xll": [18, 19, 20], "yll": [18, 19, 20], "cellsiz": [18, 19, 20, 43], "int": [18, 19, 20, 27, 30, 31, 36, 37, 38, 40, 42, 43, 44], "x_valu": 18, "y_valu": 18, "z_valu": 18, "loadtxt": [18, 19], "skiprow": [18, 19], "rot90": 18, "x0": [18, 21, 42], "y0": [18, 21, 42], "z0": 18, "height_ratio": 18, "fig0": [18, 19, 20], "cbar": 18, "orient": [18, 19, 20], "horizont": 18, "fraction": [18, 19, 20], "pad": 18, "section": [18, 27, 33], "mu": [18, 42], "xi": [18, 31, 42], "suppress": [18, 43], "rais": [18, 19], "warn": [18, 19], "filterwarn": 18, "ignor": [18, 43], "coulomb_frict": [18, 21, 42], "turbulent_frict": [18, 19, 20, 21, 22, 23, 42, 43], "histori": [18, 21, 42], "035": 18, "plot_mass_point_model": [18, 24], "flow": [19, 20, 33, 34, 41, 42, 43], "ravaflow24mixtur": [19, 22], "dir_sim": [19, 20, 22, 23, 43], "directori": [19, 20, 22, 23, 43, 44], "avaflow": [19, 20, 22, 23, 33, 34, 41, 43], "temp_ravaflow24mixture_exampl": 19, "cwd": [19, 20, 21, 22, 23], "getcwd": [19, 20, 21, 22, 23], "exist": [19, 20, 21, 22, 23, 44], "mkdir": [19, 20, 21, 22, 23], "now": [19, 20, 21, 22, 23, 33], "time_step": [19, 20, 43], "time_end": [19, 20, 22, 23, 43], "curvature_control": [19, 20, 43], "entrainment_control": [19, 20, 43], "stopping_control": [19, 20, 43], "voellmy_model": [19, 20, 22, 23], "home": [19, 22, 29], "src": 19, "88": 19, "futurewarn": 19, "modul": [19, 25, 26, 30, 31, 32, 33, 35, 39, 40, 41, 43, 44], "deprec": [19, 25, 43], "futur": 19, "version": [19, 25, 27, 33, 35, 38], "pleas": [19, 22, 23, 27, 30, 33, 43], "instead": [19, 21, 22, 23], "raster": [19, 20, 42, 43], "hreleas": [19, 20, 22, 23, 43], "releas": [19, 20, 25, 29, 43], "height": [19, 20, 43], "prefix": [19, 20, 21, 22, 23, 30, 43, 44], "georeferenc": [19, 20, 43], "grass": [19, 20, 43], "epsg": [19, 20, 22, 23, 43], "internal_frict": [19, 20, 43], "basal_frict": [19, 20, 22, 23, 43], "entrainment_coef": [19, 20, 43], "tif": [19, 20, 22, 23], "synthetic_rel": [19, 20, 22, 23], "shell": [19, 20, 43], "preprocess": [19, 20, 22, 23, 43], "grass_loc": [19, 20, 22, 23, 43], "sh_file": [19, 20, 22, 23, 43], "2326": [19, 20, 22, 23], "266": 19, "your_prefix_result": [19, 20], "synthetic_result": [19, 20], "extract": [19, 20, 43], "visual": [19, 20], "overal": [19, 20, 22, 23, 31, 37, 43], "impact": [19, 20, 22, 23, 43], "area": [19, 20, 22, 23, 43], "maximum": [19, 20, 21, 27, 30, 40, 43, 44], "specif": [19, 20, 27, 41, 42, 43], "impact_area": [19, 20, 22, 23, 43], "extract_impact_area": [19, 20, 22, 23, 43], "m": [19, 20, 27, 34, 36, 42, 43], "v_mmax": [19, 20], "extract_qoi_max": [19, 20, 43], "aggreg": [19, 20, 43], "loc": [19, 20, 43], "1500": [19, 20], "v_max_loc": [19, 20], "extract_qoi_max_loc": [19, 20, 43], "traceback": 19, "most": [19, 30], "recent": 19, "last": [19, 36], "doc": [19, 22, 25], "plot_ravaflow24": 19, "line": [19, 22, 23], "325": 19, "qoi_max_rast": 19, "qoi_max_raster_asc": 19, "root": 19, "miniconda3": 19, "env": 19, "lib": 19, "python3": 19, "site": 19, "npyio": 19, "1373": 19, "arr": 19, "_read": 19, "fname": 19, "dtype": 19, "comment": 19, "992": 19, "fh": 19, "_datasourc": 19, "open": [19, 33, 34, 43], "rt": 19, "encod": [19, 27], "193": 19, "newlin": 19, "533": 19, "filenotfounderror": 19, "found": [19, 22, 38, 40], "synthetic_ascii": 19, "synthetic_hflow_max": 19, "wise": [19, 20], "heatmap": [19, 20], "head": [19, 20], "coordin": [19, 20, 31, 42, 43], "hmax_asc": [19, 20], "_result": [19, 20], "_ascii": [19, 20], "_hflow_max": [19, 20], "h_max": [19, 20], "v_max": [19, 20], "cbar0": [19, 20], "1f": [19, 20], "vertic": [19, 20], "fig1": [19, 20], "cbar1": [19, 20], "delet": [19, 20, 21, 22, 23], "therein": [19, 20, 21, 22, 23], "shutil": [19, 20, 21, 22, 23], "rmtree": [19, 20, 21, 22, 23], "275": 19, "ravaflow3gmixtur": [20, 23, 41], "temp_ravaflow3gmixture_exampl": 20, "1359200": 20, "41": 20, "802": 20, "685": 20, "779": 20, "plot_ravaflow3g": [20, 24], "multipl": [21, 22, 23, 26, 27, 40, 43, 44], "serial": [21, 22, 23, 30, 40, 41, 44], "parallelli": [21, 22, 23, 44], "mpm_simul": 21, "solv": [21, 41, 42], "while": 21, "keep": [21, 22, 23], "fix": [21, 22, 23, 27, 44], "iput": 21, "list": [21, 30, 31, 37, 44], "string": [21, 22, 23, 30], "Their": 21, "2001": 21, "400": 21, "dictionari": [21, 44], "fix_inp": [21, 22, 23, 44], "tend": [21, 42], "ux0": [21, 42], "uy0": [21, 42], "curvatur": [21, 34, 42, 43], "automat": [21, 25, 33], "later": [21, 22, 23, 25, 33], "inspect": [21, 22, 23], "dir_out": [21, 22, 23, 44], "save_out": [21, 22, 23, 44], "temp_run_masspointmodel_exampl": 21, "run_mpm_simul": 21, "give": [21, 31, 36, 37], "uniqu": 21, "avoid": [21, 25], "conflict": [21, 22, 23], "serial_prefix": [21, 22, 23], "str": [21, 22, 23, 27, 30, 36, 40, 42, 43, 44], "parallel_prefix": [21, 22, 23], "serial_run": [21, 22, 23, 30, 44], "parallel_run": [21, 22, 23, 30, 44], "serial_tim": [21, 22, 23], "serial_output": [21, 22, 23], "control": [21, 30, 43, 44], "parallel_tim": [21, 22, 23], "parallel_output": [21, 22, 23], "691016674041748": 21, "2793431282043457": 21, "done": 21, "listdir": [21, 22, 23], "parallel1_output": [21, 23], "npy": [21, 23], "parallel0_output": [21, 23], "parallel11_output": 21, "serial2_output": [21, 23], "parallel3_output": [21, 23], "parallel7_output": 21, "parallel10_output": 21, "parallel9_output": 21, "parallel6_output": 21, "parallel4_output": 21, "parallel5_output": 21, "serial3_output": [21, 23], "serial9_output": 21, "serial0_output": [21, 23], "serial5_output": 21, "parallel2_output": [21, 23], "serial8_output": 21, "serial10_output": 21, "serial1_output": [21, 23], "serial6_output": 21, "parallel8_output": 21, "serial11_output": 21, "serial4_output": 21, "serial7_output": 21, "access": 21, "attribut": [21, 30], "max_v": 21, "parallel0": [21, 22], "parallel11": 21, "55505557211892": 21, "014114896121015": 21, "245546886730782": 21, "78487303612985": 21, "34198274528081": 21, "371864007499866": 21, "249957243412815": 21, "485487855011687": 21, "031665649204944": 21, "589324449452967": 21, "092803891476187": 21, "99727320816709": 21, "fail": [21, 22, 23], "due": [21, 22, 23, 31], "whatev": [21, 22, 23], "massag": [21, 22, 23], "screen": [21, 22, 23], "continu": [21, 22, 23], "writ": [21, 22, 23], "element": [21, 22, 23, 27, 31, 37, 41], "messag": [21, 22, 23], "976": 21, "plot_run_mass_point_model": [21, 24], "temp1_run_ravaflow24mixture_exampl": 22, "reduc": [22, 23, 26, 30, 37], "write": [22, 23], "demonstr": [22, 23], "four": [22, 23], "treat": [22, 23, 27], "special": [22, 23, 40], "Such": [22, 23, 41], "seper": [22, 23], "o_paramet": [22, 23, 44], "temp2_run_ravaflow24mixture_exampl": 22, "otherwis": [22, 23], "reli": [22, 23, 33, 38, 40], "third": [22, 23], "parti": [22, 23], "softwar": [22, 23, 33, 34, 43], "bodi": [22, 23, 44], "recommend": [22, 23, 43], "addit": [22, 23, 27, 44], "doe": [22, 23], "disk": [22, 23, 44], "similarli": [22, 23, 27], "append": [22, 23, 44], "except": [22, 43], "occur": 22, "serial0": 22, "serial0_result": [22, 23], "serial0_ascii": 22, "serial0_hflow_max": 22, "serial1": 22, "serial1_result": [22, 23], "serial1_ascii": 22, "serial1_hflow_max": 22, "serial2": 22, "serial2_result": [22, 23], "serial2_ascii": 22, "serial2_hflow_max": 22, "serial3": 22, "serial3_result": [22, 23], "serial3_ascii": 22, "serial3_hflow_max": 22, "parallel0_result": [22, 23], "parallel0_ascii": 22, "parallel0_hflow_max": 22, "parallel1": 22, "parallel1_result": [22, 23], "parallel1_ascii": 22, "parallel1_hflow_max": 22, "parallel2": 22, "parallel2_result": [22, 23], "parallel2_ascii": 22, "parallel2_hflow_max": 22, "parallel3": 22, "parallel3_result": [22, 23], "parallel3_ascii": 22, "parallel3_hflow_max": 22, "2748091220855713": 22, "4030134677886963": 22, "parallel3_gloc": [22, 23], "serial2_gloc": [22, 23], "serial1_gloc": [22, 23], "parallel0_shel": [22, 23], "sh": [22, 23], "parallel1_shel": [22, 23], "parallel3_shel": [22, 23], "serial3_shel": [22, 23], "parallel2_gloc": [22, 23], "serial1_shel": [22, 23], "serial2_shel": [22, 23], "parallel1_gloc": [22, 23], "parallel0_gloc": [22, 23], "serial0_shel": [22, 23], "serial3_gloc": [22, 23], "parallel2_shel": [22, 23], "serial0_gloc": [22, 23], "703": 22, "plot_run_ravaflow24": 22, "temp1_run_ravaflow3gmixture_exampl": 23, "temp2_run_ravaflow3gmixture_exampl": 23, "942800": 23, "1425600": 23, "640400": 23, "838400": 23, "49": 23, "1287362575531": 23, "414560079574585": 23, "603": [23, 24], "plot_run_ravaflow3g": [23, 24], "02": [24, 34], "auto_examples_simul": 24, "introduc": 25, "updat": [25, 27, 31], "accordingli": [25, 36], "remov": 25, "constraint": 25, "depend": [25, 27, 33, 37, 41], "elabor": 25, "instal": [25, 29, 41], "pip": [25, 33], "conda": 25, "forg": [25, 33], "channel": 25, "add": [25, 33], "info": 25, "about": [25, 31], "float128": 25, "issu": 25, "window": 25, "system": [25, 33, 41, 42, 44], "metadata": [25, 43], "host": [26, 30, 32, 35, 39, 40, 41, 44], "known": [26, 27], "surrog": 26, "meta": 26, "type": [26, 27, 30, 31, 36, 37, 38, 40, 41, 42, 43, 44], "cheap": 26, "greatli": [26, 27], "cost": 26, "intens": 26, "global": [26, 33, 34], "anlaysi": 26, "quantif": [26, 33, 34], "calibr": [26, 30, 33, 34], "implement": [26, 27, 30, 31, 32, 33, 35, 39, 41, 43, 44], "scalar": [26, 27, 30, 37, 40, 43], "stand": 27, "robust": [27, 34], "stochast": [27, 34, 40], "develop": [27, 34, 43], "improv": [25, 27], "built": [27, 40], "partial": [27, 34, 41], "berger": [27, 34], "2016": [27, 34], "rpy2": 27, "allow": [27, 31], "within": [27, 40, 43, 44], "map": [27, 41], "space": [27, 36, 41], "perspect": 27, "belief": [27, 31], "modest": 27, "much": 27, "faster": 27, "demand": 27, "analys": [27, 33, 44], "chapter": 27, "cdot": [27, 42], "denot": [27, 30, 42], "x_p": 27, "mathcal": [27, 41], "subset": [27, 41], "mathbb": [27, 41], "sim": 27, "fulli": 27, "covari": 27, "parametr": 27, "regress": 27, "boldsymbol": [27, 42], "beta": 27, "sum_": [27, 31], "q": 27, "h_": 27, "beta_": 27, "vector": [27, 42], "chosen": [27, 40], "basi": 27, "commonli": 27, "some": 27, "prescrib": 27, "polynomi": 27, "stationari": [27, 37], "typic": 27, "separ": [27, 43], "form": 27, "sigma": 27, "prod_": 27, "c_": 27, "correl": 27, "th": [27, 31], "compon": [27, 42], "_i": [27, 31], "counterpart": 27, "_j": 27, "variou": 27, "what": 27, "matern": 27, "famili": 27, "replac": [25, 27], "without": [27, 33], "loss": 27, "sqrt": [27, 42], "il": 27, "jl": 27, "psi_l": 27, "psi_": 27, "length": [27, 31], "varianc": [27, 30, 31, 33, 34, 37, 38], "psi": 27, "psi_1": 27, "psi_p": 27, "knowledg": [27, 31], "viewpoint": 27, "limit": [27, 31], "tr": 27, "pair": [27, 40, 44], "finit": [27, 41], "jointli": 27, "joint": 27, "matrix": 27, "untri": 27, "mid": [27, 31], "begin": [27, 42], "cc": 27, "properti": [27, 31, 37], "multivari": 27, "condit": 27, "again": 27, "eq": 27, "conditionalgaussian": 27, "easili": 27, "extend": [27, 36], "almost": 27, "instantan": 27, "moreov": 27, "associ": 27, "2c": 27, "either": [27, 30], "over": [27, 43], "y_i": 27, "tild": 27, "_1": 27, "view": 27, "decompos": 27, "lower": [27, 30, 31, 36, 37, 38], "triangular": 27, "conjug": 27, "choleski": 27, "decomposit": 27, "cccc": 27, "vdot": 27, "ddot": 27, "w": [27, 34], "w_1": 27, "w_": 27, "consist": [27, 30, 36, 43, 44], "independ": 27, "w_i": 27, "2018": [27, 30, 34], "zero_mean": 27, "No": 27, "range_par": 27, "na": 27, "post_mod": 27, "prior_choic": 27, "ref_approx": 27, "b": 27, "none": [27, 30, 31, 36, 37, 38, 40, 43, 44], "matern_5_2": 27, "isotrop": 27, "lbfg": 27, "lower_bound": 27, "max_ev": 27, "num_initial_valu": 27, "ye": 27, "bool": [27, 37, 38, 40, 42, 43, 44], "One": [27, 30], "ndarrai": [27, 30, 31, 37, 40, 42, 44], "By": [27, 30], "student": 27, "mmle": 27, "mle": 27, "ref_xi": 27, "ref_gamma": 27, "ntrain": 27, "matern_3_2": 27, "rough": 27, "pow_exp": 27, "power": 27, "exponenti": 27, "kernel": 27, "low": [27, 31], "storag": 27, "broyden": 27, "fletcher": 27, "goldarb": 27, "shanno": 27, "nelder": 27, "mead": 27, "brent": 27, "entri": 27, "being": [27, 36, 43], "invers": 27, "constrain": 27, "unconstrain": 27, "ones": 27, "ntest": 27, "low95": 27, "upper95": 27, "sd": 27, "column": [27, 42], "contain": [27, 31, 37, 44], "fit": 27, "nrespons": 27, "date": 29, "jan": 34, "2024": [], "get": 29, "overview": 29, "prerequisit": 29, "api": 29, "chang": [29, 43], "idea": 30, "behind": 30, "amount": 30, "achiev": 30, "certain": [30, 44], "accuraci": 30, "expect": 30, "suppos": 30, "facilit": 30, "wang": [30, 34], "li": [30, 34], "kandasami": [30, 34], "2017": [30, 34, 38, 40, 43], "scalar_gasp_trend": 30, "entropi": 30, "brute": 30, "args_prior": [30, 31], "kwgs_prior": [30, 31], "args_likelihood": [30, 31], "kwgs_likelihood": [30, 31], "args_optim": 30, "kwgs_optim": 30, "contruct": 30, "e": [30, 36, 40], "via": [30, 34, 37], "boundari": [30, 31, 36, 37, 38], "callabl": [30, 31, 37, 44], "construct": [30, 32, 37], "These": 30, "linear": [30, 41], "find": 30, "minim": 30, "func": 30, "_uncertainty_ind": 30, "optimizeresult": 30, "posit": [30, 31, 37, 42, 43], "dict": [30, 31, 37, 40, 44], "keyword": [30, 31, 37, 44], "sim0": 30, "sim1": 30, "cpu": [30, 40, 44], "tupl": [30, 31, 37, 43], "intial": 30, "ninit": 30, "iter_prefix": 30, "sequenti": [30, 44], "inter": 30, "simulaiton": 30, "iter_sim0": 30, "iter_sim1": 30, "sim_output": 30, "ln_pxl_valu": 30, "duplic": 30, "stop": [30, 43], "awai": [30, 41], "smaller": [30, 43], "statist": [31, 34], "probabilist": [31, 33], "light": 31, "theorem": 31, "collect": 31, "degre": [31, 43], "multipli": [31, 43], "incorpor": 31, "subject": [31, 44], "becom": 31, "avail": [31, 40], "hardli": 31, "possibl": 31, "denomin": 31, "nomal": 31, "numer": [31, 34, 37, 41, 42], "regular": 31, "increas": 31, "dramat": 31, "approx": 31, "delta": 31, "args_ln_pxl": 31, "kwgs_ln_pxl": 31, "bin": [31, 36], "1d": 31, "along": [31, 33, 42], "whether": [31, 37, 44], "old": [31, 37], "thu": [31, 37], "framework": [33, 34], "enabl": 33, "systemat": 33, "relat": [33, 44], "physic": [33, 34], "computationlli": 33, "sensitv": [33, 38], "ensur": [25, 33], "cover": 33, "sure": 33, "latest": 33, "offici": [33, 43], "websit": 33, "ad": [25, 33, 43], "crucial": 33, "commun": [33, 34], "been": [33, 43], "initegr": 33, "util": [33, 42], "tool": 33, "interfac": [33, 43, 44], "3g": [33, 41, 43], "intend": 33, "document": 33, "guid": [25, 33], "command": 33, "recommond": 33, "virtual": 33, "ceat": 33, "lastli": [], "anaconda": 33, "miniconda": 33, "haven": 33, "afterward": 33, "your_env_nam": 33, "termin": 33, "repo": [], "http": 34, "cran": [], "org": 34, "successfulli": 33, "librari": 34, "configur": [], "r_home": [25, 33], "know": [], "quit": [], "config": [], "var": [], "your_r_hom": [], "reactiv": [], "deactiv": [], "id": 33, "would": [], "ipython": [], "extra": [], "ipykernel": [], "user": [41, 43, 44], "meng": 34, "yang": 34, "jesu": 34, "palomo": 34, "jame": 34, "journal": 34, "doi": 34, "32614": 34, "rj": 34, "011": 34, "massiv": 34, "annal": 34, "1317": 34, "1347": 34, "1214": 34, "aoas934": 34, "amann": 34, "landslid": [34, 41], "1007": 34, "s10346": 34, "021": 34, "01690": 34, "hu": 34, "research": 34, "phd": 34, "thesi": 34, "rwth": 34, "aachen": 34, "univers": 34, "18154": 34, "11693": 34, "xiao": 34, "jing": 34, "6a": 34, "3038": 34, "3066": 34, "aos1648": 34, "hong": 34, "qiao": 34, "lai": 34, "neural": 34, "3072": 34, "3094": 34, "1162": 34, "neco_a_01127": 34, "kirthevasan": 34, "jeff": 34, "schneider": 34, "barnab": 34, "\u00e1": 34, "\u00f3": 34, "czo": 34, "queri": 34, "scientif": 34, "experi": 34, "artifici": 34, "intellig": 34, "45": 34, "56": 34, "1016": 34, "artint": 34, "002": 34, "julia": 34, "2033": 34, "2045": 34, "022": 34, "01857": 34, "andrea": 34, "best": 34, "145": 34, "280": 34, "2002": [34, 38, 40], "s0010": 34, "4655": 34, "00280": 34, "paola": 34, "annoni": 34, "ivano": 34, "azzini": 34, "francesca": 34, "campolongo": 34, "marco": 34, "ratto": 34, "stefano": 34, "tarantola": 34, "259": 34, "270": 34, "2010": [34, 38, 40, 43], "cpc": 34, "2009": 34, "09": 34, "018": 34, "jon": 34, "herman": [34, 38, 40], "Will": 34, "usher": [34, 38, 40], "salib": [34, 38, 40], "21105": 34, "joss": 34, "00097": 34, "thoma": 34, "fischer": [34, 42, 43], "shiva": 34, "pudasaini": 34, "avalanch": 34, "cold": 34, "region": 34, "scienc": 34, "technologi": 34, "74": 34, "75": 34, "2012": [34, 42, 43], "coldregion": 34, "mergili": [34, 43], "krenn": 34, "v1": 34, "advanc": 34, "propag": 34, "phase": [34, 43], "geoscientif": 34, "553": 34, "569": 34, "5194": 34, "gmd": 34, "christen": [34, 43], "bartelt": 34, "ramm": 34, "dens": 34, "snow": 34, "terrain": 34, "63": 34, "loic": 34, "clair": 34, "cannamela": 34, "bertrand": 34, "iooss": 34, "approach": 34, "multifidel": 34, "siam": 34, "asa": 34, "336": 34, "1137": 34, "130926869": 34, "fill": 36, "divid": 36, "shuffl": 36, "g": [36, 40, 42], "x_6": 36, "middl": 36, "combin": [36, 43], "exclud": [36, 43], "straightforwardli": 36, "pseudo": [36, 37, 40], "randomli": 36, "maxim": [36, 43], "minimum": 36, "distanc": 36, "transform": 36, "wide": [37, 41], "markov": 37, "chain": 37, "mont": 37, "carlo": 37, "mcmc": 37, "algorithm": 37, "sequenc": [37, 38], "direct": [37, 42, 43], "higher": 37, "moment": 37, "histogram": 37, "work": [33, 37], "At": 37, "calcul": [37, 38, 40], "reject": 37, "repeat": [25, 37], "larg": 37, "burn": 37, "thine": 37, "ln_target": 37, "f_densiti": 37, "symmetr": 37, "args_target": 37, "kwgs_target": 37, "args_f_sampl": 37, "args_f_dens": 37, "kwgs_f_densiti": 37, "asymmetr": 37, "burnin": 37, "descript": [38, 40], "skip_valu": 38, "skip": 38, "ideal": 38, "extens": 38, "nresampl": 40, "conf_level": 40, "analyz": 40, "varaibl": [40, 44], "nsaltelli": 40, "nrealiz": 40, "secord": 40, "size": [40, 43], "bootstrap": 40, "colomn": 40, "relev": [40, 41, 43, 44], "s2": 40, "studi": 41, "field": 41, "vari": 41, "simpl": 41, "differenti": 41, "scheme": [41, 42], "voellmi": [41, 42, 43], "shallow": [41, 43], "extrem": 42, "simplifi": [42, 43], "condens": 42, "cartesian": 42, "orthogon": 42, "t_x": 42, "t_y": 42, "t_n": 42, "surfac": 42, "tangent": 42, "goven": 42, "describ": [42, 44], "u_": 42, "partial_x": 42, "partial_i": 42, "g_": 42, "g_n": 42, "dry": 42, "tensor": 42, "rewritten": 42, "_0": 42, "forward": 42, "rung": 42, "kutta": 42, "explicit": 42, "dopri5": 42, "od": 42, "mass_point_model": 42, "dt": 42, "t0": 42, "atol": 42, "rtol": 42, "graviti": [42, 43], "acceler": [42, 43], "absolut": 42, "toler": 42, "rel": 42, "2d": 42, "row": 42, "quantiti": [42, 43], "gi": 43, "support": 43, "manual": [33, 43], "ravaflow24": [25, 43], "cfl": 43, "time_step_length": 43, "001": 43, "diffusion_control": 43, "surface_control": 43, "stopping_threshold": 43, "friction_control": 43, "non_hydro_control": 43, "phase_sep_control": 43, "hydrograph_control": 43, "deceleration_control": 43, "around": 43, "diffus": 43, "experiment": 43, "neglect": 43, "deceler": 43, "term": 43, "balanc": 43, "forc": 43, "entrain": 43, "momentum": 43, "entrainmnet": 43, "kinet": 43, "energi": 43, "threshold": 43, "dynam": 43, "pressur": 43, "cell": 43, "euqal": 43, "hydrostat": 43, "dispers": 43, "enhanc": 43, "impos": 43, "hydrograph": 43, "reset": 43, "profil": 43, "entir": 43, "materi": 43, "through": 43, "centr": 43, "viscou": 43, "hrelease_ratio": 43, "gdal": 43, "Its": [43, 44], "unit": 43, "meter": 43, "volum": 43, "intern": [43, 44], "angl": 43, "basal": 43, "european": 43, "petroleum": 43, "survei": 43, "group": 43, "qoi": 43, "pa": 43, "larger": 43, "regard": 43, "spatio": 43, "tempor": 43, "spatial": 43, "qoi_max": 43, "nloc": 43, "qoi_max_loc": 43, "signatur": 44, "part": 44, "kei": 44, "onto": 44, "correspondingli": 44, "environ": 25, "seamless": 25, "precis": 25, "mar": 29, "quick": 33, "re": 33, "predefin": 33, "smoothli": 33, "setup": 33, "prefer": 33, "yourself": 33, "custom": 33, "interpol": 25, "interp2d": 25, "regulargridinterpol": 25, "maintain": 25, "compat": 25, "newer": 25, "citat": 25, "readm": 25, "fold": 25, "2025": 29, "verbos": 27, "displai": 27}, "objects": {"psimpy.emulator.robustgasp": [[27, 0, 1, "", "PPGaSP"], [27, 0, 1, "", "ScalarGaSP"]], "psimpy.emulator.robustgasp.PPGaSP": [[27, 1, 1, "", "predict"], [27, 1, 1, "", "sample"], [27, 1, 1, "", "train"]], "psimpy.emulator.robustgasp.ScalarGaSP": [[27, 1, 1, "", "loo_validate"], [27, 1, 1, "", "predict"], [27, 1, 1, "", "sample"], [27, 1, 1, "", "train"]], "psimpy.inference.active_learning": [[30, 0, 1, "", "ActiveLearning"]], "psimpy.inference.active_learning.ActiveLearning": [[30, 1, 1, "", "approx_ln_pxl"], [30, 1, 1, "", "initial_simulation"], [30, 1, 1, "", "iterative_emulation"]], "psimpy.inference.bayes_inference": [[31, 0, 1, "", "GridEstimation"], [31, 0, 1, "", "MetropolisHastingsEstimation"]], "psimpy.inference.bayes_inference.GridEstimation": [[31, 1, 1, "", "run"]], "psimpy.inference.bayes_inference.MetropolisHastingsEstimation": [[31, 1, 1, "", "run"]], "psimpy.sampler.latin": [[36, 0, 1, "", "LHS"]], "psimpy.sampler.latin.LHS": [[36, 1, 1, "", "sample"]], "psimpy.sampler.metropolis_hastings": [[37, 0, 1, "", "MetropolisHastings"]], "psimpy.sampler.metropolis_hastings.MetropolisHastings": [[37, 1, 1, "", "sample"]], "psimpy.sampler.saltelli": [[38, 0, 1, "", "Saltelli"]], "psimpy.sampler.saltelli.Saltelli": [[38, 1, 1, "", "sample"]], "psimpy.sensitivity.sobol": [[40, 0, 1, "", "SobolAnalyze"]], "psimpy.sensitivity.sobol.SobolAnalyze": [[40, 1, 1, "", "run"]], "psimpy.simulator.mass_point_model": [[42, 0, 1, "", "MassPointModel"]], "psimpy.simulator.mass_point_model.MassPointModel": [[42, 1, 1, "", "run"]], "psimpy.simulator.ravaflow3G": [[43, 0, 1, "", "Ravaflow3GMixture"]], "psimpy.simulator.ravaflow3G.Ravaflow3GMixture": [[43, 1, 1, "", "extract_impact_area"], [43, 1, 1, "", "extract_qoi_max"], [43, 1, 1, "", "extract_qoi_max_loc"], [43, 1, 1, "", "preprocess"], [43, 1, 1, "", "run"]], "psimpy.simulator.run_simulator": [[44, 0, 1, "", "RunSimulator"]], "psimpy.simulator.run_simulator.RunSimulator": [[44, 2, 1, "", "outputs"], [44, 1, 1, "", "parallel_run"], [44, 1, 1, "", "serial_run"], [44, 2, 1, "", "var_samples"]]}, "objtypes": {"0": "py:class", "1": "py:method", "2": "py:attribute"}, "objnames": {"0": ["py", "class", "Python class"], "1": ["py", "method", "Python method"], "2": ["py", "attribute", "Python attribute"]}, "titleterms": {"api": 0, "theori": [0, 27, 42], "emul": [1, 2, 3, 26, 27], "ppgasp": [2, 27], "gp": [2, 3, 27], "multi": 2, "output": [2, 3], "function": [2, 3], "scalargasp": [3, 27], "singl": 3, "comput": [4, 8, 13, 16, 24], "time": [4, 8, 13, 16, 24], "infer": [5, 7, 31, 32], "activ": [6, 30], "learn": [6, 30], "bayesian": 7, "sampler": [9, 35], "latin": [10, 36], "hypercub": [10, 36], "sampl": [10, 11, 12, 27, 36, 37, 38], "metropoli": [11, 37], "hast": [11, 37], "saltelli": [12, 38], "sensit": [14, 39, 40], "sobol": [15, 40], "analysi": [15, 40], "simul": [17, 41, 44], "mass": [18, 21, 42], "point": [18, 21, 42], "model": [18, 19, 20, 21, 22, 23, 42, 43], "ravaflow24": [19, 22], "mixtur": [19, 20, 22, 23, 43], "ravaflow3g": [20, 23, 43], "runsimul": [21, 22, 23, 44], "chang": 25, "v0": 25, "2": 25, "0": 25, "1": 25, "robustgasp": 27, "recap": 27, "prior": 27, "posterior": 27, "from": 27, "class": [27, 30, 31, 36, 37, 38, 40, 42, 43, 44], "method": [27, 30, 31, 36, 37, 38, 40, 42, 43, 44], "exampl": 28, "galleri": 28, "welcom": 29, "psimpi": 29, "": 29, "document": 29, "content": 29, "activelearn": 30, "bay": 31, "gridestim": 31, "metropolishastingsestim": 31, "get": 33, "start": 33, "overview": 33, "prerequisit": 33, "instal": 33, "conda": 33, "environ": 33, "recommend": 33, "refer": 34, "lh": 36, "metropolishast": 37, "sobolanalyz": 40, "masspointmodel": 42, "ravaflow3gmixtur": 43, "run": 44, "attribut": 44, "v1": 25}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "sphinxcontrib.bibtex": 9, "sphinx": 60}, "alltitles": {"API & Theory": [[0, "api-theory"]], "Emulator": [[1, "emulator"], [26, "emulator"]], "PPGaSP: GP emulation for multi-output functions": [[2, "ppgasp-gp-emulation-for-multi-output-functions"]], "ScalarGaSP: GP emulation for a single-output function": [[3, "scalargasp-gp-emulation-for-a-single-output-function"]], "Computation times": [[4, "computation-times"], [8, "computation-times"], [13, "computation-times"], [16, "computation-times"], [24, "computation-times"]], "Inference": [[5, "inference"], [32, "inference"]], "Active learning": [[6, "active-learning"]], "Bayesian inference": [[7, "bayesian-inference"]], "Sampler": [[9, "sampler"], [35, "sampler"]], "Latin hypercube sampling": [[10, "latin-hypercube-sampling"]], "Metropolis Hastings sampling": [[11, "metropolis-hastings-sampling"]], "Saltelli sampling": [[12, "saltelli-sampling"]], "Sensitivity": [[14, "sensitivity"], [39, "sensitivity"]], "Sobol\u2019 analysis": [[15, "sobol-analysis"]], "Simulator": [[17, "simulator"], [41, "simulator"]], "Mass Point Model": [[18, "mass-point-model"], [42, "mass-point-model"]], "Ravaflow24 Mixture Model": [[19, "ravaflow24-mixture-model"]], "Ravaflow3G Mixture Model": [[20, "ravaflow3g-mixture-model"], [43, "ravaflow3g-mixture-model"]], "RunSimulator: Mass Point Model": [[21, "runsimulator-mass-point-model"]], "RunSimulator: Ravaflow24 Mixture Model": [[22, "runsimulator-ravaflow24-mixture-model"]], "RunSimulator: Ravaflow3G Mixture Model": [[23, "runsimulator-ravaflow3g-mixture-model"]], "Changes": [[25, "changes"]], "v1.0.0": [[25, "v1-0-0"]], "v0.2.1": [[25, "v0-2-1"]], "v0.2.0": [[25, "v0-2-0"]], "v0.1.2": [[25, "v0-1-2"]], "v0.1.1": [[25, "v0-1-1"]], "v0.1.0": [[25, "v0-1-0"]], "RobustGaSP": [[27, "robustgasp"]], "Theory recap of GP emulation": [[27, "theory-recap-of-gp-emulation"]], "GP prior": [[27, "gp-prior"]], "GP posterior": [[27, "gp-posterior"]], "Sample from GP": [[27, "sample-from-gp"]], "ScalarGaSP Class": [[27, "scalargasp-class"]], "Methods": [[27, "methods"], [27, "id8"], [30, "methods"], [31, "methods"], [31, "id1"], [36, "methods"], [37, "methods"], [38, "methods"], [40, "methods"], [42, "methods"], [43, "methods"], [44, "methods"]], "PPGaSP Class": [[27, "ppgasp-class"]], "Example Gallery": [[28, "example-gallery"]], "Welcome to PSimPy\u2019s documentation!": [[29, "welcome-to-psimpy-s-documentation"]], "Contents": [[29, "contents"]], "Active Learning": [[30, "active-learning"]], "ActiveLearning Class": [[30, "activelearning-class"]], "Bayes Inference": [[31, "bayes-inference"]], "GridEstimation Class": [[31, "gridestimation-class"]], "MetropolisHastingsEstimation Class": [[31, "metropolishastingsestimation-class"]], "Getting Started": [[33, "getting-started"]], "Overview": [[33, "overview"]], "Prerequisites": [[33, "prerequisites"]], "Installation": [[33, "installation"]], "Installation in a Conda Environment (Recommended)": [[33, "installation-in-a-conda-environment-recommended"]], "References": [[34, "references"]], "Latin Hypercube Sampling": [[36, "latin-hypercube-sampling"]], "LHS Class": [[36, "lhs-class"]], "Metropolis Hastings Sampling": [[37, "metropolis-hastings-sampling"]], "MetropolisHastings Class": [[37, "metropolishastings-class"]], "Saltelli Sampling": [[38, "saltelli-sampling"]], "Saltelli Class": [[38, "saltelli-class"]], "Sobol\u2019 Sensitivity Analysis": [[40, "sobol-sensitivity-analysis"]], "SobolAnalyze Class": [[40, "sobolanalyze-class"]], "Theory of mass point model": [[42, "theory-of-mass-point-model"]], "MassPointModel Class": [[42, "masspointmodel-class"]], "Ravaflow3GMixture Class": [[43, "ravaflow3gmixture-class"]], "Run Simulator": [[44, "run-simulator"]], "RunSimulator Class": [[44, "runsimulator-class"]], "Attributes": [[44, "attributes"]]}, "indexentries": {"ppgasp (class in psimpy.emulator.robustgasp)": [[27, "psimpy.emulator.robustgasp.PPGaSP"]], "scalargasp (class in psimpy.emulator.robustgasp)": [[27, "psimpy.emulator.robustgasp.ScalarGaSP"]], "loo_validate() (scalargasp method)": [[27, "psimpy.emulator.robustgasp.ScalarGaSP.loo_validate"]], "predict() (ppgasp method)": [[27, "psimpy.emulator.robustgasp.PPGaSP.predict"]], "predict() (scalargasp method)": [[27, "psimpy.emulator.robustgasp.ScalarGaSP.predict"]], "sample() (ppgasp method)": [[27, "psimpy.emulator.robustgasp.PPGaSP.sample"]], "sample() (scalargasp method)": [[27, "psimpy.emulator.robustgasp.ScalarGaSP.sample"]], "train() (ppgasp method)": [[27, "psimpy.emulator.robustgasp.PPGaSP.train"]], "train() (scalargasp method)": [[27, "psimpy.emulator.robustgasp.ScalarGaSP.train"]], "activelearning (class in psimpy.inference.active_learning)": [[30, "psimpy.inference.active_learning.ActiveLearning"]], "approx_ln_pxl() (activelearning method)": [[30, "psimpy.inference.active_learning.ActiveLearning.approx_ln_pxl"]], "initial_simulation() (activelearning method)": [[30, "psimpy.inference.active_learning.ActiveLearning.initial_simulation"]], "iterative_emulation() (activelearning method)": [[30, "psimpy.inference.active_learning.ActiveLearning.iterative_emulation"]], "gridestimation (class in psimpy.inference.bayes_inference)": [[31, "psimpy.inference.bayes_inference.GridEstimation"]], "metropolishastingsestimation (class in psimpy.inference.bayes_inference)": [[31, "psimpy.inference.bayes_inference.MetropolisHastingsEstimation"]], "run() (gridestimation method)": [[31, "psimpy.inference.bayes_inference.GridEstimation.run"]], "run() (metropolishastingsestimation method)": [[31, "psimpy.inference.bayes_inference.MetropolisHastingsEstimation.run"]], "lhs (class in psimpy.sampler.latin)": [[36, "psimpy.sampler.latin.LHS"]], "sample() (lhs method)": [[36, "psimpy.sampler.latin.LHS.sample"]], "metropolishastings (class in psimpy.sampler.metropolis_hastings)": [[37, "psimpy.sampler.metropolis_hastings.MetropolisHastings"]], "sample() (metropolishastings method)": [[37, "psimpy.sampler.metropolis_hastings.MetropolisHastings.sample"]], "saltelli (class in psimpy.sampler.saltelli)": [[38, "psimpy.sampler.saltelli.Saltelli"]], "sample() (saltelli method)": [[38, "psimpy.sampler.saltelli.Saltelli.sample"]], "sobolanalyze (class in psimpy.sensitivity.sobol)": [[40, "psimpy.sensitivity.sobol.SobolAnalyze"]], "run() (sobolanalyze method)": [[40, "psimpy.sensitivity.sobol.SobolAnalyze.run"]], "masspointmodel (class in psimpy.simulator.mass_point_model)": [[42, "psimpy.simulator.mass_point_model.MassPointModel"]], "run() (masspointmodel method)": [[42, "psimpy.simulator.mass_point_model.MassPointModel.run"]], "ravaflow3gmixture (class in psimpy.simulator.ravaflow3g)": [[43, "psimpy.simulator.ravaflow3G.Ravaflow3GMixture"]], "extract_impact_area() (ravaflow3gmixture method)": [[43, "psimpy.simulator.ravaflow3G.Ravaflow3GMixture.extract_impact_area"]], "extract_qoi_max() (ravaflow3gmixture method)": [[43, "psimpy.simulator.ravaflow3G.Ravaflow3GMixture.extract_qoi_max"]], "extract_qoi_max_loc() (ravaflow3gmixture method)": [[43, "psimpy.simulator.ravaflow3G.Ravaflow3GMixture.extract_qoi_max_loc"]], "preprocess() (ravaflow3gmixture method)": [[43, "psimpy.simulator.ravaflow3G.Ravaflow3GMixture.preprocess"]], "run() (ravaflow3gmixture method)": [[43, "psimpy.simulator.ravaflow3G.Ravaflow3GMixture.run"]], "runsimulator (class in psimpy.simulator.run_simulator)": [[44, "psimpy.simulator.run_simulator.RunSimulator"]], "outputs (runsimulator attribute)": [[44, "psimpy.simulator.run_simulator.RunSimulator.outputs"]], "parallel_run() (runsimulator method)": [[44, "psimpy.simulator.run_simulator.RunSimulator.parallel_run"]], "serial_run() (runsimulator method)": [[44, "psimpy.simulator.run_simulator.RunSimulator.serial_run"]], "var_samples (runsimulator attribute)": [[44, "psimpy.simulator.run_simulator.RunSimulator.var_samples"]]}}) \ No newline at end of file diff --git a/docs/source/_build/html/sensitivity/index.html b/docs/source/_build/html/sensitivity/index.html index 7f96373329c43b52c9e2e45966a7462aebe396d8..338a2f2b2da07cdcb0df1ac40532626ff24cc2df 100644 --- a/docs/source/_build/html/sensitivity/index.html +++ b/docs/source/_build/html/sensitivity/index.html @@ -116,7 +116,7 @@ <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/sensitivity/sobol.html b/docs/source/_build/html/sensitivity/sobol.html index 68b8165d02c9f6a470ef70d3ba10d82cc9c844ef..b42f072e8bbb2935023a6078750a9a292d6c2303 100644 --- a/docs/source/_build/html/sensitivity/sobol.html +++ b/docs/source/_build/html/sensitivity/sobol.html @@ -190,7 +190,7 @@ and conf_level for each pair of parameters. <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/simulator/index.html b/docs/source/_build/html/simulator/index.html index 02300cb2ec18b1089049c8258fd76455eb55bfe5..90e34703eef0fbbbe1ad81203a00953f0ce3e5cf 100644 --- a/docs/source/_build/html/simulator/index.html +++ b/docs/source/_build/html/simulator/index.html @@ -138,7 +138,7 @@ installed by the user.</p> <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/simulator/mass_point_model.html b/docs/source/_build/html/simulator/mass_point_model.html index 8fb56a4a1d10e369fdee9f4c6a2547d89e8a14c4..810659c9f19e330a77f9c1e013508306544e1d2c 100644 --- a/docs/source/_build/html/simulator/mass_point_model.html +++ b/docs/source/_build/html/simulator/mass_point_model.html @@ -230,7 +230,7 @@ namely <code class="code docutils literal notranslate"><span class="pre">output. <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/simulator/ravaflow3G.html b/docs/source/_build/html/simulator/ravaflow3G.html index 1dbd669bb871a9b4d912d075668095c6a6802a4e..bda459a6217cf77d8a9e0a7939ef346aec93cf56 100644 --- a/docs/source/_build/html/simulator/ravaflow3G.html +++ b/docs/source/_build/html/simulator/ravaflow3G.html @@ -335,7 +335,7 @@ Shape of <code class="code docutils literal notranslate"><span class="pre">(nloc <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/docs/source/_build/html/simulator/run_simulator.html b/docs/source/_build/html/simulator/run_simulator.html index 7f2716da52ae478f28e51c6ed5e7191a813a9c8d..0d71402e5888fbf59e21b523224e0a0a01a500ad 100644 --- a/docs/source/_build/html/simulator/run_simulator.html +++ b/docs/source/_build/html/simulator/run_simulator.html @@ -227,7 +227,7 @@ Default is the number of CPUs on the host.</p></li> <hr/> <div role="contentinfo"> - <p>© Copyright 2024, Hu Zhao.</p> + <p>© Copyright 2025, Hu Zhao.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a diff --git a/pyproject.toml b/pyproject.toml index 5387b190dce10531c2005104a6df1a6dd6a6eb32..8c3bd395f5b5c7cccc8bbb461f936ac3d6d0b5e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "psimpy" -version = "0.2.1" +version = "1.0.0" description = "Predictive and probabilistic simulation tools." authors = ["Hu Zhao"] license = "MIT" diff --git a/src/psimpy/simulator/__init__.py b/src/psimpy/simulator/__init__.py index 78b86034ef6baba0aa10c877f89de4f7e2a44904..5ffea9be2d42dfd88ec9841635c4b229b4734f03 100644 --- a/src/psimpy/simulator/__init__.py +++ b/src/psimpy/simulator/__init__.py @@ -1,4 +1,3 @@ from psimpy.simulator.mass_point_model import MassPointModel -from psimpy.simulator.ravaflow24 import Ravaflow24Mixture from psimpy.simulator.ravaflow3G import Ravaflow3GMixture from psimpy.simulator.run_simulator import RunSimulator diff --git a/src/psimpy/simulator/ravaflow24.py b/src/psimpy/simulator/ravaflow24.py deleted file mode 100755 index d8f22d96eeca7309931db894d15b9e3bbc668de2..0000000000000000000000000000000000000000 --- a/src/psimpy/simulator/ravaflow24.py +++ /dev/null @@ -1,474 +0,0 @@ -import os -import linecache -import numpy as np -from scipy.interpolate import interp2d -from typing import Union -from beartype import beartype -import warnings - - -class Ravaflow24Mixture: - @beartype - def __init__( - self, - dir_sim: str, - time_step: Union[float, int] = 10, - time_end: Union[float, int] = 300, - cfl: float = 0.4, - time_step_length: float = 0.001, - conversion_control: str = "0", - curvature_control: str = "1", - surface_control: str = "0", - entrainment_control: str = "0", - shear_velocity_coef: float = 0.05, - basal_friction_diff: float = 0.0, - stopping_control: str = "0", - stopping_threshold: float = 0.0, - friction_control: str = "0", - ) -> None: - """ - `r.avaflow 2.4 Mixture model` (Voellmy-type shallow flow model). - - Parameters - ---------- - dir_sim : str - Directory to save output files generated by `r.avaflow`. - time_step : float or int - Time step for simulation, in seconds. - time_end : float or int - End time for simulation, in seconds. - cfl : float - CFL criterion, a value being equal or smaller than 0.5. - time_step_length : float - If ``cfl`` is not applicable, ``time_step_length`` is used. - In seconds. Recommended range is around :math:`0.1` to :math:`0.5`. - conversion_control : str - `'0'`: no conversion of flow heights to flow depths. - `'1'`: conversion is applied. - curvature_control : str - `'0'`: curvature is neglected. - `'1'`: curvature is considered in the decelerating source terms. - `'2'`: curvature is considered in all relevant terms. - surface_control : str - `'0'`: no balancing of forces. - `'1'`: apply balancing of forces. - entrainment_control : str - `'0'`: no entrainment. - `'1'`: the entrainment coefficient is multiplied with flow momentum. - `'2'`: simplified entrainment and deposition model is used. - `'3'`: combination of `'1'` for entrainmnet and `'2'` for deposition. - `'4'`: acceleration-deceleration entrainment and deposition model. - shear_velocity_coef : float - Only used with ``entrainment_control`` being `'2'` or `'3'`, range - :math:`[0,1]`. - basal_friction_diff : float - Difference between the basal friction angles of the basal surface - and the flow, in degrees. Only used with ``entrainment_control`` - being `'2'` or `'3'`. - stopping_control : str - `'0'`: no stopping control is used. - `'1'`: stop if the flow kinetic energy is equal or smaller than a - given threshold. - `'2'`: stop if the flow momentum is equal or smaller than a given - threshold. - `'3'`: stop if the dynamic flow pressure of all raster cells is - euqal or smaller than a given threshold. - stopping_threshold : float - Threshold value for ``stopping_control``. - If ``stopping_control`` is `'1'` or `'2'`, ``stopping_threshold`` - has to be given as the maximum value reached during the flow. - If ``stopping_control`` is `'3'`, the pressure threshold has to be - specified. - friction_control : str, optional - `'0'`: no dynamic adaptation of friction parameters. - `'1'`: dynamic adaptation of friction parameters (ignored for the - mixture model). - - """ - warnings.warn( - "r.avaflow 2.4pre and lower versions are not supported by its \ - developers, and their use is discouraged. Therefore, ravaflow24 \ - module will be deprecated in the future versions. Please use \ - ravaflow3G module instead.", - FutureWarning, - ) - - if not os.path.isdir(dir_sim): - raise ValueError(f"{dir_sim} does not exist or is not a directory") - self.dir_sim = dir_sim - - self.time_step = time_step - self.time_end = time_end - self.cfl = cfl - self.time_step_length = time_step_length - - if conversion_control not in ["0", "1"]: - raise ValueError("convresion_control must be '0' or '1'") - self.conversion_control = conversion_control - - if curvature_control not in ["0", "1", "2"]: - raise ValueError("curvature_control must be '0' or '1' or '2'") - self.curvature_control = curvature_control - - if surface_control not in ["0", "1"]: - raise ValueError("surface_control must be '0' or '1'") - self.surface_control = surface_control - - if entrainment_control not in ["0", "1", "2", "3", "4"]: - raise ValueError("entrainment_control must be '0', '1', '2', '3', or '4'") - self.entrainment_control = entrainment_control - - self.shear_velocity_coef = shear_velocity_coef - self.basal_friction_diff = basal_friction_diff - - if stopping_control not in ["0", "1", "2", "3"]: - raise ValueError("stopping_control must be '0', '1', '2', or '3'") - self.stopping_control = stopping_control - - self.stopping_threshold = stopping_threshold - - if friction_control not in ["0", "1"]: - raise ValueError("friction_control must be '0' or '1'") - self.friction_control = friction_control - - @beartype - def preprocess( - self, - prefix: str, - elevation: str, - hrelease: str, - cellsize: Union[float, int, np.floating, np.integer] = 20, - hrelease_ratio: Union[float, np.integer] = 1.0, - internal_friction: Union[float, int, np.floating, np.integer] = 35, - basal_friction: Union[float, int, np.floating, np.integer] = 20, - turbulent_friction: Union[float, int, np.floating, np.integer] = 3, - entrainment_coef: Union[float, np.floating] = -7.0, - EPSG: Union[str, None] = None, - ) -> tuple[str, str]: - """ - Preprocess simulation input data simulation. - - Parameters - ---------- - prefix : str - Prefix required by `r.avaflow` to name output files. - elevation : str - Name of elevation raster file (including its path). - The file format should be supported by `GDAL`. - Its unit is in meters. - hrelease : str - Name of release height raster file (including its path). - The file format should be supported by `GDAL`. - Its unit is in meters. - cellsize : float or int, optional - Cell size in meters to be used for simulation. - hrelease_ratio : float, optional - A positive value to multiple ``hrelease`` in order to control - the release volume. - internal_friction : float or int, optional - Internal friction angle, in degrees, range :math:`[0,90)`. - basal_friction : float or int, optional - Basal friction angle, in degrees, range :math:`[0,90)`. - turbulent_friction : float or int, optional - Logarithm with base :math:`10` of the turbulent friction, in - :math:`m/s^2`. - entrainment_coef : float, optional - Logarithm with base :math:`10` of the entrainment coefficient, - except for :math:`0` meaning no entrainment. - EPSG : str, optional - `EPSG` (European Petroleum Survey Group) code to create - `GRASS Location <https://grass.osgeo.org/grass82/manuals/grass_database.html>`_. - If `None`, ``elevation`` must be a georeferenced file which has - metadata to create the `GRASS Location`. - - Returns - ------- - grass_location : str - Name of the `GRASS Location` (including path). - sh_file : str - Name of the shell file (including path), which will be called by - `GRASS <https://grass.osgeo.org/>`_ to run the simulation. - """ - warnings.warn( - "r.avaflow 2.4pre and lower versions are not supported by its \ - developers, and their use is discouraged. Therefore, ravaflow24 \ - module will be deprecated in the future versions. Please use \ - ravaflow3G module instead.", - FutureWarning, - ) - - sh_file = os.path.join(self.dir_sim, f"{prefix}_shell.sh") - grass_location = os.path.join(self.dir_sim, f"{prefix}_glocation") - results_dir = os.path.join(self.dir_sim, f"{prefix}_results") - - if ( - os.path.exists(sh_file) - or os.path.exists(grass_location) - or os.path.exists(results_dir) - ): - raise ValueError( - f"File(s) with prefix={prefix} already exists in {self.dir_sim}." - f" Move or delete conflicting files, or use another prefix." - ) - - if not os.path.exists(elevation): - raise ValueError(f"{elevation} does not exist") - - if not os.path.exists(hrelease): - raise ValueError(f"{hrelease} does not exist") - - # create grass location - if EPSG is None: - os.system(f"grass -e -c {elevation} {grass_location}") - else: - os.system(f"grass -e -c EPSG:{EPSG} {grass_location}") - - # create shell file - with open(sh_file, "w") as sh: - sh.write("# import elevation raster \n") - sh.write(f"r.in.gdal -o input={elevation} output=elev --overwrite") - sh.write("\n\n") - - sh.write("# set region based on elev \n") - sh.write("g.region raster=elev \n\n") - - sh.write("# import hrelease raster \n") - sh.write(f"r.in.gdal -o input={hrelease} output=raw_hrel --overwrite") - sh.write("\n\n") - - sh.write(f'r.mapcalc "hrel = raw_hrel*{hrelease_ratio}" --overwrite') - sh.write("\n\n") - - sh.write( - f"r.avaflow -e -a prefix={prefix} cellsize={cellsize} phases=x " - f"elevation=elev hrelease=hrel " - f"friction={internal_friction},{basal_friction}," - f"{turbulent_friction} " - f"basal={entrainment_coef},{self.shear_velocity_coef}," - f"{self.basal_friction_diff},{self.stopping_threshold} " - f"controls={self.conversion_control},{self.curvature_control}," - f"{self.surface_control},{self.entrainment_control}," - f"{self.stopping_control},{self.friction_control} " - f"time={self.time_step},{self.time_end} " - f"cfl={self.cfl},{self.time_step_length}" - ) - - return grass_location, sh_file - - @beartype - def run(self, grass_location: str, sh_file: str) -> None: - """ - Run simulation. - - Parameters - ---------- - grass_location : str - Name of the `GRASS Location` (including path). - sh_file : str - Name of the shell file (including path). - """ - warnings.warn( - "r.avaflow 2.4pre and lower versions are not supported by its \ - developers, and their use is discouraged. Therefore, ravaflow24 \ - module will be deprecated in the future versions. Please use \ - ravaflow3G module instead.", - FutureWarning, - ) - if not os.path.exists(grass_location): - raise ValueError(f"{grass_location} does not exist") - if not os.path.exists(os.path.join(grass_location, "PERMANENT")): - raise ValueError(f"{grass_location} is not a grass location") - - if not os.path.exists(sh_file): - raise ValueError(f"{sh_file} does not exist") - - grass_mapset = os.path.join(grass_location, "PERMANENT", "") - - os.chdir(self.dir_sim) - os.system(f"grass {grass_mapset} --exec sh {sh_file}") - - def extract_impact_area( - self, prefix: str, qoi: str = "h", threshold: Union[float, int] = 0.5 - ) -> float: - """ - Extract impact area defined by a given quantity of interest and its - threshold. - - Parameters - ---------- - prefix : str - Prefix used by `r.avaflow` to name output files. - qoi : str - Quantity of interest to determine the impact area. - `'h'`: maximum flow height, in meters. - `'v'`: maximum flow velocity, in :math:`m/s`. - `'p'`: maximum flow pressure, in :math:`Pa`. - `'t'`: maximum flow kinetic energy, in :math:`J`. - threshold : float or int - Threshold of ``qoi`` to determine impact area. Areas where ``qoi`` - is larger than ``threshold`` are regarded as impar area. - - Returns - ------- - impact_area : float - A scalar value representing the overall impact area. - """ - warnings.warn( - "r.avaflow 2.4pre and lower versions are not supported by its \ - developers, and their use is discouraged. Therefore, ravaflow24 \ - module will be deprecated in the future versions. Please use \ - ravaflow3G module instead.", - FutureWarning, - ) - - if qoi not in ["h", "v", "p", "t"]: - raise ValueError("qoi must be 'h', 'v', 'p', or 't'") - - qoi_max_raster_asc = os.path.join( - self.dir_sim, - f"{prefix}_results", - f"{prefix}_ascii", - f"{prefix}_{qoi}flow_max.asc", - ) - qoi_max_raster = np.loadtxt(qoi_max_raster_asc, skiprows=6) - - cellsize = linecache.getline(qoi_max_raster_asc, 5) - cellsize = float(cellsize.split()[-1].strip()) - - impact_area = ( - np.sum(np.where(qoi_max_raster > threshold, 1, 0)) * (cellsize) ** 2 - ) - - return float(impact_area) - - def extract_qoi_max( - self, prefix: str, qoi: str, aggregate: bool = True - ) -> Union[float, np.ndarray]: - """ - Extract the maximum value(s) of a quantity of interest. - - Parameters - ---------- - prefix : str - Prefix used by `r.avaflow` to name output files. - qoi : str - Quantity of interest. - `'h'`: maximum flow height, in meters. - `'v'`: maximum flow velocity, in :math:`m/s`. - `'p'`: maximum flow pressure, in :math:`Pa`. - `'t'`: maximum flow kinetic energy, in :math:`J`. - aggregate : bool - If `True`, returns the overall maximum value over all spatio-tempo - grids. If `False`, returns the maximum values over all time steps at - each spatio location, namely a raster of maximum values. - - Returns - ------- - qoi_max : float or numpy array - Maximum value(s) of ``qoi`` in one simulation. - """ - warnings.warn( - "r.avaflow 2.4pre and lower versions are not supported by its \ - developers, and their use is discouraged. Therefore, ravaflow24 \ - module will be deprecated in the future versions. Please use \ - ravaflow3G module instead.", - FutureWarning, - ) - - if qoi not in ["h", "v", "p", "t"]: - raise ValueError("qoi must be 'h', 'v', 'p', or 't'") - - qoi_max_raster_asc = os.path.join( - self.dir_sim, - f"{prefix}_results", - f"{prefix}_ascii", - f"{prefix}_{qoi}flow_max.asc", - ) - qoi_max_raster = np.loadtxt(qoi_max_raster_asc, skiprows=6) - - if aggregate: - return float(np.max(qoi_max_raster)) - else: - return np.rot90(np.transpose(qoi_max_raster)) - - def extract_qoi_max_loc(self, prefix: str, loc: np.ndarray, qoi: str) -> np.ndarray: - """ - Extract maximum value(s) of a quantity of interest at specific - location(s). - - Parameters - ---------- - prefix : str - Prefix used by `r.avaflow` to name output files. - loc : numpy array - Coordinates of interested locations. Shape :code:`(nloc, 2)`, where - ``nloc`` is the number of interested locations. - :code:`loc[:,0]` corresponds to `x` coordinates and - :code:`loc[:,1]` to `y` coordinates. - qoi : str - Quantity of interest. - `'h'`: maximum flow height, in meters. - `'v'`: maximum flow velocity, in :math:`m/s`. - `'p'`: maximum flow pressure, in :math:`Pa`. - `'t'`: maximum flow kinetic energy, in :math:`J`. - - Returns - ------- - qoi_max_loc : numpy array - Consist of maximum value(s) of ``qoi`` at each location. - Shape of :code:`(nloc,)`. - """ - warnings.warn( - "r.avaflow 2.4pre and lower versions are not supported by its \ - developers, and their use is discouraged. Therefore, ravaflow24 \ - module will be deprecated in the future versions. Please use \ - ravaflow3G module instead.", - FutureWarning, - ) - - if not (loc.ndim == 2 and loc.shape[1] == 2): - raise ValueError( - "loc must be a 2d numpy array with first axis corresponding to" - " the number of locations and second axis to x and y coords" - ) - - if qoi not in ["h", "v", "p", "t"]: - raise ValueError("qoi must be 'h', 'v', 'p', or 't'") - - qoi_max_raster_asc = os.path.join( - self.dir_sim, - f"{prefix}_results", - f"{prefix}_ascii", - f"{prefix}_{qoi}flow_max.asc", - ) - - header = [linecache.getline(qoi_max_raster_asc, i) for i in range(1, 6)] - header_values = [float(h.split()[-1].strip()) for h in header] - ncols, nrows, xll, yll, cellsize = header_values - ncols = int(ncols) - nrows = int(nrows) - - x = np.arange(xll, xll + (cellsize * ncols), cellsize) - y = np.arange(yll, yll + (cellsize * nrows), cellsize) - - if not all( - [ - loc[i, 0] >= x[0] - and loc[i, 0] <= x[-1] - and loc[i, 1] >= y[0] - and loc[i, 1] <= y[-1] - for i in range(len(loc)) - ] - ): - raise ValueError( - "Coordinates in loc must be within the boundary of topography" - ) - - qoi_max_raster = np.loadtxt(qoi_max_raster_asc, skiprows=6) - qoi_max_raster = np.rot90(np.transpose(qoi_max_raster)) - - f_qoi_max = interp2d(x, y, qoi_max_raster) - - qoi_max_loc = [float(f_qoi_max(loc[i, 0], loc[i, 1])) for i in range(len(loc))] - - return np.array(qoi_max_loc) diff --git a/src/psimpy/simulator/ravaflow3G.py b/src/psimpy/simulator/ravaflow3G.py index aff3d90f0607f660779b5b412a808373acd7cf06..d971537dc0c93425097783415e8c0351cb8d30b2 100644 --- a/src/psimpy/simulator/ravaflow3G.py +++ b/src/psimpy/simulator/ravaflow3G.py @@ -4,6 +4,7 @@ import numpy as np from scipy.interpolate import RegularGridInterpolator from typing import Union from beartype import beartype +import warnings class Ravaflow3GMixture: @@ -93,6 +94,12 @@ class Ravaflow3GMixture: `'0'`: Suppress change of direction induced by frictional or viscous forces (default). `'1'`: Do not suppress the change of direction. """ + warnings.warn( + "r.avaflow 3 and lower versions are not supported by its \ + developers, and their use is discouraged. Therefore, ravaflow3G \ + module will be deprecated in the future versions.", + FutureWarning, + ) if not os.path.isdir(dir_sim): raise ValueError(f"{dir_sim} does not exist or is not a directory") @@ -203,6 +210,12 @@ class Ravaflow3GMixture: Name of the shell file (including path), which will be called by `GRASS <https://grass.osgeo.org/>`_ to run the simulation. """ + warnings.warn( + "r.avaflow 3 and lower versions are not supported by its \ + developers, and their use is discouraged. Therefore, ravaflow3G \ + module will be deprecated in the future versions.", + FutureWarning, + ) sh_file = os.path.join(self.dir_sim, f"{prefix}_shell.sh") grass_location = os.path.join(self.dir_sim, f"{prefix}_glocation") @@ -275,6 +288,12 @@ class Ravaflow3GMixture: sh_file : str Name of the shell file (including path). """ + warnings.warn( + "r.avaflow 3 and lower versions are not supported by its \ + developers, and their use is discouraged. Therefore, ravaflow3G \ + module will be deprecated in the future versions.", + FutureWarning, + ) if not os.path.exists(grass_location): raise ValueError(f"{grass_location} does not exist") if not os.path.exists(os.path.join(grass_location, "PERMANENT")): @@ -314,6 +333,12 @@ class Ravaflow3GMixture: impact_area : float A scalar value representing the overall impact area. """ + warnings.warn( + "r.avaflow 3 and lower versions are not supported by its \ + developers, and their use is discouraged. Therefore, ravaflow3G \ + module will be deprecated in the future versions.", + FutureWarning, + ) if qoi not in ["h", "v", "p", "t"]: raise ValueError("qoi must be 'h', 'v', 'p', or 't'") @@ -361,6 +386,12 @@ class Ravaflow3GMixture: qoi_max : float or numpy array Maximum value(s) of ``qoi`` in one simulation. """ + warnings.warn( + "r.avaflow 3 and lower versions are not supported by its \ + developers, and their use is discouraged. Therefore, ravaflow3G \ + module will be deprecated in the future versions.", + FutureWarning, + ) if qoi not in ["h", "v", "p", "t"]: raise ValueError("qoi must be 'h', 'v', 'p', or 't'") @@ -405,6 +436,12 @@ class Ravaflow3GMixture: Consist of maximum value(s) of ``qoi`` at each location. Shape of :code:`(nloc,)`. """ + warnings.warn( + "r.avaflow 3 and lower versions are not supported by its \ + developers, and their use is discouraged. Therefore, ravaflow3G \ + module will be deprecated in the future versions.", + FutureWarning, + ) if not (loc.ndim == 2 and loc.shape[1] == 2): raise ValueError(