updated project and codes

This commit is contained in:
mhjensen
2017-10-04 14:40:31 +02:00
parent 6b7f0670e6
commit 826c1db0f3
20 changed files with 901252 additions and 1118 deletions
+28 -14
View File
@@ -1,10 +1,21 @@
from sys import argv
from os import mkdir, path
import time
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.ticker import FormatStrFormatter
from matplotlib.font_manager import FontProperties
# Timing Decorator
def timeFunction(f):
def wrap(*args):
time1 = time.time()
ret = f(*args)
time2 = time.time()
print '%s function took %0.3f s' % (f.func_name, (time2-time1))
return ret
return wrap
class dataAnalysisClass:
# General Init functions
def __init__(self, fileName, size=0):
@@ -19,8 +30,8 @@ class dataAnalysisClass:
if size != 0:
self.data = np.loadtxt(self.inputFileName)[0:size]
else:
self.data = np.loadtxt(self.inputFileName)
self.data = np.loadtxt(self.inputFileName)
# Statistical Analysis with Multiple Methods
def runAllAnalyses(self):
if len(self.data) <= 100000:
@@ -34,6 +45,7 @@ class dataAnalysisClass:
self.blocking()
# Standard Autocorrelation
@timeFunction
def autocorrelation(self):
self.acf = np.zeros(len(self.data)/2)
for k in range(0, len(self.data)/2):
@@ -41,6 +53,7 @@ class dataAnalysisClass:
self.data[k:len(self.data)]]))[0,1]
# Bootstrap
@timeFunction
def bootstrap(self, nBoots = 1000):
bootVec = np.zeros(nBoots)
for k in range(0,nBoots):
@@ -50,6 +63,7 @@ class dataAnalysisClass:
self.bootStd = np.std(bootVec)
# Jackknife
@timeFunction
def jackknife(self):
jackknVec = np.zeros(len(self.data))
for k in range(0,len(self.data)):
@@ -58,18 +72,19 @@ class dataAnalysisClass:
self.jackknVar = float(len(self.data) - 1) * np.var(jackknVec)
self.jackknStd = np.sqrt(self.jackknVar)
def blocking(self, nPoints=500):
# Blocking
@timeFunction
def blocking(self, blockSizeMax = 500):
blockSizeMin = 1
blockSizeMax = len(self.data)/2
self.blockSizes = []
self.meanVec = []
self.varVec = []
blockList = np.linspace(blockSizeMin, blockSizeMax, nPoints)
for i in range(0, nPoints):
blockSize = int(blockList[i])
for i in range(blockSizeMin, blockSizeMax):
if(len(self.data) % i != 0):
pass#continue
blockSize = i
meanTempVec = []
varTempVec = []
startPoint = 0
@@ -79,19 +94,17 @@ class dataAnalysisClass:
meanTempVec.append(np.average(self.data[startPoint:endPoint]))
startPoint = endPoint
endPoint += blockSize
mean, var = np.average(meanTempVec), np.var(meanTempVec)
mean, var = np.average(meanTempVec), np.var(meanTempVec)/len(meanTempVec)
self.meanVec.append(mean)
self.varVec.append(var)
self.blockSizes.append(blockSize)
self.blockingAvg = np.average(self.meanVec[-3:])
self.blockingVar = (np.average(self.varVec[-3:]))
self.blockingAvg = np.average(self.meanVec[-200:])
self.blockingVar = (np.average(self.varVec[-200:]))
self.blockingStd = np.sqrt(self.blockingVar)
# Plot of Data, Autocorrelation Function and Histogram
def plotAll(self):
self.createOutputFolder()
@@ -190,6 +203,7 @@ class dataAnalysisClass:
# Initialize the class
if len(argv) > 2:
dataAnalysis = dataAnalysisClass(argv[1], int(argv[2]))
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -46,20 +46,24 @@ Automatically generated HTML file from DocOnce source
'___sec0'),
('Introduction', 3, None, '___sec1'),
('Part a): Producing the data', 3, None, '___sec2'),
('Part b): Fitting the data using regression analysis and other methods',
('Part b): Estimating the standard deviation',
3,
None,
'___sec3'),
('Part c): Introducing Bayesian statistics',
('Part c): Fitting the data using regression analysis and other methods',
3,
None,
'___sec4'),
('Part d): Studying the Ising model or the VMC results with Neural networks',
('Part d): Introducing Bayesian statistics',
3,
None,
'___sec5'),
('Background literature', 2, None, '___sec6'),
('Introduction to numerical projects', 2, None, '___sec7')]}
('Part e): Studying the Ising model or the VMC results with Neural networks',
3,
None,
'___sec6'),
('Background literature', 2, None, '___sec7'),
('Introduction to numerical projects', 2, None, '___sec8')]}
end of tocinfo -->
<body>
@@ -74,8 +78,8 @@ MathJax.Hub.Config({
}
});
</script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
@@ -100,11 +104,12 @@ MathJax.Hub.Config({
<!-- navigation toc: --> <li><a href="#___sec0" style="font-size: 80%;"><b>Using results from Monte Carlo models for machine learning</b></a></li>
<!-- navigation toc: --> <li><a href="#___sec1" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Introduction</a></li>
<!-- navigation toc: --> <li><a href="#___sec2" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Part a): Producing the data</a></li>
<!-- navigation toc: --> <li><a href="#___sec3" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Part b): Fitting the data using regression analysis and other methods</a></li>
<!-- navigation toc: --> <li><a href="#___sec4" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Part c): Introducing Bayesian statistics</a></li>
<!-- navigation toc: --> <li><a href="#___sec5" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Part d): Studying the Ising model or the VMC results with Neural networks</a></li>
<!-- navigation toc: --> <li><a href="#___sec6" style="font-size: 80%;"><b>Background literature</b></a></li>
<!-- navigation toc: --> <li><a href="#___sec7" style="font-size: 80%;"><b>Introduction to numerical projects</b></a></li>
<!-- navigation toc: --> <li><a href="#___sec3" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Part b): Estimating the standard deviation</a></li>
<!-- navigation toc: --> <li><a href="#___sec4" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Part c): Fitting the data using regression analysis and other methods</a></li>
<!-- navigation toc: --> <li><a href="#___sec5" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Part d): Introducing Bayesian statistics</a></li>
<!-- navigation toc: --> <li><a href="#___sec6" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Part e): Studying the Ising model or the VMC results with Neural networks</a></li>
<!-- navigation toc: --> <li><a href="#___sec7" style="font-size: 80%;"><b>Background literature</b></a></li>
<!-- navigation toc: --> <li><a href="#___sec8" style="font-size: 80%;"><b>Introduction to numerical projects</b></a></li>
</ul>
</li>
@@ -148,7 +153,7 @@ MathJax.Hub.Config({
<h3 id="___sec1" class="anchor">Introduction </h3>
<p>
The aim of this project is to use an already developed Monte Carlo program (either the ising Model or a variational Monte Carlo code) to produce, in case of the Ising model, the energy as function of temperature. For the variational Monte carlo calculation of interacting electrons in an oscilaltor trap, the data are represented by the ground state energies as functions of the variational parameters.
The aim of this project is to use an already developed Monte Carlo program (either the ising Model or a variational Monte Carlo code) to produce, in case of the <a href="https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/IsingModel" target="_self">Ising model</a>, the energy as function of temperature. For the <a href="https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/VMC2Electrons/" target="_self">variational Monte Carlo calculation</a> of interacting electrons in an oscilaltor trap, the data are represented by the ground state energies as functions of the variational parameters.
<p>
In its simplest form
@@ -163,34 +168,54 @@ constant expressing the strength of the interaction between
neighboring spins. The symbol \( < kl> \) indicates that we sum over
nearest neighbors only. We will assume that we have a ferromagnetic
ordering, viz \( J> 0 \). We will use periodic boundary conditions and
the Metropolis algorithm only. Alternatively we can use the supplied variational Monte Carlo program which solves Schroedinger's equation for two interacting electrons in a harmonic oscillator trap. Both codes can be found at the webpage of the course under programs.
the Metropolis algorithm only. Alternatively we can use the supplied variational Monte Carlo program which solves Schroedinger's equation for two interacting electrons in a harmonic oscillator trap. Both codes can be found at the webpage of the <a href="https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/" target="_self">course under programs</a>.
<h3 id="___sec2" class="anchor">Part a): Producing the data </h3>
<p>
\( \langle E\rangle \) and \( \langle \vert M\vert \rangle \), the specific heat
\( C_V \) and the susceptibility \( \chi \) as functions of \( T \) for \( L=40 \),
\( L=60 \), \( L=100 \) and \( L=140 \) for \( T\in [2.0,2.3] \) with a step in
temperature \( \Delta T=0.05 \) or smaller. You may find it convenient narrow the domain for \( T \).
If we opt for the Ising model code, we need to generate for every span over the lattice and output of the total energy and the magnetic moment (if we wish to study this quantity as well), that is compute and write to file as function of temperature
\( \langle E\rangle \) and \( \langle \vert M\vert \rangle \).
We will use a fixed lattice siste of \( L\times L = 40 \times 40 \). Make sure the calculations have been equilibrated and compute these expectation values for
for \( T\in [1.0,3.0] \) with a step in
temperature \( \Delta T=0.1 \) or smaller. This are the data you will use to estimate the standard deviation in the next part of the project.
You should keep a file for the different temperatures as you will need to compute the standard deviation for each temperature.
<p>
Plot \( \langle E\rangle \),
\( \langle \vert M\vert\rangle \), \( C_V \) and \( \chi \) as functions of \( T \).
Alternatively you can run the variational Monte Carlo program for two interacting electrons confined to move in a harmonic oscillator trap. Here you will produce the variational expectaction value of the energy as a function of the variational parameters \( \alpha \) and \( \beta \). You could single out only a set of such parameters after you have found the minimum energy.
<h3 id="___sec3" class="anchor">Part b): Fitting the data using regression analysis and other methods </h3>
<p>
These two cases form then our training data which we will use for our estimates of the standard deviation.
<h3 id="___sec3" class="anchor">Part b): Estimating the standard deviation </h3>
This part deals with widely used resampling methods to find the standard deviation on our data sets. The methods we can use are the Blocking method, the Bootstrap method and the Jackknife method. The latter two are examples of so-called resampling methods. <a href="https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/Sampling" target="_self">The functions provided under the program folder</a> encode all three methods. The typical situation is to generate data using a C++ or Fortan code, as in part a) above. These data are then used by a post-analysis program in order to perform a statistical analysis.
<p>
In case of the Ising model, the final product will be a table of the expectation values of the energy (or the magnetic moment) as function of temperature and with a proper standard deviation. These data will then enter our analysis in parts c-e). We will call these data the training data.
<p>
If you opt for the variational Monte Carlo program, you need to make a table of the ground state energy as function of various variational parameters (you can limit yourself to \( \alpha \) only) with proper standard deviation estimations.
<p>
Your task here is thus to use the data from part a) and generate the standard deviation using one (or more) of the methods discussed above. In general, the Bootstrap method is the most widely used one.
<p>
These data will then be used in our next step, where we will try to obtain a functional approximation to our data sets.
<h3 id="___sec4" class="anchor">Part c): Fitting the data using regression analysis and other methods </h3>
<p>
More text to come
<h3 id="___sec4" class="anchor">Part c): Introducing Bayesian statistics </h3>
<h3 id="___sec5" class="anchor">Part d): Introducing Bayesian statistics </h3>
More text to come
<h3 id="___sec5" class="anchor">Part d): Studying the Ising model or the VMC results with Neural networks </h3>
<h3 id="___sec6" class="anchor">Part e): Studying the Ising model or the VMC results with Neural networks </h3>
More text to come
<h2 id="___sec6" class="anchor">Background literature </h2>
<h2 id="___sec7" class="anchor">Background literature </h2>
<p>
If you wish to read more about the Ising model and statistical physics here are three suggestions.
@@ -201,7 +226,7 @@ If you wish to read more about the Ising model and statistical physics here are
<li> <a href="https://global.oup.com/academic/product/monte-carlo-methods-in-statistical-physics-9780198517979?cc=no&lang=en&" target="_self">M. E. J. Newman and T. Barkema</a>, <em>Monte Carlo Methods in Statistical Physics</em>, Oxford, see chapters 3 and 4.</li>
</ul>
<h2 id="___sec7" class="anchor">Introduction to numerical projects </h2>
<h2 id="___sec8" class="anchor">Introduction to numerical projects </h2>
<p>
Here follows a brief recipe and recommendation on how to write a report for each
+50 -25
View File
@@ -46,20 +46,24 @@ Automatically generated HTML file from DocOnce source
'___sec0'),
('Introduction', 3, None, '___sec1'),
('Part a): Producing the data', 3, None, '___sec2'),
('Part b): Fitting the data using regression analysis and other methods',
('Part b): Estimating the standard deviation',
3,
None,
'___sec3'),
('Part c): Introducing Bayesian statistics',
('Part c): Fitting the data using regression analysis and other methods',
3,
None,
'___sec4'),
('Part d): Studying the Ising model or the VMC results with Neural networks',
('Part d): Introducing Bayesian statistics',
3,
None,
'___sec5'),
('Background literature', 2, None, '___sec6'),
('Introduction to numerical projects', 2, None, '___sec7')]}
('Part e): Studying the Ising model or the VMC results with Neural networks',
3,
None,
'___sec6'),
('Background literature', 2, None, '___sec7'),
('Introduction to numerical projects', 2, None, '___sec8')]}
end of tocinfo -->
<body>
@@ -74,8 +78,8 @@ MathJax.Hub.Config({
}
});
</script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
@@ -100,11 +104,12 @@ MathJax.Hub.Config({
<!-- navigation toc: --> <li><a href="#___sec0" style="font-size: 80%;"><b>Using results from Monte Carlo models for machine learning</b></a></li>
<!-- navigation toc: --> <li><a href="#___sec1" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Introduction</a></li>
<!-- navigation toc: --> <li><a href="#___sec2" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Part a): Producing the data</a></li>
<!-- navigation toc: --> <li><a href="#___sec3" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Part b): Fitting the data using regression analysis and other methods</a></li>
<!-- navigation toc: --> <li><a href="#___sec4" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Part c): Introducing Bayesian statistics</a></li>
<!-- navigation toc: --> <li><a href="#___sec5" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Part d): Studying the Ising model or the VMC results with Neural networks</a></li>
<!-- navigation toc: --> <li><a href="#___sec6" style="font-size: 80%;"><b>Background literature</b></a></li>
<!-- navigation toc: --> <li><a href="#___sec7" style="font-size: 80%;"><b>Introduction to numerical projects</b></a></li>
<!-- navigation toc: --> <li><a href="#___sec3" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Part b): Estimating the standard deviation</a></li>
<!-- navigation toc: --> <li><a href="#___sec4" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Part c): Fitting the data using regression analysis and other methods</a></li>
<!-- navigation toc: --> <li><a href="#___sec5" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Part d): Introducing Bayesian statistics</a></li>
<!-- navigation toc: --> <li><a href="#___sec6" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Part e): Studying the Ising model or the VMC results with Neural networks</a></li>
<!-- navigation toc: --> <li><a href="#___sec7" style="font-size: 80%;"><b>Background literature</b></a></li>
<!-- navigation toc: --> <li><a href="#___sec8" style="font-size: 80%;"><b>Introduction to numerical projects</b></a></li>
</ul>
</li>
@@ -148,7 +153,7 @@ MathJax.Hub.Config({
<h3 id="___sec1" class="anchor">Introduction </h3>
<p>
The aim of this project is to use an already developed Monte Carlo program (either the ising Model or a variational Monte Carlo code) to produce, in case of the Ising model, the energy as function of temperature. For the variational Monte carlo calculation of interacting electrons in an oscilaltor trap, the data are represented by the ground state energies as functions of the variational parameters.
The aim of this project is to use an already developed Monte Carlo program (either the ising Model or a variational Monte Carlo code) to produce, in case of the <a href="https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/IsingModel" target="_self">Ising model</a>, the energy as function of temperature. For the <a href="https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/VMC2Electrons/" target="_self">variational Monte Carlo calculation</a> of interacting electrons in an oscilaltor trap, the data are represented by the ground state energies as functions of the variational parameters.
<p>
In its simplest form
@@ -163,34 +168,54 @@ constant expressing the strength of the interaction between
neighboring spins. The symbol \( < kl> \) indicates that we sum over
nearest neighbors only. We will assume that we have a ferromagnetic
ordering, viz \( J> 0 \). We will use periodic boundary conditions and
the Metropolis algorithm only. Alternatively we can use the supplied variational Monte Carlo program which solves Schroedinger's equation for two interacting electrons in a harmonic oscillator trap. Both codes can be found at the webpage of the course under programs.
the Metropolis algorithm only. Alternatively we can use the supplied variational Monte Carlo program which solves Schroedinger's equation for two interacting electrons in a harmonic oscillator trap. Both codes can be found at the webpage of the <a href="https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/" target="_self">course under programs</a>.
<h3 id="___sec2" class="anchor">Part a): Producing the data </h3>
<p>
\( \langle E\rangle \) and \( \langle \vert M\vert \rangle \), the specific heat
\( C_V \) and the susceptibility \( \chi \) as functions of \( T \) for \( L=40 \),
\( L=60 \), \( L=100 \) and \( L=140 \) for \( T\in [2.0,2.3] \) with a step in
temperature \( \Delta T=0.05 \) or smaller. You may find it convenient narrow the domain for \( T \).
If we opt for the Ising model code, we need to generate for every span over the lattice and output of the total energy and the magnetic moment (if we wish to study this quantity as well), that is compute and write to file as function of temperature
\( \langle E\rangle \) and \( \langle \vert M\vert \rangle \).
We will use a fixed lattice siste of \( L\times L = 40 \times 40 \). Make sure the calculations have been equilibrated and compute these expectation values for
for \( T\in [1.0,3.0] \) with a step in
temperature \( \Delta T=0.1 \) or smaller. This are the data you will use to estimate the standard deviation in the next part of the project.
You should keep a file for the different temperatures as you will need to compute the standard deviation for each temperature.
<p>
Plot \( \langle E\rangle \),
\( \langle \vert M\vert\rangle \), \( C_V \) and \( \chi \) as functions of \( T \).
Alternatively you can run the variational Monte Carlo program for two interacting electrons confined to move in a harmonic oscillator trap. Here you will produce the variational expectaction value of the energy as a function of the variational parameters \( \alpha \) and \( \beta \). You could single out only a set of such parameters after you have found the minimum energy.
<h3 id="___sec3" class="anchor">Part b): Fitting the data using regression analysis and other methods </h3>
<p>
These two cases form then our training data which we will use for our estimates of the standard deviation.
<h3 id="___sec3" class="anchor">Part b): Estimating the standard deviation </h3>
This part deals with widely used resampling methods to find the standard deviation on our data sets. The methods we can use are the Blocking method, the Bootstrap method and the Jackknife method. The latter two are examples of so-called resampling methods. <a href="https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/Sampling" target="_self">The functions provided under the program folder</a> encode all three methods. The typical situation is to generate data using a C++ or Fortan code, as in part a) above. These data are then used by a post-analysis program in order to perform a statistical analysis.
<p>
In case of the Ising model, the final product will be a table of the expectation values of the energy (or the magnetic moment) as function of temperature and with a proper standard deviation. These data will then enter our analysis in parts c-e). We will call these data the training data.
<p>
If you opt for the variational Monte Carlo program, you need to make a table of the ground state energy as function of various variational parameters (you can limit yourself to \( \alpha \) only) with proper standard deviation estimations.
<p>
Your task here is thus to use the data from part a) and generate the standard deviation using one (or more) of the methods discussed above. In general, the Bootstrap method is the most widely used one.
<p>
These data will then be used in our next step, where we will try to obtain a functional approximation to our data sets.
<h3 id="___sec4" class="anchor">Part c): Fitting the data using regression analysis and other methods </h3>
<p>
More text to come
<h3 id="___sec4" class="anchor">Part c): Introducing Bayesian statistics </h3>
<h3 id="___sec5" class="anchor">Part d): Introducing Bayesian statistics </h3>
More text to come
<h3 id="___sec5" class="anchor">Part d): Studying the Ising model or the VMC results with Neural networks </h3>
<h3 id="___sec6" class="anchor">Part e): Studying the Ising model or the VMC results with Neural networks </h3>
More text to come
<h2 id="___sec6" class="anchor">Background literature </h2>
<h2 id="___sec7" class="anchor">Background literature </h2>
<p>
If you wish to read more about the Ising model and statistical physics here are three suggestions.
@@ -201,7 +226,7 @@ If you wish to read more about the Ising model and statistical physics here are
<li> <a href="https://global.oup.com/academic/product/monte-carlo-methods-in-statistical-physics-9780198517979?cc=no&lang=en&" target="_self">M. E. J. Newman and T. Barkema</a>, <em>Monte Carlo Methods in Statistical Physics</em>, Oxford, see chapters 3 and 4.</li>
</ul>
<h2 id="___sec7" class="anchor">Introduction to numerical projects </h2>
<h2 id="___sec8" class="anchor">Introduction to numerical projects </h2>
<p>
Here follows a brief recipe and recommendation on how to write a report for each
+44 -20
View File
@@ -45,20 +45,24 @@ div { text-align: justify; text-justify: inter-word; }
'___sec0'),
('Introduction', 3, None, '___sec1'),
('Part a): Producing the data', 3, None, '___sec2'),
('Part b): Fitting the data using regression analysis and other methods',
('Part b): Estimating the standard deviation',
3,
None,
'___sec3'),
('Part c): Introducing Bayesian statistics',
('Part c): Fitting the data using regression analysis and other methods',
3,
None,
'___sec4'),
('Part d): Studying the Ising model or the VMC results with Neural networks',
('Part d): Introducing Bayesian statistics',
3,
None,
'___sec5'),
('Background literature', 2, None, '___sec6'),
('Introduction to numerical projects', 2, None, '___sec7')]}
('Part e): Studying the Ising model or the VMC results with Neural networks',
3,
None,
'___sec6'),
('Background literature', 2, None, '___sec7'),
('Introduction to numerical projects', 2, None, '___sec8')]}
end of tocinfo -->
<body>
@@ -73,8 +77,8 @@ MathJax.Hub.Config({
}
});
</script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
@@ -107,7 +111,7 @@ MathJax.Hub.Config({
<h3 id="___sec1">Introduction </h3>
<p>
The aim of this project is to use an already developed Monte Carlo program (either the ising Model or a variational Monte Carlo code) to produce, in case of the Ising model, the energy as function of temperature. For the variational Monte carlo calculation of interacting electrons in an oscilaltor trap, the data are represented by the ground state energies as functions of the variational parameters.
The aim of this project is to use an already developed Monte Carlo program (either the ising Model or a variational Monte Carlo code) to produce, in case of the <a href="https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/IsingModel" target="_blank">Ising model</a>, the energy as function of temperature. For the <a href="https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/VMC2Electrons/" target="_blank">variational Monte Carlo calculation</a> of interacting electrons in an oscilaltor trap, the data are represented by the ground state energies as functions of the variational parameters.
<p>
In its simplest form
@@ -122,34 +126,54 @@ constant expressing the strength of the interaction between
neighboring spins. The symbol \( < kl> \) indicates that we sum over
nearest neighbors only. We will assume that we have a ferromagnetic
ordering, viz \( J> 0 \). We will use periodic boundary conditions and
the Metropolis algorithm only. Alternatively we can use the supplied variational Monte Carlo program which solves Schroedinger's equation for two interacting electrons in a harmonic oscillator trap. Both codes can be found at the webpage of the course under programs.
the Metropolis algorithm only. Alternatively we can use the supplied variational Monte Carlo program which solves Schroedinger's equation for two interacting electrons in a harmonic oscillator trap. Both codes can be found at the webpage of the <a href="https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/" target="_blank">course under programs</a>.
<h3 id="___sec2">Part a): Producing the data </h3>
<p>
\( \langle E\rangle \) and \( \langle \vert M\vert \rangle \), the specific heat
\( C_V \) and the susceptibility \( \chi \) as functions of \( T \) for \( L=40 \),
\( L=60 \), \( L=100 \) and \( L=140 \) for \( T\in [2.0,2.3] \) with a step in
temperature \( \Delta T=0.05 \) or smaller. You may find it convenient narrow the domain for \( T \).
If we opt for the Ising model code, we need to generate for every span over the lattice and output of the total energy and the magnetic moment (if we wish to study this quantity as well), that is compute and write to file as function of temperature
\( \langle E\rangle \) and \( \langle \vert M\vert \rangle \).
We will use a fixed lattice siste of \( L\times L = 40 \times 40 \). Make sure the calculations have been equilibrated and compute these expectation values for
for \( T\in [1.0,3.0] \) with a step in
temperature \( \Delta T=0.1 \) or smaller. This are the data you will use to estimate the standard deviation in the next part of the project.
You should keep a file for the different temperatures as you will need to compute the standard deviation for each temperature.
<p>
Plot \( \langle E\rangle \),
\( \langle \vert M\vert\rangle \), \( C_V \) and \( \chi \) as functions of \( T \).
Alternatively you can run the variational Monte Carlo program for two interacting electrons confined to move in a harmonic oscillator trap. Here you will produce the variational expectaction value of the energy as a function of the variational parameters \( \alpha \) and \( \beta \). You could single out only a set of such parameters after you have found the minimum energy.
<h3 id="___sec3">Part b): Fitting the data using regression analysis and other methods </h3>
<p>
These two cases form then our training data which we will use for our estimates of the standard deviation.
<h3 id="___sec3">Part b): Estimating the standard deviation </h3>
This part deals with widely used resampling methods to find the standard deviation on our data sets. The methods we can use are the Blocking method, the Bootstrap method and the Jackknife method. The latter two are examples of so-called resampling methods. <a href="https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/Sampling" target="_blank">The functions provided under the program folder</a> encode all three methods. The typical situation is to generate data using a C++ or Fortan code, as in part a) above. These data are then used by a post-analysis program in order to perform a statistical analysis.
<p>
In case of the Ising model, the final product will be a table of the expectation values of the energy (or the magnetic moment) as function of temperature and with a proper standard deviation. These data will then enter our analysis in parts c-e). We will call these data the training data.
<p>
If you opt for the variational Monte Carlo program, you need to make a table of the ground state energy as function of various variational parameters (you can limit yourself to \( \alpha \) only) with proper standard deviation estimations.
<p>
Your task here is thus to use the data from part a) and generate the standard deviation using one (or more) of the methods discussed above. In general, the Bootstrap method is the most widely used one.
<p>
These data will then be used in our next step, where we will try to obtain a functional approximation to our data sets.
<h3 id="___sec4">Part c): Fitting the data using regression analysis and other methods </h3>
<p>
More text to come
<h3 id="___sec4">Part c): Introducing Bayesian statistics </h3>
<h3 id="___sec5">Part d): Introducing Bayesian statistics </h3>
More text to come
<h3 id="___sec5">Part d): Studying the Ising model or the VMC results with Neural networks </h3>
<h3 id="___sec6">Part e): Studying the Ising model or the VMC results with Neural networks </h3>
More text to come
<h2 id="___sec6">Background literature </h2>
<h2 id="___sec7">Background literature </h2>
<p>
If you wish to read more about the Ising model and statistical physics here are three suggestions.
@@ -160,7 +184,7 @@ If you wish to read more about the Ising model and statistical physics here are
<li> <a href="https://global.oup.com/academic/product/monte-carlo-methods-in-statistical-physics-9780198517979?cc=no&lang=en&" target="_blank">M. E. J. Newman and T. Barkema</a>, <em>Monte Carlo Methods in Statistical Physics</em>, Oxford, see chapters 3 and 4.</li>
</ul>
<h2 id="___sec7">Introduction to numerical projects </h2>
<h2 id="___sec8">Introduction to numerical projects </h2>
<p>
Here follows a brief recipe and recommendation on how to write a report for each
Binary file not shown.
+27 -11
View File
@@ -159,7 +159,7 @@ Fall semester 2017
\subsection{Using results from Monte Carlo models for machine learning}
\paragraph{Introduction.}
The aim of this project is to use an already developed Monte Carlo program (either the ising Model or a variational Monte Carlo code) to produce, in case of the Ising model, the energy as function of temperature. For the variational Monte carlo calculation of interacting electrons in an oscilaltor trap, the data are represented by the ground state energies as functions of the variational parameters.
The aim of this project is to use an already developed Monte Carlo program (either the ising Model or a variational Monte Carlo code) to produce, in case of the \href{{https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/IsingModel}}{Ising model}, the energy as function of temperature. For the \href{{https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/VMC2Electrons/}}{variational Monte Carlo calculation} of interacting electrons in an oscilaltor trap, the data are represented by the ground state energies as functions of the variational parameters.
In its simplest form
the energy of the Ising model is expressed as, without an externally applied magnetic field,
@@ -172,23 +172,39 @@ constant expressing the strength of the interaction between
neighboring spins. The symbol $<kl>$ indicates that we sum over
nearest neighbors only. We will assume that we have a ferromagnetic
ordering, viz $J> 0$. We will use periodic boundary conditions and
the Metropolis algorithm only. Alternatively we can use the supplied variational Monte Carlo program which solves Schroedinger's equation for two interacting electrons in a harmonic oscillator trap. Both codes can be found at the webpage of the course under programs.
the Metropolis algorithm only. Alternatively we can use the supplied variational Monte Carlo program which solves Schroedinger's equation for two interacting electrons in a harmonic oscillator trap. Both codes can be found at the webpage of the \href{{https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/}}{course under programs}.
\paragraph{Part a): Producing the data.}
$\langle E\rangle$ and $\langle \vert M\vert \rangle$, the specific heat
$C_V$ and the susceptibility $\chi$ as functions of $T$ for $L=40$,
$L=60$, $L=100$ and $L=140$ for $T\in [2.0,2.3]$ with a step in
temperature $\Delta T=0.05$ or smaller. You may find it convenient narrow the domain for $T$.
If we opt for the Ising model code, we need to generate for every span over the lattice and output of the total energy and the magnetic moment (if we wish to study this quantity as well), that is compute and write to file as function of temperature
$\langle E\rangle$ and $\langle \vert M\vert \rangle$.
We will use a fixed lattice siste of $L\times L = 40 \times 40$. Make sure the calculations have been equilibrated and compute these expectation values for
for $T\in [1.0,3.0]$ with a step in
temperature $\Delta T=0.1$ or smaller. This are the data you will use to estimate the standard deviation in the next part of the project.
You should keep a file for the different temperatures as you will need to compute the standard deviation for each temperature.
Plot $\langle E\rangle$,
$\langle \vert M\vert\rangle$, $C_V$ and $\chi$ as functions of $T$.
\paragraph{Part b): Fitting the data using regression analysis and other methods.}
Alternatively you can run the variational Monte Carlo program for two interacting electrons confined to move in a harmonic oscillator trap. Here you will produce the variational expectaction value of the energy as a function of the variational parameters $\alpha$ and $\beta$. You could single out only a set of such parameters after you have found the minimum energy.
These two cases form then our training data which we will use for our estimates of the standard deviation.
\paragraph{Part b): Estimating the standard deviation.}
This part deals with widely used resampling methods to find the standard deviation on our data sets. The methods we can use are the Blocking method, the Bootstrap method and the Jackknife method. The latter two are examples of so-called resampling methods. \href{{https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/Sampling}}{The functions provided under the program folder} encode all three methods. The typical situation is to generate data using a C++ or Fortan code, as in part a) above. These data are then used by a post-analysis program in order to perform a statistical analysis.
In case of the Ising model, the final product will be a table of the expectation values of the energy (or the magnetic moment) as function of temperature and with a proper standard deviation. These data will then enter our analysis in parts c-e). We will call these data the training data.
If you opt for the variational Monte Carlo program, you need to make a table of the ground state energy as function of various variational parameters (you can limit yourself to $\alpha$ only) with proper standard deviation estimations.
Your task here is thus to use the data from part a) and generate the standard deviation using one (or more) of the methods discussed above. In general, the Bootstrap method is the most widely used one.
These data will then be used in our next step, where we will try to obtain a functional approximation to our data sets.
\paragraph{Part c): Fitting the data using regression analysis and other methods.}
More text to come
\paragraph{Part c): Introducing Bayesian statistics.}
\paragraph{Part d): Introducing Bayesian statistics.}
More text to come
\paragraph{Part d): Studying the Ising model or the VMC results with Neural networks.}
\paragraph{Part e): Studying the Ising model or the VMC results with Neural networks.}
More text to come
\subsection{Background literature}
Binary file not shown.
+27 -11
View File
@@ -133,7 +133,7 @@ Fall semester 2017
\subsection*{Using results from Monte Carlo models for machine learning}
\paragraph{Introduction.}
The aim of this project is to use an already developed Monte Carlo program (either the ising Model or a variational Monte Carlo code) to produce, in case of the Ising model, the energy as function of temperature. For the variational Monte carlo calculation of interacting electrons in an oscilaltor trap, the data are represented by the ground state energies as functions of the variational parameters.
The aim of this project is to use an already developed Monte Carlo program (either the ising Model or a variational Monte Carlo code) to produce, in case of the \href{{https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/IsingModel}}{Ising model}, the energy as function of temperature. For the \href{{https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/VMC2Electrons/}}{variational Monte Carlo calculation} of interacting electrons in an oscilaltor trap, the data are represented by the ground state energies as functions of the variational parameters.
In its simplest form
the energy of the Ising model is expressed as, without an externally applied magnetic field,
@@ -146,23 +146,39 @@ constant expressing the strength of the interaction between
neighboring spins. The symbol $<kl>$ indicates that we sum over
nearest neighbors only. We will assume that we have a ferromagnetic
ordering, viz $J> 0$. We will use periodic boundary conditions and
the Metropolis algorithm only. Alternatively we can use the supplied variational Monte Carlo program which solves Schroedinger's equation for two interacting electrons in a harmonic oscillator trap. Both codes can be found at the webpage of the course under programs.
the Metropolis algorithm only. Alternatively we can use the supplied variational Monte Carlo program which solves Schroedinger's equation for two interacting electrons in a harmonic oscillator trap. Both codes can be found at the webpage of the \href{{https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/}}{course under programs}.
\paragraph{Part a): Producing the data.}
$\langle E\rangle$ and $\langle \vert M\vert \rangle$, the specific heat
$C_V$ and the susceptibility $\chi$ as functions of $T$ for $L=40$,
$L=60$, $L=100$ and $L=140$ for $T\in [2.0,2.3]$ with a step in
temperature $\Delta T=0.05$ or smaller. You may find it convenient narrow the domain for $T$.
If we opt for the Ising model code, we need to generate for every span over the lattice and output of the total energy and the magnetic moment (if we wish to study this quantity as well), that is compute and write to file as function of temperature
$\langle E\rangle$ and $\langle \vert M\vert \rangle$.
We will use a fixed lattice siste of $L\times L = 40 \times 40$. Make sure the calculations have been equilibrated and compute these expectation values for
for $T\in [1.0,3.0]$ with a step in
temperature $\Delta T=0.1$ or smaller. This are the data you will use to estimate the standard deviation in the next part of the project.
You should keep a file for the different temperatures as you will need to compute the standard deviation for each temperature.
Plot $\langle E\rangle$,
$\langle \vert M\vert\rangle$, $C_V$ and $\chi$ as functions of $T$.
\paragraph{Part b): Fitting the data using regression analysis and other methods.}
Alternatively you can run the variational Monte Carlo program for two interacting electrons confined to move in a harmonic oscillator trap. Here you will produce the variational expectaction value of the energy as a function of the variational parameters $\alpha$ and $\beta$. You could single out only a set of such parameters after you have found the minimum energy.
These two cases form then our training data which we will use for our estimates of the standard deviation.
\paragraph{Part b): Estimating the standard deviation.}
This part deals with widely used resampling methods to find the standard deviation on our data sets. The methods we can use are the Blocking method, the Bootstrap method and the Jackknife method. The latter two are examples of so-called resampling methods. \href{{https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/Sampling}}{The functions provided under the program folder} encode all three methods. The typical situation is to generate data using a C++ or Fortan code, as in part a) above. These data are then used by a post-analysis program in order to perform a statistical analysis.
In case of the Ising model, the final product will be a table of the expectation values of the energy (or the magnetic moment) as function of temperature and with a proper standard deviation. These data will then enter our analysis in parts c-e). We will call these data the training data.
If you opt for the variational Monte Carlo program, you need to make a table of the ground state energy as function of various variational parameters (you can limit yourself to $\alpha$ only) with proper standard deviation estimations.
Your task here is thus to use the data from part a) and generate the standard deviation using one (or more) of the methods discussed above. In general, the Bootstrap method is the most widely used one.
These data will then be used in our next step, where we will try to obtain a functional approximation to our data sets.
\paragraph{Part c): Fitting the data using regression analysis and other methods.}
More text to come
\paragraph{Part c): Introducing Bayesian statistics.}
\paragraph{Part d): Introducing Bayesian statistics.}
More text to come
\paragraph{Part d): Studying the Ising model or the VMC results with Neural networks.}
\paragraph{Part e): Studying the Ising model or the VMC results with Neural networks.}
More text to come
\subsection*{Background literature}
@@ -1,250 +0,0 @@
<!--
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="Project on Machine Learning">
<title>Project on Machine Learning</title>
<!-- Bootstrap style: bootstrap -->
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="http://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': [('Using results from Monte Carlo models for machine learning',
2,
None,
'___sec0'),
('Introduction', 3, None, '___sec1'),
('Part a): Producing the data', 3, None, '___sec2'),
('Part b): Fitting the data using regression analysis and other methods',
3,
None,
'___sec3'),
('Part c): Introducing Bayesian statistics',
3,
None,
'___sec4'),
('Part d): Studying the Ising model or the VMC results with Neural networks',
3,
None,
'___sec5'),
('Background literature', 2, None, '___sec6'),
('Introduction to numerical projects', 2, None, '___sec7')]}
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"
src="http://cdn.mathjax.org/mathjax/latest/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="Project-bs.html">Project on Machine Learning</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="#___sec0" style="font-size: 80%;"><b>Using results from Monte Carlo models for machine learning</b></a></li>
<!-- navigation toc: --> <li><a href="#___sec1" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Introduction</a></li>
<!-- navigation toc: --> <li><a href="#___sec2" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Part a): Producing the data</a></li>
<!-- navigation toc: --> <li><a href="#___sec3" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Part b): Fitting the data using regression analysis and other methods</a></li>
<!-- navigation toc: --> <li><a href="#___sec4" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Part c): Introducing Bayesian statistics</a></li>
<!-- navigation toc: --> <li><a href="#___sec5" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Part d): Studying the Ising model or the VMC results with Neural networks</a></li>
<!-- navigation toc: --> <li><a href="#___sec6" style="font-size: 80%;"><b>Background literature</b></a></li>
<!-- navigation toc: --> <li><a href="#___sec7" style="font-size: 80%;"><b>Introduction to numerical projects</b></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="part0000"></a>
<!-- ------------------- main content ---------------------- -->
<div class="jumbotron">
<center><h1>Project on Machine Learning</h1></center> <!-- document title -->
<p>
<!-- author(s): <a href="http://www.uio.no/studier/emner/matnat/fys/FYS3155/index-eng.html" target="_self">Data Analysis and Machine Learning FYS-MAT3155/FYS4155</a> -->
<center>
<b><a href="http://www.uio.no/studier/emner/matnat/fys/FYS3155/index-eng.html" target="_self">Data Analysis and Machine Learning FYS-MAT3155/FYS4155</a></b>
</center>
<p>
<!-- institution -->
<center><b>Department of Physics, University of Oslo, Norway</b></center>
<br>
<p>
<center><h4>Fall semester 2017</h4></center> <!-- date -->
<br>
<p>
</div> <!-- end jumbotron -->
<h2 id="___sec0" class="anchor">Using results from Monte Carlo models for machine learning </h2>
<h3 id="___sec1" class="anchor">Introduction </h3>
<p>
The aim of this project is to use an already developed Monte Carlo program (either the ising Model or a variational Monte Carlo code) to produce, in case of the Ising model, the energy as function of temperature. For the variational Monte carlo calculation of interacting electrons in an oscilaltor trap, the data are represented by the ground state energies as functions of the variational parameters.
<p>
In its simplest form
the energy of the Ising model is expressed as, without an externally applied magnetic field,
$$
E=-J\sum_{< kl >}^{N}s_ks_l
$$
with
\( s_k=\pm 1 \). The quantity \( N \) represents the total number of spins and \( J \) is a coupling
constant expressing the strength of the interaction between
neighboring spins. The symbol \( < kl> \) indicates that we sum over
nearest neighbors only. We will assume that we have a ferromagnetic
ordering, viz \( J> 0 \). We will use periodic boundary conditions and
the Metropolis algorithm only. Alternatively we can use the supplied variational Monte Carlo program which solves Schroedinger's equation for two interacting electrons in a harmonic oscillator trap. Both codes can be found at the webpage of the course under programs.
<h3 id="___sec2" class="anchor">Part a): Producing the data </h3>
<p>
\( \langle E\rangle \) and \( \langle \vert M\vert \rangle \), the specific heat
\( C_V \) and the susceptibility \( \chi \) as functions of \( T \) for \( L=40 \),
\( L=60 \), \( L=100 \) and \( L=140 \) for \( T\in [2.0,2.3] \) with a step in
temperature \( \Delta T=0.05 \) or smaller. You may find it convenient narrow the domain for \( T \).
<p>
Plot \( \langle E\rangle \),
\( \langle \vert M\vert\rangle \), \( C_V \) and \( \chi \) as functions of \( T \).
<h3 id="___sec3" class="anchor">Part b): Fitting the data using regression analysis and other methods </h3>
<p>
More text to come
<h3 id="___sec4" class="anchor">Part c): Introducing Bayesian statistics </h3>
More text to come
<h3 id="___sec5" class="anchor">Part d): Studying the Ising model or the VMC results with Neural networks </h3>
More text to come
<h2 id="___sec6" class="anchor">Background literature </h2>
<p>
If you wish to read more about the Ising model and statistical physics here are three suggestions.
<ul>
<li> <a href="http://www.worldscientific.com/worldscibooks/10.1142/5660" target="_self">M. Plischke and B. Bergersen</a>, <em>Equilibrium Statistical Physics</em>, World Scientific, see chapters 5 and 6.</li>
<li> <a href="http://www.cambridge.org/no/academic/subjects/physics/computational-science-and-modelling/guide-monte-carlo-simulations-statistical-physics-4th-edition?format=HB" target="_self">D. P. Landau and K. Binder</a>, <em>A Guide to Monte Carlo Simulations in Statistical Physics</em>, Cambridge, see chapters 2,3 and 4.</li>
<li> <a href="https://global.oup.com/academic/product/monte-carlo-methods-in-statistical-physics-9780198517979?cc=no&lang=en&" target="_self">M. E. J. Newman and T. Barkema</a>, <em>Monte Carlo Methods in Statistical Physics</em>, Oxford, see chapters 3 and 4.</li>
</ul>
<h2 id="___sec7" class="anchor">Introduction to numerical projects </h2>
<p>
Here follows a brief recipe and recommendation on how to write a report for each
project.
<ul>
<li> Give a short description of the nature of the problem and the eventual numerical methods you have used.</li>
<li> Describe the algorithm you have used and/or developed. Here you may find it convenient to use pseudocoding. In many cases you can describe the algorithm in the program itself.</li>
<li> Include the source code of your program. Comment your program properly.</li>
<li> If possible, try to find analytic solutions, or known limits in order to test your program when developing the code.</li>
<li> Include your results either in figure form or in a table. Remember to label your results. All tables and figures should have relevant captions and labels on the axes.</li>
<li> Try to evaluate the reliabilty and numerical stability/precision of your results. If possible, include a qualitative and/or quantitative discussion of the numerical stability, eventual loss of precision etc.</li>
<li> Try to give an interpretation of you results in your answers to the problems.</li>
<li> Critique: if possible include your comments and reflections about the exercise, whether you felt you learnt something, ideas for improvements and other thoughts you've made when solving the exercise. We wish to keep this course at the interactive level and your comments can help us improve it.</li>
<li> Try to establish a practice where you log your work at the computerlab. You may find such a logbook very handy at later stages in your work, especially when you don't properly remember what a previous test version of your program did. Here you could also record the time spent on solving the exercise, various algorithms you may have tested or other topics which you feel worthy of mentioning.</li>
</ul>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li class="active"><a href="._Project-bs000.html">1</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://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 --> &copy; 1999-2017, "Data Analysis and Machine Learning FYS-MAT3155/FYS4155":"http://www.uio.no/studier/emner/matnat/fys/FYS3155/index-eng.html". Released under CC Attribution-NonCommercial 4.0 license
</center>
</body>
</html>
+26 -11
View File
@@ -7,7 +7,7 @@ DATE: Fall semester 2017
=== Introduction ===
The aim of this project is to use an already developed Monte Carlo program (either the ising Model or a variational Monte Carlo code) to produce, in case of the Ising model, the energy as function of temperature. For the variational Monte carlo calculation of interacting electrons in an oscilaltor trap, the data are represented by the ground state energies as functions of the variational parameters.
The aim of this project is to use an already developed Monte Carlo program (either the ising Model or a variational Monte Carlo code) to produce, in case of the "Ising model":"https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/IsingModel", the energy as function of temperature. For the "variational Monte Carlo calculation":"https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/VMC2Electrons/" of interacting electrons in an oscilaltor trap, the data are represented by the ground state energies as functions of the variational parameters.
In its simplest form
the energy of the Ising model is expressed as, without an externally applied magnetic field,
@@ -22,26 +22,41 @@ constant expressing the strength of the interaction between
neighboring spins. The symbol $<kl>$ indicates that we sum over
nearest neighbors only. We will assume that we have a ferromagnetic
ordering, viz $J> 0$. We will use periodic boundary conditions and
the Metropolis algorithm only. Alternatively we can use the supplied variational Monte Carlo program which solves Schroedinger's equation for two interacting electrons in a harmonic oscillator trap. Both codes can be found at the webpage of the course under programs.
the Metropolis algorithm only. Alternatively we can use the supplied variational Monte Carlo program which solves Schroedinger's equation for two interacting electrons in a harmonic oscillator trap. Both codes can be found at the webpage of the "course under programs":"https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/".
=== Part a): Producing the data ===
If we opt for the Ising model code, we need to generate for every span over the lattice and output of the total energy and the magnetic moment (if we wish to study this quantity as well), that is compute and write to file as function of temperature
$\langle E\rangle$ and $\langle \vert M\vert \rangle$.
We will use a fixed lattice siste of $L\times L = 40 \times 40$. Make sure the calculations have been equilibrated and compute these expectation values for
for $T\in [1.0,3.0]$ with a step in
temperature $\Delta T=0.1$ or smaller. This are the data you will use to estimate the standard deviation in the next part of the project.
You should keep a file for the different temperatures as you will need to compute the standard deviation for each temperature.
$\langle E\rangle$ and $\langle \vert M\vert \rangle$, the specific heat
$C_V$ and the susceptibility $\chi$ as functions of $T$ for $L=40$,
$L=60$, $L=100$ and $L=140$ for $T\in [2.0,2.3]$ with a step in
temperature $\Delta T=0.05$ or smaller. You may find it convenient narrow the domain for $T$.
Plot $\langle E\rangle$,
$\langle \vert M\vert\rangle$, $C_V$ and $\chi$ as functions of $T$.
Alternatively you can run the variational Monte Carlo program for two interacting electrons confined to move in a harmonic oscillator trap. Here you will produce the variational expectaction value of the energy as a function of the variational parameters $\alpha$ and $\beta$. You could single out only a set of such parameters after you have found the minimum energy.
=== Part b): Fitting the data using regression analysis and other methods ===
These two cases form then our training data which we will use for our estimates of the standard deviation.
=== Part b): Estimating the standard deviation ===
This part deals with widely used resampling methods to find the standard deviation on our data sets. The methods we can use are the Blocking method, the Bootstrap method and the Jackknife method. The latter two are examples of so-called resampling methods. "The functions provided under the program folder":"https://github.com/CompPhysics/MachineLearning/tree/master/doc/Programs/Sampling" encode all three methods. The typical situation is to generate data using a C++ or Fortan code, as in part a) above. These data are then used by a post-analysis program in order to perform a statistical analysis.
In case of the Ising model, the final product will be a table of the expectation values of the energy (or the magnetic moment) as function of temperature and with a proper standard deviation. These data will then enter our analysis in parts c-e). We will call these data the training data.
If you opt for the variational Monte Carlo program, you need to make a table of the ground state energy as function of various variational parameters (you can limit yourself to $\alpha$ only) with proper standard deviation estimations.
Your task here is thus to use the data from part a) and generate the standard deviation using one (or more) of the methods discussed above. In general, the Bootstrap method is the most widely used one.
These data will then be used in our next step, where we will try to obtain a functional approximation to our data sets.
=== Part c): Fitting the data using regression analysis and other methods ===
More text to come
=== Part c): Introducing Bayesian statistics ===
=== Part d): Introducing Bayesian statistics ===
More text to come
=== Part d): Studying the Ising model or the VMC results with Neural networks ===
=== Part e): Studying the Ising model or the VMC results with Neural networks ===
More text to come
===== Background literature =====
-193
View File
@@ -1,193 +0,0 @@
<!--
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="Project on Machine Learning">
<title>Project on Machine Learning</title>
<style type="text/css">
/* bloodish style */
body {
font-family: Helvetica, Verdana, Arial, Sans-serif;
color: #404040;
background: #ffffff;
}
h1 { font-size: 1.8em; color: #8A0808; }
h2 { font-size: 1.6em; color: #8A0808; }
h3 { font-size: 1.4em; color: #8A0808; }
h4 { color: #8A0808; }
a { color: #8A0808; text-decoration:none; }
tt { font-family: "Courier New", Courier; }
/* pre style removed because it will interfer with pygments */
p { text-indent: 0px; }
hr { border: 0; width: 80%; border-bottom: 1px solid #aaa}
p.caption { width: 80%; font-style: normal; text-align: left; }
hr.figure { border: 0; width: 80%; border-bottom: 1px solid #aaa}
div { text-align: justify; text-justify: inter-word; }
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Using results from Monte Carlo models for machine learning',
2,
None,
'___sec0'),
('Introduction', 3, None, '___sec1'),
('Part a): Producing the data', 3, None, '___sec2'),
('Part b): Fitting the data using regression analysis and other methods',
3,
None,
'___sec3'),
('Part c): Introducing Bayesian statistics',
3,
None,
'___sec4'),
('Part d): Studying the Ising model or the VMC results with Neural networks',
3,
None,
'___sec5'),
('Background literature', 2, None, '___sec6'),
('Introduction to numerical projects', 2, None, '___sec7')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "AMS" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- ------------------- main content ---------------------- -->
<center><h1>Project on Machine Learning</h1></center> <!-- document title -->
<p>
<!-- author(s): <a href="http://www.uio.no/studier/emner/matnat/fys/FYS3155/index-eng.html" target="_blank">Data Analysis and Machine Learning FYS-MAT3155/FYS4155</a> -->
<center>
<b><a href="http://www.uio.no/studier/emner/matnat/fys/FYS3155/index-eng.html" target="_blank">Data Analysis and Machine Learning FYS-MAT3155/FYS4155</a></b>
</center>
<p>
<!-- institution -->
<center><b>Department of Physics, University of Oslo, Norway</b></center>
<br>
<p>
<center><h4>Fall semester 2017</h4></center> <!-- date -->
<br>
<h2 id="___sec0">Using results from Monte Carlo models for machine learning </h2>
<h3 id="___sec1">Introduction </h3>
<p>
The aim of this project is to use an already developed Monte Carlo program (either the ising Model or a variational Monte Carlo code) to produce, in case of the Ising model, the energy as function of temperature. For the variational Monte carlo calculation of interacting electrons in an oscilaltor trap, the data are represented by the ground state energies as functions of the variational parameters.
<p>
In its simplest form
the energy of the Ising model is expressed as, without an externally applied magnetic field,
$$
E=-J\sum_{< kl >}^{N}s_ks_l
$$
with
\( s_k=\pm 1 \). The quantity \( N \) represents the total number of spins and \( J \) is a coupling
constant expressing the strength of the interaction between
neighboring spins. The symbol \( < kl> \) indicates that we sum over
nearest neighbors only. We will assume that we have a ferromagnetic
ordering, viz \( J> 0 \). We will use periodic boundary conditions and
the Metropolis algorithm only. Alternatively we can use the supplied variational Monte Carlo program which solves Schroedinger's equation for two interacting electrons in a harmonic oscillator trap. Both codes can be found at the webpage of the course under programs.
<h3 id="___sec2">Part a): Producing the data </h3>
<p>
\( \langle E\rangle \) and \( \langle \vert M\vert \rangle \), the specific heat
\( C_V \) and the susceptibility \( \chi \) as functions of \( T \) for \( L=40 \),
\( L=60 \), \( L=100 \) and \( L=140 \) for \( T\in [2.0,2.3] \) with a step in
temperature \( \Delta T=0.05 \) or smaller. You may find it convenient narrow the domain for \( T \).
<p>
Plot \( \langle E\rangle \),
\( \langle \vert M\vert\rangle \), \( C_V \) and \( \chi \) as functions of \( T \).
<h3 id="___sec3">Part b): Fitting the data using regression analysis and other methods </h3>
<p>
More text to come
<h3 id="___sec4">Part c): Introducing Bayesian statistics </h3>
More text to come
<h3 id="___sec5">Part d): Studying the Ising model or the VMC results with Neural networks </h3>
More text to come
<h2 id="___sec6">Background literature </h2>
<p>
If you wish to read more about the Ising model and statistical physics here are three suggestions.
<ul>
<li> <a href="http://www.worldscientific.com/worldscibooks/10.1142/5660" target="_blank">M. Plischke and B. Bergersen</a>, <em>Equilibrium Statistical Physics</em>, World Scientific, see chapters 5 and 6.</li>
<li> <a href="http://www.cambridge.org/no/academic/subjects/physics/computational-science-and-modelling/guide-monte-carlo-simulations-statistical-physics-4th-edition?format=HB" target="_blank">D. P. Landau and K. Binder</a>, <em>A Guide to Monte Carlo Simulations in Statistical Physics</em>, Cambridge, see chapters 2,3 and 4.</li>
<li> <a href="https://global.oup.com/academic/product/monte-carlo-methods-in-statistical-physics-9780198517979?cc=no&lang=en&" target="_blank">M. E. J. Newman and T. Barkema</a>, <em>Monte Carlo Methods in Statistical Physics</em>, Oxford, see chapters 3 and 4.</li>
</ul>
<h2 id="___sec7">Introduction to numerical projects </h2>
<p>
Here follows a brief recipe and recommendation on how to write a report for each
project.
<ul>
<li> Give a short description of the nature of the problem and the eventual numerical methods you have used.</li>
<li> Describe the algorithm you have used and/or developed. Here you may find it convenient to use pseudocoding. In many cases you can describe the algorithm in the program itself.</li>
<li> Include the source code of your program. Comment your program properly.</li>
<li> If possible, try to find analytic solutions, or known limits in order to test your program when developing the code.</li>
<li> Include your results either in figure form or in a table. Remember to label your results. All tables and figures should have relevant captions and labels on the axes.</li>
<li> Try to evaluate the reliabilty and numerical stability/precision of your results. If possible, include a qualitative and/or quantitative discussion of the numerical stability, eventual loss of precision etc.</li>
<li> Try to give an interpretation of you results in your answers to the problems.</li>
<li> Critique: if possible include your comments and reflections about the exercise, whether you felt you learnt something, ideas for improvements and other thoughts you've made when solving the exercise. We wish to keep this course at the interactive level and your comments can help us improve it.</li>
<li> Try to establish a practice where you log your work at the computerlab. You may find such a logbook very handy at later stages in your work, especially when you don't properly remember what a previous test version of your program did. Here you could also record the time spent on solving the exercise, various algorithms you may have tested or other topics which you feel worthy of mentioning.</li>
</ul>
<!-- ------------------- end of main content --------------- -->
<center style="font-size:80%">
<!-- copyright --> &copy; 1999-2017, "Data Analysis and Machine Learning FYS-MAT3155/FYS4155":"http://www.uio.no/studier/emner/matnat/fys/FYS3155/index-eng.html". Released under CC Attribution-NonCommercial 4.0 license
</center>
</body>
</html>
-104
View File
@@ -1,104 +0,0 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<!-- dom:TITLE: Project on Machine Learning -->\n",
"# Project on Machine Learning\n",
"<!-- dom:AUTHOR: [Data Analysis and Machine Learning FYS-MAT3155/FYS4155](http://www.uio.no/studier/emner/matnat/fys/FYS3155/index-eng.html) at Department of Physics, University of Oslo, Norway -->\n",
"<!-- Author: --> **[Data Analysis and Machine Learning FYS-MAT3155/FYS4155](http://www.uio.no/studier/emner/matnat/fys/FYS3155/index-eng.html)**, Department of Physics, University of Oslo, Norway\n",
"\n",
"Date: **Fall semester 2017**\n",
"\n",
"## Using results from Monte Carlo models for machine learning\n",
"\n",
"### Introduction\n",
"\n",
"The aim of this project is to use an already developed Monte Carlo program (either the ising Model or a variational Monte Carlo code) to produce, in case of the Ising model, the energy as function of temperature. For the variational Monte carlo calculation of interacting electrons in an oscilaltor trap, the data are represented by the ground state energies as functions of the variational parameters.\n",
"\n",
"In its simplest form\n",
"the energy of the Ising model is expressed as, without an externally applied magnetic field,"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$$\n",
"E=-J\\sum_{< kl >}^{N}s_ks_l\n",
"$$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"with\n",
"$s_k=\\pm 1$. The quantity $N$ represents the total number of spins and $J$ is a coupling\n",
"constant expressing the strength of the interaction between\n",
"neighboring spins. The symbol $<kl>$ indicates that we sum over\n",
"nearest neighbors only. We will assume that we have a ferromagnetic\n",
"ordering, viz $J> 0$. We will use periodic boundary conditions and\n",
"the Metropolis algorithm only. Alternatively we can use the supplied variational Monte Carlo program which solves Schroedinger's equation for two interacting electrons in a harmonic oscillator trap. Both codes can be found at the webpage of the course under programs. \n",
"\n",
"### Part a): Producing the data\n",
"\n",
"$\\langle E\\rangle$ and $\\langle \\vert M\\vert \\rangle$, the specific heat\n",
"$C_V$ and the susceptibility $\\chi$ as functions of $T$ for $L=40$,\n",
"$L=60$, $L=100$ and $L=140$ for $T\\in [2.0,2.3]$ with a step in\n",
"temperature $\\Delta T=0.05$ or smaller. You may find it convenient narrow the domain for $T$. \n",
"\n",
"Plot $\\langle E\\rangle$,\n",
"$\\langle \\vert M\\vert\\rangle$, $C_V$ and $\\chi$ as functions of $T$.\n",
"\n",
"### Part b): Fitting the data using regression analysis and other methods\n",
"\n",
"More text to come\n",
"### Part c): Introducing Bayesian statistics\n",
"\n",
"More text to come\n",
"\n",
"### Part d): Studying the Ising model or the VMC results with Neural networks\n",
"\n",
"More text to come\n",
"\n",
"## Background literature\n",
"\n",
"If you wish to read more about the Ising model and statistical physics here are three suggestions.\n",
"\n",
" * [M. Plischke and B. Bergersen](http://www.worldscientific.com/worldscibooks/10.1142/5660), *Equilibrium Statistical Physics*, World Scientific, see chapters 5 and 6.\n",
"\n",
" * [D. P. Landau and K. Binder](http://www.cambridge.org/no/academic/subjects/physics/computational-science-and-modelling/guide-monte-carlo-simulations-statistical-physics-4th-edition?format=HB), *A Guide to Monte Carlo Simulations in Statistical Physics*, Cambridge, see chapters 2,3 and 4.\n",
"\n",
" * [M. E. J. Newman and T. Barkema](https://global.oup.com/academic/product/monte-carlo-methods-in-statistical-physics-9780198517979?cc=no&lang=en&), *Monte Carlo Methods in Statistical Physics*, Oxford, see chapters 3 and 4.\n",
"\n",
"## Introduction to numerical projects\n",
"\n",
"Here follows a brief recipe and recommendation on how to write a report for each\n",
"project.\n",
"\n",
" * Give a short description of the nature of the problem and the eventual numerical methods you have used.\n",
"\n",
" * Describe the algorithm you have used and/or developed. Here you may find it convenient to use pseudocoding. In many cases you can describe the algorithm in the program itself.\n",
"\n",
" * Include the source code of your program. Comment your program properly.\n",
"\n",
" * If possible, try to find analytic solutions, or known limits in order to test your program when developing the code.\n",
"\n",
" * Include your results either in figure form or in a table. Remember to label your results. All tables and figures should have relevant captions and labels on the axes.\n",
"\n",
" * Try to evaluate the reliabilty and numerical stability/precision of your results. If possible, include a qualitative and/or quantitative discussion of the numerical stability, eventual loss of precision etc.\n",
"\n",
" * Try to give an interpretation of you results in your answers to the problems.\n",
"\n",
" * Critique: if possible include your comments and reflections about the exercise, whether you felt you learnt something, ideas for improvements and other thoughts you've made when solving the exercise. We wish to keep this course at the interactive level and your comments can help us improve it.\n",
"\n",
" * Try to establish a practice where you log your work at the computerlab. You may find such a logbook very handy at later stages in your work, especially when you don't properly remember what a previous test version of your program did. Here you could also record the time spent on solving the exercise, various algorithms you may have tested or other topics which you feel worthy of mentioning."
]
}
],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 1
}
-239
View File
@@ -1,239 +0,0 @@
%%
%% Automatically generated file from DocOnce source
%% (https://github.com/hplgit/doconce/)
%%
%%
% #ifdef PTEX2TEX_EXPLANATION
%%
%% The file follows the ptex2tex extended LaTeX format, see
%% ptex2tex: http://code.google.com/p/ptex2tex/
%%
%% Run
%% ptex2tex myfile
%% or
%% doconce ptex2tex myfile
%%
%% to turn myfile.p.tex into an ordinary LaTeX file myfile.tex.
%% (The ptex2tex program: http://code.google.com/p/ptex2tex)
%% Many preprocess options can be added to ptex2tex or doconce ptex2tex
%%
%% ptex2tex -DMINTED myfile
%% doconce ptex2tex myfile envir=minted
%%
%% ptex2tex will typeset code environments according to a global or local
%% .ptex2tex.cfg configure file. doconce ptex2tex will typeset code
%% according to options on the command line (just type doconce ptex2tex to
%% see examples). If doconce ptex2tex has envir=minted, it enables the
%% minted style without needing -DMINTED.
% #endif
% #define PREAMBLE
% #ifdef PREAMBLE
%-------------------- begin preamble ----------------------
\documentclass[%
oneside, % oneside: electronic viewing, twoside: printing
final, % draft: marks overfull hboxes, figures with paths
10pt]{article}
\listfiles % print all files needed to compile this document
\usepackage{relsize,makeidx,color,setspace,amsmath,amsfonts,amssymb}
\usepackage[table]{xcolor}
\usepackage{bm,ltablex,microtype}
\usepackage[pdftex]{graphicx}
\usepackage[T1]{fontenc}
%\usepackage[latin1]{inputenc}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage{lmodern} % Latin Modern fonts derived from Computer Modern
% Hyperlinks in PDF:
\definecolor{linkcolor}{rgb}{0,0,0.4}
\usepackage{hyperref}
\hypersetup{
breaklinks=true,
colorlinks=true,
linkcolor=linkcolor,
urlcolor=linkcolor,
citecolor=black,
filecolor=black,
%filecolor=blue,
pdfmenubar=true,
pdftoolbar=true,
bookmarksdepth=3 % Uncomment (and tweak) for PDF bookmarks with more levels than the TOC
}
%\hyperbaseurl{} % hyperlinks are relative to this root
\setcounter{tocdepth}{2} % levels in table of contents
% --- fancyhdr package for fancy headers ---
\usepackage{fancyhdr}
\fancyhf{} % sets both header and footer to nothing
\renewcommand{\headrulewidth}{0pt}
\fancyfoot[LE,RO]{\thepage}
% Ensure copyright on titlepage (article style) and chapter pages (book style)
\fancypagestyle{plain}{
\fancyhf{}
\fancyfoot[C]{{\footnotesize \copyright\ 1999-2017, "Data Analysis and Machine Learning FYS-MAT3155/FYS4155":"http://www.uio.no/studier/emner/matnat/fys/FYS3155/index-eng.html". Released under CC Attribution-NonCommercial 4.0 license}}
% \renewcommand{\footrulewidth}{0mm}
\renewcommand{\headrulewidth}{0mm}
}
% Ensure copyright on titlepages with \thispagestyle{empty}
\fancypagestyle{empty}{
\fancyhf{}
\fancyfoot[C]{{\footnotesize \copyright\ 1999-2017, "Data Analysis and Machine Learning FYS-MAT3155/FYS4155":"http://www.uio.no/studier/emner/matnat/fys/FYS3155/index-eng.html". Released under CC Attribution-NonCommercial 4.0 license}}
\renewcommand{\footrulewidth}{0mm}
\renewcommand{\headrulewidth}{0mm}
}
\pagestyle{fancy}
% prevent orhpans and widows
\clubpenalty = 10000
\widowpenalty = 10000
% --- end of standard preamble for documents ---
% insert custom LaTeX commands...
\raggedbottom
\makeindex
\usepackage[totoc]{idxlayout} % for index in the toc
\usepackage[nottoc]{tocbibind} % for references/bibliography in the toc
%-------------------- end preamble ----------------------
\begin{document}
% matching end for #ifdef PREAMBLE
% #endif
\newcommand{\exercisesection}[1]{\subsection*{#1}}
% ------------------- main content ----------------------
% ----------------- title -------------------------
\thispagestyle{empty}
\begin{center}
{\LARGE\bf
\begin{spacing}{1.25}
Project on Machine Learning
\end{spacing}
}
\end{center}
% ----------------- author(s) -------------------------
\begin{center}
{\bf \href{{http://www.uio.no/studier/emner/matnat/fys/FYS3155/index-eng.html}}{Data Analysis and Machine Learning FYS-MAT3155/FYS4155}}
\end{center}
\begin{center}
% List of all institutions:
\centerline{{\small Department of Physics, University of Oslo, Norway}}
\end{center}
% ----------------- end author(s) -------------------------
% --- begin date ---
\begin{center}
Fall semester 2017
\end{center}
% --- end date ---
\vspace{1cm}
\subsection{Using results from Monte Carlo models for machine learning}
\paragraph{Introduction.}
The aim of this project is to use an already developed Monte Carlo program (either the ising Model or a variational Monte Carlo code) to produce, in case of the Ising model, the energy as function of temperature. For the variational Monte carlo calculation of interacting electrons in an oscilaltor trap, the data are represented by the ground state energies as functions of the variational parameters.
In its simplest form
the energy of the Ising model is expressed as, without an externally applied magnetic field,
\[
E=-J\sum_{< kl >}^{N}s_ks_l
\]
with
$s_k=\pm 1$. The quantity $N$ represents the total number of spins and $J$ is a coupling
constant expressing the strength of the interaction between
neighboring spins. The symbol $<kl>$ indicates that we sum over
nearest neighbors only. We will assume that we have a ferromagnetic
ordering, viz $J> 0$. We will use periodic boundary conditions and
the Metropolis algorithm only. Alternatively we can use the supplied variational Monte Carlo program which solves Schroedinger's equation for two interacting electrons in a harmonic oscillator trap. Both codes can be found at the webpage of the course under programs.
\paragraph{Part a): Producing the data.}
$\langle E\rangle$ and $\langle \vert M\vert \rangle$, the specific heat
$C_V$ and the susceptibility $\chi$ as functions of $T$ for $L=40$,
$L=60$, $L=100$ and $L=140$ for $T\in [2.0,2.3]$ with a step in
temperature $\Delta T=0.05$ or smaller. You may find it convenient narrow the domain for $T$.
Plot $\langle E\rangle$,
$\langle \vert M\vert\rangle$, $C_V$ and $\chi$ as functions of $T$.
\paragraph{Part b): Fitting the data using regression analysis and other methods.}
More text to come
\paragraph{Part c): Introducing Bayesian statistics.}
More text to come
\paragraph{Part d): Studying the Ising model or the VMC results with Neural networks.}
More text to come
\subsection{Background literature}
If you wish to read more about the Ising model and statistical physics here are three suggestions.
\begin{itemize}
\item \href{{http://www.worldscientific.com/worldscibooks/10.1142/5660}}{M. Plischke and B. Bergersen}, \emph{Equilibrium Statistical Physics}, World Scientific, see chapters 5 and 6.
\item \href{{http://www.cambridge.org/no/academic/subjects/physics/computational-science-and-modelling/guide-monte-carlo-simulations-statistical-physics-4th-edition?format=HB}}{D. P. Landau and K. Binder}, \emph{A Guide to Monte Carlo Simulations in Statistical Physics}, Cambridge, see chapters 2,3 and 4.
\item \href{{https://global.oup.com/academic/product/monte-carlo-methods-in-statistical-physics-9780198517979?cc=no&lang=en&}}{M. E. J. Newman and T. Barkema}, \emph{Monte Carlo Methods in Statistical Physics}, Oxford, see chapters 3 and 4.
\end{itemize}
\noindent
\subsection{Introduction to numerical projects}
Here follows a brief recipe and recommendation on how to write a report for each
project.
\begin{itemize}
\item Give a short description of the nature of the problem and the eventual numerical methods you have used.
\item Describe the algorithm you have used and/or developed. Here you may find it convenient to use pseudocoding. In many cases you can describe the algorithm in the program itself.
\item Include the source code of your program. Comment your program properly.
\item If possible, try to find analytic solutions, or known limits in order to test your program when developing the code.
\item Include your results either in figure form or in a table. Remember to label your results. All tables and figures should have relevant captions and labels on the axes.
\item Try to evaluate the reliabilty and numerical stability/precision of your results. If possible, include a qualitative and/or quantitative discussion of the numerical stability, eventual loss of precision etc.
\item Try to give an interpretation of you results in your answers to the problems.
\item Critique: if possible include your comments and reflections about the exercise, whether you felt you learnt something, ideas for improvements and other thoughts you've made when solving the exercise. We wish to keep this course at the interactive level and your comments can help us improve it.
\item Try to establish a practice where you log your work at the computerlab. You may find such a logbook very handy at later stages in your work, especially when you don't properly remember what a previous test version of your program did. Here you could also record the time spent on solving the exercise, various algorithms you may have tested or other topics which you feel worthy of mentioning.
\end{itemize}
\noindent
% ------------------- end of main content ---------------
% #ifdef PREAMBLE
\end{document}
% #endif
Binary file not shown.
-211
View File
@@ -1,211 +0,0 @@
%%
%% Automatically generated file from DocOnce source
%% (https://github.com/hplgit/doconce/)
%%
%%
%-------------------- begin preamble ----------------------
\documentclass[%
oneside, % oneside: electronic viewing, twoside: printing
final, % draft: marks overfull hboxes, figures with paths
10pt]{article}
\listfiles % print all files needed to compile this document
\usepackage{relsize,makeidx,color,setspace,amsmath,amsfonts,amssymb}
\usepackage[table]{xcolor}
\usepackage{bm,ltablex,microtype}
\usepackage[pdftex]{graphicx}
\usepackage[T1]{fontenc}
%\usepackage[latin1]{inputenc}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage{lmodern} % Latin Modern fonts derived from Computer Modern
% Hyperlinks in PDF:
\definecolor{linkcolor}{rgb}{0,0,0.4}
\usepackage{hyperref}
\hypersetup{
breaklinks=true,
colorlinks=true,
linkcolor=linkcolor,
urlcolor=linkcolor,
citecolor=black,
filecolor=black,
%filecolor=blue,
pdfmenubar=true,
pdftoolbar=true,
bookmarksdepth=3 % Uncomment (and tweak) for PDF bookmarks with more levels than the TOC
}
%\hyperbaseurl{} % hyperlinks are relative to this root
\setcounter{tocdepth}{2} % levels in table of contents
% --- fancyhdr package for fancy headers ---
\usepackage{fancyhdr}
\fancyhf{} % sets both header and footer to nothing
\renewcommand{\headrulewidth}{0pt}
\fancyfoot[LE,RO]{\thepage}
% Ensure copyright on titlepage (article style) and chapter pages (book style)
\fancypagestyle{plain}{
\fancyhf{}
\fancyfoot[C]{{\footnotesize \copyright\ 1999-2017, "Data Analysis and Machine Learning FYS-MAT3155/FYS4155":"http://www.uio.no/studier/emner/matnat/fys/FYS3155/index-eng.html". Released under CC Attribution-NonCommercial 4.0 license}}
% \renewcommand{\footrulewidth}{0mm}
\renewcommand{\headrulewidth}{0mm}
}
% Ensure copyright on titlepages with \thispagestyle{empty}
\fancypagestyle{empty}{
\fancyhf{}
\fancyfoot[C]{{\footnotesize \copyright\ 1999-2017, "Data Analysis and Machine Learning FYS-MAT3155/FYS4155":"http://www.uio.no/studier/emner/matnat/fys/FYS3155/index-eng.html". Released under CC Attribution-NonCommercial 4.0 license}}
\renewcommand{\footrulewidth}{0mm}
\renewcommand{\headrulewidth}{0mm}
}
\pagestyle{fancy}
% prevent orhpans and widows
\clubpenalty = 10000
\widowpenalty = 10000
% --- end of standard preamble for documents ---
% insert custom LaTeX commands...
\raggedbottom
\makeindex
\usepackage[totoc]{idxlayout} % for index in the toc
\usepackage[nottoc]{tocbibind} % for references/bibliography in the toc
%-------------------- end preamble ----------------------
\begin{document}
% matching end for #ifdef PREAMBLE
\newcommand{\exercisesection}[1]{\subsection*{#1}}
% ------------------- main content ----------------------
% ----------------- title -------------------------
\thispagestyle{empty}
\begin{center}
{\LARGE\bf
\begin{spacing}{1.25}
Project on Machine Learning
\end{spacing}
}
\end{center}
% ----------------- author(s) -------------------------
\begin{center}
{\bf \href{{http://www.uio.no/studier/emner/matnat/fys/FYS3155/index-eng.html}}{Data Analysis and Machine Learning FYS-MAT3155/FYS4155}}
\end{center}
\begin{center}
% List of all institutions:
\centerline{{\small Department of Physics, University of Oslo, Norway}}
\end{center}
% ----------------- end author(s) -------------------------
% --- begin date ---
\begin{center}
Fall semester 2017
\end{center}
% --- end date ---
\vspace{1cm}
\subsection*{Using results from Monte Carlo models for machine learning}
\paragraph{Introduction.}
The aim of this project is to use an already developed Monte Carlo program (either the ising Model or a variational Monte Carlo code) to produce, in case of the Ising model, the energy as function of temperature. For the variational Monte carlo calculation of interacting electrons in an oscilaltor trap, the data are represented by the ground state energies as functions of the variational parameters.
In its simplest form
the energy of the Ising model is expressed as, without an externally applied magnetic field,
\[
E=-J\sum_{< kl >}^{N}s_ks_l
\]
with
$s_k=\pm 1$. The quantity $N$ represents the total number of spins and $J$ is a coupling
constant expressing the strength of the interaction between
neighboring spins. The symbol $<kl>$ indicates that we sum over
nearest neighbors only. We will assume that we have a ferromagnetic
ordering, viz $J> 0$. We will use periodic boundary conditions and
the Metropolis algorithm only. Alternatively we can use the supplied variational Monte Carlo program which solves Schroedinger's equation for two interacting electrons in a harmonic oscillator trap. Both codes can be found at the webpage of the course under programs.
\paragraph{Part a): Producing the data.}
$\langle E\rangle$ and $\langle \vert M\vert \rangle$, the specific heat
$C_V$ and the susceptibility $\chi$ as functions of $T$ for $L=40$,
$L=60$, $L=100$ and $L=140$ for $T\in [2.0,2.3]$ with a step in
temperature $\Delta T=0.05$ or smaller. You may find it convenient narrow the domain for $T$.
Plot $\langle E\rangle$,
$\langle \vert M\vert\rangle$, $C_V$ and $\chi$ as functions of $T$.
\paragraph{Part b): Fitting the data using regression analysis and other methods.}
More text to come
\paragraph{Part c): Introducing Bayesian statistics.}
More text to come
\paragraph{Part d): Studying the Ising model or the VMC results with Neural networks.}
More text to come
\subsection*{Background literature}
If you wish to read more about the Ising model and statistical physics here are three suggestions.
\begin{itemize}
\item \href{{http://www.worldscientific.com/worldscibooks/10.1142/5660}}{M. Plischke and B. Bergersen}, \emph{Equilibrium Statistical Physics}, World Scientific, see chapters 5 and 6.
\item \href{{http://www.cambridge.org/no/academic/subjects/physics/computational-science-and-modelling/guide-monte-carlo-simulations-statistical-physics-4th-edition?format=HB}}{D. P. Landau and K. Binder}, \emph{A Guide to Monte Carlo Simulations in Statistical Physics}, Cambridge, see chapters 2,3 and 4.
\item \href{{https://global.oup.com/academic/product/monte-carlo-methods-in-statistical-physics-9780198517979?cc=no&lang=en&}}{M. E. J. Newman and T. Barkema}, \emph{Monte Carlo Methods in Statistical Physics}, Oxford, see chapters 3 and 4.
\end{itemize}
\noindent
\subsection*{Introduction to numerical projects}
Here follows a brief recipe and recommendation on how to write a report for each
project.
\begin{itemize}
\item Give a short description of the nature of the problem and the eventual numerical methods you have used.
\item Describe the algorithm you have used and/or developed. Here you may find it convenient to use pseudocoding. In many cases you can describe the algorithm in the program itself.
\item Include the source code of your program. Comment your program properly.
\item If possible, try to find analytic solutions, or known limits in order to test your program when developing the code.
\item Include your results either in figure form or in a table. Remember to label your results. All tables and figures should have relevant captions and labels on the axes.
\item Try to evaluate the reliabilty and numerical stability/precision of your results. If possible, include a qualitative and/or quantitative discussion of the numerical stability, eventual loss of precision etc.
\item Try to give an interpretation of you results in your answers to the problems.
\item Critique: if possible include your comments and reflections about the exercise, whether you felt you learnt something, ideas for improvements and other thoughts you've made when solving the exercise. We wish to keep this course at the interactive level and your comments can help us improve it.
\item Try to establish a practice where you log your work at the computerlab. You may find such a logbook very handy at later stages in your work, especially when you don't properly remember what a previous test version of your program did. Here you could also record the time spent on solving the exercise, various algorithms you may have tested or other topics which you feel worthy of mentioning.
\end{itemize}
\noindent
% ------------------- end of main content ---------------
\end{document}
-2
View File
@@ -1,2 +0,0 @@
This IPython notebook Project.ipynb does not require any additional
programs.
-2
View File
@@ -35,8 +35,6 @@ html=${name}-bs
system doconce format html $name --html_style=bootstrap --pygments_html_style=default --html_admon=bootstrap_panel --html_output=$html $opt
system doconce split_html $html.html --method=split --pagination --nav_button=bottom
# IPython notebook
system doconce format ipynb $name $opt
# Ordinary plain LaTeX document
system doconce format pdflatex $name --print_latex_style=trac --latex_admon=paragraph $opt