-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathUncertainty Quantification.html
More file actions
185 lines (166 loc) · 10.1 KB
/
Copy pathUncertainty Quantification.html
File metadata and controls
185 lines (166 loc) · 10.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>6. Uncertainty Quantification — FitSNAP documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="1. Contributing" href="Contributing.html" />
<link rel="prev" title="5. PyTorch Models" href="Pytorch.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<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">
<img src="_static/FitSNAP.png" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<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>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">User Guide</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="Introduction.html">1. Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="Installation.html">2. Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="Run/index.html">3. Run FitSNAP</a></li>
<li class="toctree-l1"><a class="reference internal" href="Linear.html">4. Linear Models</a></li>
<li class="toctree-l1"><a class="reference internal" href="Pytorch.html">5. PyTorch Models</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">6. Uncertainty Quantification</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#opt">6.1. OPT</a></li>
<li class="toctree-l2"><a class="reference internal" href="#anl">6.2. ANL</a></li>
<li class="toctree-l2"><a class="reference internal" href="#mcmc">6.3. MCMC</a></li>
<li class="toctree-l2"><a class="reference internal" href="#merr">6.4. MERR</a></li>
<li class="toctree-l2"><a class="reference internal" href="#bcs">6.5. BCS</a></li>
</ul>
</li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Programmer Guide</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="Contributing.html">1. Contributing</a></li>
<li class="toctree-l1"><a class="reference internal" href="Executable.html">2. Executable</a></li>
<li class="toctree-l1"><a class="reference internal" href="Library.html">3. Library</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">FitSNAP</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active"><span class="section-number">6. </span>Uncertainty Quantification</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/Uncertainty Quantification.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="uncertainty-quantification">
<h1><span class="section-number">6. </span>Uncertainty Quantification<a class="headerlink" href="#uncertainty-quantification" title="Permalink to this heading"></a></h1>
<p>FitSNAP has uncertainty quantification (UQ) capabilitiies in the form of extra solvers, which are
explain here. This is the exhaustive documentation of UQ options available in main FitSNAP. Not all
are guaranteed to provide good results. All UQ solvers output a covariance.npy file in addition to
performing the FitSNAP model fit. The current general status is:
ANL solver is the recommended go-to for now. It is fast to run and produces the same fit (within
numerical error) as the default SVD solver. The errors calculated from ANL covariance are known to
under-predict actual error in general, and biases are likely to exist in datasets that span a range
of prediction values.</p>
<p>The following settings belong in the <code class="code docutils literal notranslate"><span class="pre">[SOLVER]</span></code> section of input scripts.</p>
<section id="opt">
<h2><span class="section-number">6.1. </span>OPT<a class="headerlink" href="#opt" title="Permalink to this heading"></a></h2>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">solver = OPT</span>
</pre></div>
</div>
<p>The standard least-squares fit, but solving the optimization problem instead of SVD or matrix
inversions. Can be useful when matrices are ill-conditioned, or when we add regularization.</p>
</section>
<section id="anl">
<h2><span class="section-number">6.2. </span>ANL<a class="headerlink" href="#anl" title="Permalink to this heading"></a></h2>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">solver = ANL</span>
<span class="go">nsam = 133 #this is the number of sample fits requested to be drawn from the distribution</span>
<span class="go">cov_nugget = 1.e-10 #this is the small number to be added to the matrix inverse for better conditioning</span>
</pre></div>
</div>
<p>Analytical result for Bayesian fit, assuming constant noise size (not a great assumption generally)</p>
</section>
<section id="mcmc">
<h2><span class="section-number">6.3. </span>MCMC<a class="headerlink" href="#mcmc" title="Permalink to this heading"></a></h2>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">solver = MCMC</span>
<span class="go">nsam = 133 #this is the number of sample fits requested to be drawn from the distribution</span>
<span class="go">mcmc_num = 1000 #this is the number of total MCMC steps requested</span>
<span class="go">mcmc_gamma = 0.01 #this is the MCMC proposal jump size (smaller gamma increases the acceptance rate)</span>
</pre></div>
</div>
<p>MCMC sampling, currently assuming constant noise size, but unlike the ANL case, there is flexibility
if one plays with the log-post function.</p>
</section>
<section id="merr">
<h2><span class="section-number">6.4. </span>MERR<a class="headerlink" href="#merr" title="Permalink to this heading"></a></h2>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">solver = MERR</span>
<span class="go">nsam = 133 #this is the number of sample fits requested to be drawn from the distribution</span>
<span class="go">merr_method = iid #specific liklihood model: options are iid, independent identically distributed, and abc, approximate bayesian computation, and full (too heavy and degenerate, not intended to be used yet)</span>
<span class="go">merr_mult = 0 #0 is additive model error, 1 is multiplicative</span>
<span class="go">merr_cfs = 5 44 3 49 10 33 4 39 38 23 #can provide either a list of coefficient indices to embed on, or "all"</span>
<span class="go">cov_nugget = 1.e-10 #this is the small number to be added to the matrix inverse for better conditioning</span>
</pre></div>
</div>
<p>Model error embedding approach - powerful but very slow. Requires an optimization that does not run
in parallel currently, and is not guaranteed to converge.</p>
</section>
<section id="bcs">
<h2><span class="section-number">6.5. </span>BCS<a class="headerlink" href="#bcs" title="Permalink to this heading"></a></h2>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">solver = BCS</span>
</pre></div>
</div>
<p>Fitting with Bayesian compressive sensing, need to learn how to prune bispectrum bases in order for
this to be useful. Not working properly yet.</p>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="Pytorch.html" class="btn btn-neutral float-left" title="5. PyTorch Models" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="Contributing.html" class="btn btn-neutral float-right" title="1. Contributing" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>© Copyright 2022, Sandia Corporation.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>