Files
FYS-STK4155/doc/pub/BM/html/._BM-bs039.html
T
2018-11-29 05:31:05 +01:00

427 lines
22 KiB
HTML

<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="description" content="Machine Learning and Boltzmann machines with applications">
<title>Machine Learning and Boltzmann machines with applications</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Types of Machine Learning, a repetition', 2, None, '___sec0'),
('Why Boltzmann machines?', 2, None, '___sec1'),
('An intermediate step, the Hopfield network and links to the '
'Ising and Potts models',
2,
None,
'___sec2'),
('A brief review on Markov Chains, Metropolis and Gibbs sampling',
2,
None,
'___sec3'),
('Brownian motion and Markov processes', 2, None, '___sec4'),
('Brownian motion and Markov processes, Ergodicity and Detailed '
'balance',
2,
None,
'___sec5'),
('Brownian motion and Markov processes, jargon',
2,
None,
'___sec6'),
('Brownian motion and Markov processes, sequence of ingredients',
2,
None,
'___sec7'),
('Applications: almost every field in science',
2,
None,
'___sec8'),
('Markov processes', 2, None, '___sec9'),
('Markov processes', 2, None, '___sec10'),
('Markov processes, the probabilities', 2, None, '___sec11'),
('Markov processes', 2, None, '___sec12'),
('An Illustrative Example', 2, None, '___sec13'),
('An Illustrative Example', 2, None, '___sec14'),
('An Illustrative Example, next step', 2, None, '___sec15'),
('An Illustrative Example, the steady state',
2,
None,
'___sec16'),
('An Illustrative Example, iterative steps', 2, None, '___sec17'),
('An Illustrative Example, what does it mean?',
2,
None,
'___sec18'),
('An Illustrative Example, understanding the basics',
2,
None,
'___sec19'),
('The Metropolis Algorithm and Detailed Balance',
2,
None,
'___sec20'),
('The Metropolis Algorithm and Detailed Balance',
2,
None,
'___sec21'),
('The Metropolis Algorithm and Detailed Balance',
2,
None,
'___sec22'),
('The Metropolis Algorithm and Detailed Balance',
2,
None,
'___sec23'),
('The Metropolis Algorithm and Detailed Balance',
2,
None,
'___sec24'),
('The Metropolis Algorithm and Detailed Balance',
2,
None,
'___sec25'),
('The Metropolis Algorithm and Detailed Balance',
2,
None,
'___sec26'),
('The Metropolis Algorithm and Detailed Balance',
2,
None,
'___sec27'),
('The Metropolis Algorithm and Detailed Balance',
2,
None,
'___sec28'),
('The Metropolis Algorithm and Detailed Balance',
2,
None,
'___sec29'),
('The Metropolis Algorithm and Detailed Balance',
2,
None,
'___sec30'),
('The Metropolis Algorithm and Detailed Balance',
2,
None,
'___sec31'),
('The Metropolis Algorithm and Detailed Balance',
2,
None,
'___sec32'),
('The Metropolis Algorithm and Detailed Balance',
2,
None,
'___sec33'),
('The Metropolis Algorithm and Detailed Balance',
2,
None,
'___sec34'),
('The Metropolis Algorithm and Detailed Balance',
2,
None,
'___sec35'),
('The Metropolis Algorithm and Detailed Balance',
2,
None,
'___sec36'),
('The Metropolis Algorithm and Detailed Balance',
2,
None,
'___sec37'),
('The Metropolis Algorithm and Detailed Balance',
2,
None,
'___sec38'),
('The Metropolis Algorithm and Detailed Balance',
2,
None,
'___sec39'),
('The Metropolis Algorithm and Detailed Balance',
2,
None,
'___sec40'),
('The Metropolis Algorithm and Detailed Balance',
2,
None,
'___sec41'),
('The Metropolis Algorithm and Detailed Balance',
2,
None,
'___sec42'),
('Brief Summary', 2, None, '___sec43'),
('Gibbs sampling', 2, None, '___sec44'),
('Boltzmann Machines', 2, None, '___sec45'),
('Some similarities and differences from DNNs',
2,
None,
'___sec46'),
('Boltzmann machines (BM)', 2, None, '___sec47'),
('A standard BM setup', 2, None, '___sec48'),
('The structure of the RBM network', 2, None, '___sec49'),
('The network', 2, None, '___sec50'),
('Goals', 2, None, '___sec51'),
('Joint distribution', 2, None, '___sec52'),
('Network Elements, the energy function', 2, None, '___sec53'),
('Defining different types of RBMs', 2, None, '___sec54'),
('More about RBMs', 2, None, '___sec55'),
('Sampling: Metropolis sampling', 2, None, '___sec56'),
('Sampling: Gibbs sampling', 2, None, '___sec57'),
('Gaussian RBM', 2, None, '___sec58'),
('Cost function', 2, None, '___sec59'),
('Optimization / Training', 2, None, '___sec60'),
('More on RBMs', 2, None, '___sec61'),
('Which sampling to use', 2, None, '___sec62'),
('Kullback-Leibler relative entropy', 2, None, '___sec63'),
('Optimizing the cost function', 2, None, '___sec64'),
('Setting up for gradient descent calculations',
2,
None,
'___sec65'),
('More interpretations', 2, None, '___sec66'),
('Recent examples: RBMs for the quantum many body problem',
2,
None,
'___sec67'),
('Choose the right RBM', 2, None, '___sec68'),
('Representing the wave function', 2, None, '___sec69'),
('Choose the cost function', 2, None, '___sec70'),
('Running the codes', 2, None, '___sec71'),
('Energy as function of iterations, $N=2$ electrons',
2,
None,
'___sec72')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="BM-bs.html">Machine Learning and Boltzmann machines with applications</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._BM-bs001.html#___sec0" style="font-size: 80%;">Types of Machine Learning, a repetition</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs002.html#___sec1" style="font-size: 80%;">Why Boltzmann machines?</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs003.html#___sec2" style="font-size: 80%;">An intermediate step, the Hopfield network and links to the Ising and Potts models</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs004.html#___sec3" style="font-size: 80%;">A brief review on Markov Chains, Metropolis and Gibbs sampling</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs005.html#___sec4" style="font-size: 80%;">Brownian motion and Markov processes</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs006.html#___sec5" style="font-size: 80%;">Brownian motion and Markov processes, Ergodicity and Detailed balance</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs007.html#___sec6" style="font-size: 80%;">Brownian motion and Markov processes, jargon</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs008.html#___sec7" style="font-size: 80%;">Brownian motion and Markov processes, sequence of ingredients</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs009.html#___sec8" style="font-size: 80%;">Applications: almost every field in science</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs010.html#___sec9" style="font-size: 80%;">Markov processes</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs011.html#___sec10" style="font-size: 80%;">Markov processes</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs012.html#___sec11" style="font-size: 80%;">Markov processes, the probabilities</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs013.html#___sec12" style="font-size: 80%;">Markov processes</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs014.html#___sec13" style="font-size: 80%;">An Illustrative Example</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs015.html#___sec14" style="font-size: 80%;">An Illustrative Example</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs016.html#___sec15" style="font-size: 80%;">An Illustrative Example, next step</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs017.html#___sec16" style="font-size: 80%;">An Illustrative Example, the steady state</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs018.html#___sec17" style="font-size: 80%;">An Illustrative Example, iterative steps</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs019.html#___sec18" style="font-size: 80%;">An Illustrative Example, what does it mean?</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs020.html#___sec19" style="font-size: 80%;">An Illustrative Example, understanding the basics</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs021.html#___sec20" style="font-size: 80%;">The Metropolis Algorithm and Detailed Balance</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs022.html#___sec21" style="font-size: 80%;">The Metropolis Algorithm and Detailed Balance</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs023.html#___sec22" style="font-size: 80%;">The Metropolis Algorithm and Detailed Balance</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs024.html#___sec23" style="font-size: 80%;">The Metropolis Algorithm and Detailed Balance</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs025.html#___sec24" style="font-size: 80%;">The Metropolis Algorithm and Detailed Balance</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs026.html#___sec25" style="font-size: 80%;">The Metropolis Algorithm and Detailed Balance</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs027.html#___sec26" style="font-size: 80%;">The Metropolis Algorithm and Detailed Balance</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs028.html#___sec27" style="font-size: 80%;">The Metropolis Algorithm and Detailed Balance</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs029.html#___sec28" style="font-size: 80%;">The Metropolis Algorithm and Detailed Balance</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs030.html#___sec29" style="font-size: 80%;">The Metropolis Algorithm and Detailed Balance</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs031.html#___sec30" style="font-size: 80%;">The Metropolis Algorithm and Detailed Balance</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs032.html#___sec31" style="font-size: 80%;">The Metropolis Algorithm and Detailed Balance</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs033.html#___sec32" style="font-size: 80%;">The Metropolis Algorithm and Detailed Balance</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs034.html#___sec33" style="font-size: 80%;">The Metropolis Algorithm and Detailed Balance</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs035.html#___sec34" style="font-size: 80%;">The Metropolis Algorithm and Detailed Balance</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs036.html#___sec35" style="font-size: 80%;">The Metropolis Algorithm and Detailed Balance</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs037.html#___sec36" style="font-size: 80%;">The Metropolis Algorithm and Detailed Balance</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs038.html#___sec37" style="font-size: 80%;">The Metropolis Algorithm and Detailed Balance</a></li>
<!-- navigation toc: --> <li><a href="#___sec38" style="font-size: 80%;">The Metropolis Algorithm and Detailed Balance</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs040.html#___sec39" style="font-size: 80%;">The Metropolis Algorithm and Detailed Balance</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs041.html#___sec40" style="font-size: 80%;">The Metropolis Algorithm and Detailed Balance</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs042.html#___sec41" style="font-size: 80%;">The Metropolis Algorithm and Detailed Balance</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs043.html#___sec42" style="font-size: 80%;">The Metropolis Algorithm and Detailed Balance</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs044.html#___sec43" style="font-size: 80%;">Brief Summary</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs045.html#___sec44" style="font-size: 80%;">Gibbs sampling</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs046.html#___sec45" style="font-size: 80%;">Boltzmann Machines</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs047.html#___sec46" style="font-size: 80%;">Some similarities and differences from DNNs</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs048.html#___sec47" style="font-size: 80%;">Boltzmann machines (BM)</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs049.html#___sec48" style="font-size: 80%;">A standard BM setup</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs050.html#___sec49" style="font-size: 80%;">The structure of the RBM network</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs051.html#___sec50" style="font-size: 80%;">The network</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs052.html#___sec51" style="font-size: 80%;">Goals</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs053.html#___sec52" style="font-size: 80%;">Joint distribution</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs054.html#___sec53" style="font-size: 80%;">Network Elements, the energy function</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs055.html#___sec54" style="font-size: 80%;">Defining different types of RBMs</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs056.html#___sec55" style="font-size: 80%;">More about RBMs</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs057.html#___sec56" style="font-size: 80%;">Sampling: Metropolis sampling</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs058.html#___sec57" style="font-size: 80%;">Sampling: Gibbs sampling</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs059.html#___sec58" style="font-size: 80%;">Gaussian RBM</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs060.html#___sec59" style="font-size: 80%;">Cost function</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs061.html#___sec60" style="font-size: 80%;">Optimization / Training</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs062.html#___sec61" style="font-size: 80%;">More on RBMs</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs063.html#___sec62" style="font-size: 80%;">Which sampling to use</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs064.html#___sec63" style="font-size: 80%;">Kullback-Leibler relative entropy</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs065.html#___sec64" style="font-size: 80%;">Optimizing the cost function</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs066.html#___sec65" style="font-size: 80%;">Setting up for gradient descent calculations</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs067.html#___sec66" style="font-size: 80%;">More interpretations</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs068.html#___sec67" style="font-size: 80%;">Recent examples: RBMs for the quantum many body problem</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs069.html#___sec68" style="font-size: 80%;">Choose the right RBM</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs070.html#___sec69" style="font-size: 80%;">Representing the wave function</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs071.html#___sec70" style="font-size: 80%;">Choose the cost function</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs072.html#___sec71" style="font-size: 80%;">Running the codes</a></li>
<!-- navigation toc: --> <li><a href="._BM-bs073.html#___sec72" style="font-size: 80%;">Energy as function of iterations, \( N=2 \) electrons</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0039"></a>
<!-- !split -->
<h2 id="___sec38" class="anchor">The Metropolis Algorithm and Detailed Balance </h2>
<div class="panel panel-default">
<div class="panel-body">
<p> <!-- subsequent paragraphs come in larger fonts, so start with a paragraph -->
<p>
At a given temperature \( T \) we start our simulation by randomly choosing state
\( E_9 \). Flipping spins we may then find a path from \( E_9\rightarrow E_8 \rightarrow E_7 \dots \rightarrow E_1 \rightarrow E_0 \).
This would however lead to biased statistical averages since it would violate the ergodic hypothesis discussed
in the previous section. This principle states that
it should be possible for any Markov process to reach every possible state of the system
from any starting point if the simulations is carried out for a long enough time.
<p>
Any state in a Boltzmann distribution has a probability different from zero and if such
a state cannot be reached from a given starting point, then the system is not ergodic.
This means that another possible path to \( E_0 \) could be
\( E_9\rightarrow E_7 \rightarrow E_8 \dots \rightarrow E_9 \rightarrow E_5 \rightarrow E_0 \) and so forth.
Even though such a path could have a negligible probability it is still a possibility, and if
we simulate long enough it should be included in our computation of an expectation value.
</div>
</div>
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._BM-bs038.html">&laquo;</a></li>
<li><a href="._BM-bs000.html">1</a></li>
<li><a href="">...</a></li>
<li><a href="._BM-bs031.html">32</a></li>
<li><a href="._BM-bs032.html">33</a></li>
<li><a href="._BM-bs033.html">34</a></li>
<li><a href="._BM-bs034.html">35</a></li>
<li><a href="._BM-bs035.html">36</a></li>
<li><a href="._BM-bs036.html">37</a></li>
<li><a href="._BM-bs037.html">38</a></li>
<li><a href="._BM-bs038.html">39</a></li>
<li class="active"><a href="._BM-bs039.html">40</a></li>
<li><a href="._BM-bs040.html">41</a></li>
<li><a href="._BM-bs041.html">42</a></li>
<li><a href="._BM-bs042.html">43</a></li>
<li><a href="._BM-bs043.html">44</a></li>
<li><a href="._BM-bs044.html">45</a></li>
<li><a href="._BM-bs045.html">46</a></li>
<li><a href="._BM-bs046.html">47</a></li>
<li><a href="._BM-bs047.html">48</a></li>
<li><a href="._BM-bs048.html">49</a></li>
<li><a href="">...</a></li>
<li><a href="._BM-bs073.html">74</a></li>
<li><a href="._BM-bs040.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>