update
This commit is contained in:
@@ -54,13 +54,21 @@ doconce format html Project3.do.txt --html_style=bootstrap --pygments_html_style
|
||||
2,
|
||||
None,
|
||||
'solving-partial-differential-equations-with-neural-networks'),
|
||||
('Alternative differential equations',
|
||||
3,
|
||||
None,
|
||||
'alternative-differential-equations'),
|
||||
('Part a), setting up the problem',
|
||||
3,
|
||||
None,
|
||||
'part-a-setting-up-the-problem'),
|
||||
('Part b)', 3, None, 'part-b'),
|
||||
('Part c) Neural networks', 3, None, 'part-c-neural-networks'),
|
||||
('Part d)', 3, None, 'part-d'),
|
||||
('Part d) Neural network complexity',
|
||||
3,
|
||||
None,
|
||||
'part-d-neural-network-complexity'),
|
||||
('Part e)', 3, None, 'part-e'),
|
||||
('Introduction to numerical projects',
|
||||
2,
|
||||
None,
|
||||
@@ -116,10 +124,12 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="#part-d" style="font-size: 80%;"> Part d)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#part-e" style="font-size: 80%;"> Part e)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#solving-partial-differential-equations-with-neural-networks" style="font-size: 80%;"> Solving partial differential equations with neural networks</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#alternative-differential-equations" style="font-size: 80%;"> Alternative differential equations</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#part-a-setting-up-the-problem" style="font-size: 80%;"> Part a), setting up the problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#part-b" style="font-size: 80%;"> Part b)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#part-c-neural-networks" style="font-size: 80%;"> Part c) Neural networks</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#part-d" style="font-size: 80%;"> Part d)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#part-d-neural-network-complexity" style="font-size: 80%;"> Part d) Neural network complexity</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#part-e" style="font-size: 80%;"> Part e)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#introduction-to-numerical-projects" style="font-size: 80%;"> Introduction to numerical projects</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#format-for-electronic-delivery-of-report-and-programs" style="font-size: 80%;"> Format for electronic delivery of report and programs</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#software-and-needed-installations" style="font-size: 80%;"> Software and needed installations</a></li>
|
||||
@@ -149,7 +159,7 @@ MathJax.Hub.Config({
|
||||
</center>
|
||||
<br>
|
||||
<center>
|
||||
<h4>Nov 12, 2023</h4>
|
||||
<h4>Nov 13, 2023</h4>
|
||||
</center> <!-- date -->
|
||||
<br>
|
||||
|
||||
@@ -166,12 +176,16 @@ MathJax.Hub.Config({
|
||||
</ol>
|
||||
<p>The approach to the analysis of these new data sets should follow to a large extent what you did in projects 1 and 2. That is:</p>
|
||||
<ol>
|
||||
<li> Whether you end up with a regression or a classification problem, you should employ at least two of the methods we have discussed among <b>linear regression (including Ridge and Lasso)</b>, <b>Logistic Regression</b>, <b>Neural Networks</b>, <b>Convolution Neural Networks</b>, <b>Recurrent Neural Networks</b>, and <b>Decision Trees, Random Forests, Bagging and Boosting</b>. You could for example explore all of the approaches from decision trees, via bagging and voting classifiers, to random forests, boosting and finally XGboost. If you wish to venture into <b>convolutional neural networks</b> or <b>recurrent neural networks</b>, or extensions of neural networkds, feel free to do so. You can also study unsupervised methods, although we in this course have mainly paid attention to supervised learning.</li>
|
||||
<li> Whether you end up with a regression or a classification problem, you should employ at least two of the methods we have discussed among <b>linear regression (including Ridge and Lasso)</b>, <b>Logistic Regression</b>, <b>Neural Networks</b>, <b>Convolution Neural Networks</b>, <b>Recurrent Neural Networks</b>, and <b>Decision Trees, Random Forests, Bagging and Boosting</b>.</li>
|
||||
</ol>
|
||||
<p>Feel also free to use support vector machines, \( k \)-means and principal components analysis, although the latter have not been covered during the lectures. This material can be found in the lecture notes.</p>
|
||||
|
||||
<p>You could for example explore all of the approaches from decision trees, via bagging and voting classifiers, to random forests, boosting and finally XGboost. If you wish to venture into <b>convolutional neural networks</b> or <b>recurrent neural networks</b>, or extensions of neural networkds, feel free to do so. You can also study unsupervised methods, although we in this course have mainly paid attention to supervised learning. </p>
|
||||
|
||||
<p>For Boosting, feel also free to write your own codes.</p>
|
||||
|
||||
<ol>
|
||||
<li> For project 3, you should feel free to use your own codes from projects 1 and 2, eventually write your own for Decision trees/random forests/bagging/boosting' or use the available functionality of <b>Scikit-Learn</b>, <b>Tensorflow</b>, etc.</li>
|
||||
<li> For project 3, you should feel free to use your own codes from projects 1 and 2, eventually write your own for Decision trees/random forests/bagging/boosting' or use the available functionality of <b>Scikit-Learn</b>, <b>Tensorflow</b>, PyTorch etc.</li>
|
||||
<li> The estimates you used and tested in projects 1 and 2 should also be included, that is the \( R2 \)-score, <b>MSE</b>, confusion matrix, accuracy score, information gain, ROC and Cumulative gains curves and other, cross-validation and/or bootstrap if these are relevant.</li>
|
||||
<li> Similarly, feel free to explore various activations functions in deep learning and various approachs to stochastic gradient descent approaches.</li>
|
||||
<li> If possible, you should link the data sets with exisiting research and analyses thereof. Scientific articles which have used Machine Learning algorithms to analyze the data are highly welcome. Perhaps you can improve previous analyses and even publish a new article?</li>
|
||||
@@ -181,7 +195,7 @@ MathJax.Hub.Config({
|
||||
|
||||
<p>We propose also an alternative to the above. This is a project on using machine learning methods (neural networks mainly) to the solution of ordinary differential equations and partial differential equations, with a final twist on how to diagonalize a symmetric matrix with neural networks.</p>
|
||||
|
||||
<p>This is a field with a large interest recently, spanning from studies of turbulence in fluid mechanics and meteorology to the solution of quantum mechanical systems. As reading background you can use the slides <a href="https://compphysics.github.io/MachineLearning/doc/pub/week43/html/week42.html" target="_self">from week 43</a> and/or the textbook by <a href="https://www.springer.com/gp/book/9789401798150" target="_self">Yadav et al</a>.</p>
|
||||
<p>This is a field with large scientific interest, spanning from studies of turbulence in fluid mechanics and meteorology to the solution of quantum mechanical systems. As reading background you can use the slides <a href="https://compphysics.github.io/MachineLearning/doc/pub/week43/html/week42.html" target="_self">from week 43</a> and/or the textbook by <a href="https://www.springer.com/gp/book/9789401798150" target="_self">Yadav et al</a>.</p>
|
||||
<h2 id="the-basic-structure-of-your-project" class="anchor">The basic structure of your project </h2>
|
||||
|
||||
<p>Here follows a set up on how to structure your report and analyze the data you have opted for.</p>
|
||||
@@ -209,9 +223,14 @@ equation in one dimension using a standard explicit scheme and neural
|
||||
networks to solve the same equations.
|
||||
</p>
|
||||
|
||||
<p>For the explicit scheme, you can study for example chapter 10 of the lecture notes in <a href="https://github.com/CompPhysics/ComputationalPhysics/blob/master/doc/Lectures/lectures2015.pdf" target="_self">Computational Physics</a> or alternative sources. For the solution of ordinary and partial differential equations using neural networks, the lectures by <a href="https://compphysics.github.io/MachineLearning/doc/pub/week42/html/week43.html" target="_self">Kristine Baluka Hein and included in the lectures of week 43</a> at this course are highly recommended.</p>
|
||||
<p>For the explicit scheme, you can study for example chapter 10 of the lecture notes in <a href="https://github.com/CompPhysics/ComputationalPhysics/blob/master/doc/Lectures/lectures2015.pdf" target="_self">Computational Physics, FYS3150/4150</a> or alternative sources from courses like <a href="https://www.uio.no/studier/emner/matnat/math/MAT-MEK4270/index.html" target="_self">MAT-MEK4270</a>. For the solution of ordinary and partial differential equations using neural networks, the lectures by <a href="https://compphysics.github.io/MachineLearning/doc/pub/week42/html/week43.html" target="_self">included in the lectures of week 43</a> at this course are highly recommended.</p>
|
||||
|
||||
<p>For the machine learning part you can use your own code from project 2 or the functionality of for example <b>Tensorflow/Keras</b>.. </p>
|
||||
<p>For the machine learning part you can use your own code from project 2 or the functionality of for example <b>Tensorflow/Keras</b>, <b>PyTorch</b> or other libraries such <a href="https://maziarraissi.github.io/PINNs/" target="_self">Physics informed machine learning</a>. </p>
|
||||
<h3 id="alternative-differential-equations" class="anchor">Alternative differential equations </h3>
|
||||
|
||||
<p>Note that you can replace the one-dimensional diffusion equation discussed below with other sets of either ordinary differential equations or partial differential equations.
|
||||
Please discuss such a change with us at the lab.
|
||||
</p>
|
||||
<h3 id="part-a-setting-up-the-problem" class="anchor">Part a), setting up the problem </h3>
|
||||
|
||||
<p>The physical problem can be that of the temperature gradient in a rod of length \( L=1 \) at \( x=0 \) and \( x=1 \).
|
||||
@@ -306,11 +325,16 @@ part b). Discuss your results and compare them with the standard
|
||||
explicit scheme. Include also the analytical solution and compare with
|
||||
that.
|
||||
</p>
|
||||
<h3 id="part-d" class="anchor">Part d) </h3>
|
||||
<h3 id="part-d-neural-network-complexity" class="anchor">Part d) Neural network complexity </h3>
|
||||
|
||||
<p>Here we study the stability of the results of the results as functions of the number of hidden nodes, layers and activation functions for the hidden layers.
|
||||
Increase the number of hidden nodes and layers in order to see if this improves your results. Try also different activation functions for the hidden layers, such as the <b>tanh</b>, <b>ReLU</b>, and other activation functions.
|
||||
Discuss your results.
|
||||
</p>
|
||||
<h3 id="part-e" class="anchor">Part e) </h3>
|
||||
|
||||
<p>Finally, present a critical assessment of the methods you have studied
|
||||
and discuss the potential for the solving differential equations and
|
||||
eigenvalue problems with machine learning methods.
|
||||
and discuss the potential for the solving differential equations with machine learning methods.
|
||||
</p>
|
||||
<h2 id="introduction-to-numerical-projects" class="anchor">Introduction to numerical projects </h2>
|
||||
|
||||
|
||||
@@ -54,13 +54,21 @@ doconce format html Project3.do.txt --html_style=bootstrap --pygments_html_style
|
||||
2,
|
||||
None,
|
||||
'solving-partial-differential-equations-with-neural-networks'),
|
||||
('Alternative differential equations',
|
||||
3,
|
||||
None,
|
||||
'alternative-differential-equations'),
|
||||
('Part a), setting up the problem',
|
||||
3,
|
||||
None,
|
||||
'part-a-setting-up-the-problem'),
|
||||
('Part b)', 3, None, 'part-b'),
|
||||
('Part c) Neural networks', 3, None, 'part-c-neural-networks'),
|
||||
('Part d)', 3, None, 'part-d'),
|
||||
('Part d) Neural network complexity',
|
||||
3,
|
||||
None,
|
||||
'part-d-neural-network-complexity'),
|
||||
('Part e)', 3, None, 'part-e'),
|
||||
('Introduction to numerical projects',
|
||||
2,
|
||||
None,
|
||||
@@ -116,10 +124,12 @@ MathJax.Hub.Config({
|
||||
<!-- navigation toc: --> <li><a href="#part-d" style="font-size: 80%;"> Part d)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#part-e" style="font-size: 80%;"> Part e)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#solving-partial-differential-equations-with-neural-networks" style="font-size: 80%;"> Solving partial differential equations with neural networks</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#alternative-differential-equations" style="font-size: 80%;"> Alternative differential equations</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#part-a-setting-up-the-problem" style="font-size: 80%;"> Part a), setting up the problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#part-b" style="font-size: 80%;"> Part b)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#part-c-neural-networks" style="font-size: 80%;"> Part c) Neural networks</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#part-d" style="font-size: 80%;"> Part d)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#part-d-neural-network-complexity" style="font-size: 80%;"> Part d) Neural network complexity</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#part-e" style="font-size: 80%;"> Part e)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#introduction-to-numerical-projects" style="font-size: 80%;"> Introduction to numerical projects</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#format-for-electronic-delivery-of-report-and-programs" style="font-size: 80%;"> Format for electronic delivery of report and programs</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#software-and-needed-installations" style="font-size: 80%;"> Software and needed installations</a></li>
|
||||
@@ -149,7 +159,7 @@ MathJax.Hub.Config({
|
||||
</center>
|
||||
<br>
|
||||
<center>
|
||||
<h4>Nov 12, 2023</h4>
|
||||
<h4>Nov 13, 2023</h4>
|
||||
</center> <!-- date -->
|
||||
<br>
|
||||
|
||||
@@ -166,12 +176,16 @@ MathJax.Hub.Config({
|
||||
</ol>
|
||||
<p>The approach to the analysis of these new data sets should follow to a large extent what you did in projects 1 and 2. That is:</p>
|
||||
<ol>
|
||||
<li> Whether you end up with a regression or a classification problem, you should employ at least two of the methods we have discussed among <b>linear regression (including Ridge and Lasso)</b>, <b>Logistic Regression</b>, <b>Neural Networks</b>, <b>Convolution Neural Networks</b>, <b>Recurrent Neural Networks</b>, and <b>Decision Trees, Random Forests, Bagging and Boosting</b>. You could for example explore all of the approaches from decision trees, via bagging and voting classifiers, to random forests, boosting and finally XGboost. If you wish to venture into <b>convolutional neural networks</b> or <b>recurrent neural networks</b>, or extensions of neural networkds, feel free to do so. You can also study unsupervised methods, although we in this course have mainly paid attention to supervised learning.</li>
|
||||
<li> Whether you end up with a regression or a classification problem, you should employ at least two of the methods we have discussed among <b>linear regression (including Ridge and Lasso)</b>, <b>Logistic Regression</b>, <b>Neural Networks</b>, <b>Convolution Neural Networks</b>, <b>Recurrent Neural Networks</b>, and <b>Decision Trees, Random Forests, Bagging and Boosting</b>.</li>
|
||||
</ol>
|
||||
<p>Feel also free to use support vector machines, \( k \)-means and principal components analysis, although the latter have not been covered during the lectures. This material can be found in the lecture notes.</p>
|
||||
|
||||
<p>You could for example explore all of the approaches from decision trees, via bagging and voting classifiers, to random forests, boosting and finally XGboost. If you wish to venture into <b>convolutional neural networks</b> or <b>recurrent neural networks</b>, or extensions of neural networkds, feel free to do so. You can also study unsupervised methods, although we in this course have mainly paid attention to supervised learning. </p>
|
||||
|
||||
<p>For Boosting, feel also free to write your own codes.</p>
|
||||
|
||||
<ol>
|
||||
<li> For project 3, you should feel free to use your own codes from projects 1 and 2, eventually write your own for Decision trees/random forests/bagging/boosting' or use the available functionality of <b>Scikit-Learn</b>, <b>Tensorflow</b>, etc.</li>
|
||||
<li> For project 3, you should feel free to use your own codes from projects 1 and 2, eventually write your own for Decision trees/random forests/bagging/boosting' or use the available functionality of <b>Scikit-Learn</b>, <b>Tensorflow</b>, PyTorch etc.</li>
|
||||
<li> The estimates you used and tested in projects 1 and 2 should also be included, that is the \( R2 \)-score, <b>MSE</b>, confusion matrix, accuracy score, information gain, ROC and Cumulative gains curves and other, cross-validation and/or bootstrap if these are relevant.</li>
|
||||
<li> Similarly, feel free to explore various activations functions in deep learning and various approachs to stochastic gradient descent approaches.</li>
|
||||
<li> If possible, you should link the data sets with exisiting research and analyses thereof. Scientific articles which have used Machine Learning algorithms to analyze the data are highly welcome. Perhaps you can improve previous analyses and even publish a new article?</li>
|
||||
@@ -181,7 +195,7 @@ MathJax.Hub.Config({
|
||||
|
||||
<p>We propose also an alternative to the above. This is a project on using machine learning methods (neural networks mainly) to the solution of ordinary differential equations and partial differential equations, with a final twist on how to diagonalize a symmetric matrix with neural networks.</p>
|
||||
|
||||
<p>This is a field with a large interest recently, spanning from studies of turbulence in fluid mechanics and meteorology to the solution of quantum mechanical systems. As reading background you can use the slides <a href="https://compphysics.github.io/MachineLearning/doc/pub/week43/html/week42.html" target="_self">from week 43</a> and/or the textbook by <a href="https://www.springer.com/gp/book/9789401798150" target="_self">Yadav et al</a>.</p>
|
||||
<p>This is a field with large scientific interest, spanning from studies of turbulence in fluid mechanics and meteorology to the solution of quantum mechanical systems. As reading background you can use the slides <a href="https://compphysics.github.io/MachineLearning/doc/pub/week43/html/week42.html" target="_self">from week 43</a> and/or the textbook by <a href="https://www.springer.com/gp/book/9789401798150" target="_self">Yadav et al</a>.</p>
|
||||
<h2 id="the-basic-structure-of-your-project" class="anchor">The basic structure of your project </h2>
|
||||
|
||||
<p>Here follows a set up on how to structure your report and analyze the data you have opted for.</p>
|
||||
@@ -209,9 +223,14 @@ equation in one dimension using a standard explicit scheme and neural
|
||||
networks to solve the same equations.
|
||||
</p>
|
||||
|
||||
<p>For the explicit scheme, you can study for example chapter 10 of the lecture notes in <a href="https://github.com/CompPhysics/ComputationalPhysics/blob/master/doc/Lectures/lectures2015.pdf" target="_self">Computational Physics</a> or alternative sources. For the solution of ordinary and partial differential equations using neural networks, the lectures by <a href="https://compphysics.github.io/MachineLearning/doc/pub/week42/html/week43.html" target="_self">Kristine Baluka Hein and included in the lectures of week 43</a> at this course are highly recommended.</p>
|
||||
<p>For the explicit scheme, you can study for example chapter 10 of the lecture notes in <a href="https://github.com/CompPhysics/ComputationalPhysics/blob/master/doc/Lectures/lectures2015.pdf" target="_self">Computational Physics, FYS3150/4150</a> or alternative sources from courses like <a href="https://www.uio.no/studier/emner/matnat/math/MAT-MEK4270/index.html" target="_self">MAT-MEK4270</a>. For the solution of ordinary and partial differential equations using neural networks, the lectures by <a href="https://compphysics.github.io/MachineLearning/doc/pub/week42/html/week43.html" target="_self">included in the lectures of week 43</a> at this course are highly recommended.</p>
|
||||
|
||||
<p>For the machine learning part you can use your own code from project 2 or the functionality of for example <b>Tensorflow/Keras</b>.. </p>
|
||||
<p>For the machine learning part you can use your own code from project 2 or the functionality of for example <b>Tensorflow/Keras</b>, <b>PyTorch</b> or other libraries such <a href="https://maziarraissi.github.io/PINNs/" target="_self">Physics informed machine learning</a>. </p>
|
||||
<h3 id="alternative-differential-equations" class="anchor">Alternative differential equations </h3>
|
||||
|
||||
<p>Note that you can replace the one-dimensional diffusion equation discussed below with other sets of either ordinary differential equations or partial differential equations.
|
||||
Please discuss such a change with us at the lab.
|
||||
</p>
|
||||
<h3 id="part-a-setting-up-the-problem" class="anchor">Part a), setting up the problem </h3>
|
||||
|
||||
<p>The physical problem can be that of the temperature gradient in a rod of length \( L=1 \) at \( x=0 \) and \( x=1 \).
|
||||
@@ -306,11 +325,16 @@ part b). Discuss your results and compare them with the standard
|
||||
explicit scheme. Include also the analytical solution and compare with
|
||||
that.
|
||||
</p>
|
||||
<h3 id="part-d" class="anchor">Part d) </h3>
|
||||
<h3 id="part-d-neural-network-complexity" class="anchor">Part d) Neural network complexity </h3>
|
||||
|
||||
<p>Here we study the stability of the results of the results as functions of the number of hidden nodes, layers and activation functions for the hidden layers.
|
||||
Increase the number of hidden nodes and layers in order to see if this improves your results. Try also different activation functions for the hidden layers, such as the <b>tanh</b>, <b>ReLU</b>, and other activation functions.
|
||||
Discuss your results.
|
||||
</p>
|
||||
<h3 id="part-e" class="anchor">Part e) </h3>
|
||||
|
||||
<p>Finally, present a critical assessment of the methods you have studied
|
||||
and discuss the potential for the solving differential equations and
|
||||
eigenvalue problems with machine learning methods.
|
||||
and discuss the potential for the solving differential equations with machine learning methods.
|
||||
</p>
|
||||
<h2 id="introduction-to-numerical-projects" class="anchor">Introduction to numerical projects </h2>
|
||||
|
||||
|
||||
@@ -132,13 +132,21 @@ div.toc p,a {
|
||||
2,
|
||||
None,
|
||||
'solving-partial-differential-equations-with-neural-networks'),
|
||||
('Alternative differential equations',
|
||||
3,
|
||||
None,
|
||||
'alternative-differential-equations'),
|
||||
('Part a), setting up the problem',
|
||||
3,
|
||||
None,
|
||||
'part-a-setting-up-the-problem'),
|
||||
('Part b)', 3, None, 'part-b'),
|
||||
('Part c) Neural networks', 3, None, 'part-c-neural-networks'),
|
||||
('Part d)', 3, None, 'part-d'),
|
||||
('Part d) Neural network complexity',
|
||||
3,
|
||||
None,
|
||||
'part-d-neural-network-complexity'),
|
||||
('Part e)', 3, None, 'part-e'),
|
||||
('Introduction to numerical projects',
|
||||
2,
|
||||
None,
|
||||
@@ -185,7 +193,7 @@ MathJax.Hub.Config({
|
||||
</center>
|
||||
<br>
|
||||
<center>
|
||||
<h4>Nov 12, 2023</h4>
|
||||
<h4>Nov 13, 2023</h4>
|
||||
</center> <!-- date -->
|
||||
<br>
|
||||
<h1 id="paths-for-project-3">Paths for project 3 </h1>
|
||||
@@ -199,12 +207,16 @@ MathJax.Hub.Config({
|
||||
</ol>
|
||||
<p>The approach to the analysis of these new data sets should follow to a large extent what you did in projects 1 and 2. That is:</p>
|
||||
<ol>
|
||||
<li> Whether you end up with a regression or a classification problem, you should employ at least two of the methods we have discussed among <b>linear regression (including Ridge and Lasso)</b>, <b>Logistic Regression</b>, <b>Neural Networks</b>, <b>Convolution Neural Networks</b>, <b>Recurrent Neural Networks</b>, and <b>Decision Trees, Random Forests, Bagging and Boosting</b>. You could for example explore all of the approaches from decision trees, via bagging and voting classifiers, to random forests, boosting and finally XGboost. If you wish to venture into <b>convolutional neural networks</b> or <b>recurrent neural networks</b>, or extensions of neural networkds, feel free to do so. You can also study unsupervised methods, although we in this course have mainly paid attention to supervised learning.</li>
|
||||
<li> Whether you end up with a regression or a classification problem, you should employ at least two of the methods we have discussed among <b>linear regression (including Ridge and Lasso)</b>, <b>Logistic Regression</b>, <b>Neural Networks</b>, <b>Convolution Neural Networks</b>, <b>Recurrent Neural Networks</b>, and <b>Decision Trees, Random Forests, Bagging and Boosting</b>.</li>
|
||||
</ol>
|
||||
<p>Feel also free to use support vector machines, \( k \)-means and principal components analysis, although the latter have not been covered during the lectures. This material can be found in the lecture notes.</p>
|
||||
|
||||
<p>You could for example explore all of the approaches from decision trees, via bagging and voting classifiers, to random forests, boosting and finally XGboost. If you wish to venture into <b>convolutional neural networks</b> or <b>recurrent neural networks</b>, or extensions of neural networkds, feel free to do so. You can also study unsupervised methods, although we in this course have mainly paid attention to supervised learning. </p>
|
||||
|
||||
<p>For Boosting, feel also free to write your own codes.</p>
|
||||
|
||||
<ol>
|
||||
<li> For project 3, you should feel free to use your own codes from projects 1 and 2, eventually write your own for Decision trees/random forests/bagging/boosting' or use the available functionality of <b>Scikit-Learn</b>, <b>Tensorflow</b>, etc.</li>
|
||||
<li> For project 3, you should feel free to use your own codes from projects 1 and 2, eventually write your own for Decision trees/random forests/bagging/boosting' or use the available functionality of <b>Scikit-Learn</b>, <b>Tensorflow</b>, PyTorch etc.</li>
|
||||
<li> The estimates you used and tested in projects 1 and 2 should also be included, that is the \( R2 \)-score, <b>MSE</b>, confusion matrix, accuracy score, information gain, ROC and Cumulative gains curves and other, cross-validation and/or bootstrap if these are relevant.</li>
|
||||
<li> Similarly, feel free to explore various activations functions in deep learning and various approachs to stochastic gradient descent approaches.</li>
|
||||
<li> If possible, you should link the data sets with exisiting research and analyses thereof. Scientific articles which have used Machine Learning algorithms to analyze the data are highly welcome. Perhaps you can improve previous analyses and even publish a new article?</li>
|
||||
@@ -214,7 +226,7 @@ MathJax.Hub.Config({
|
||||
|
||||
<p>We propose also an alternative to the above. This is a project on using machine learning methods (neural networks mainly) to the solution of ordinary differential equations and partial differential equations, with a final twist on how to diagonalize a symmetric matrix with neural networks.</p>
|
||||
|
||||
<p>This is a field with a large interest recently, spanning from studies of turbulence in fluid mechanics and meteorology to the solution of quantum mechanical systems. As reading background you can use the slides <a href="https://compphysics.github.io/MachineLearning/doc/pub/week43/html/week42.html" target="_blank">from week 43</a> and/or the textbook by <a href="https://www.springer.com/gp/book/9789401798150" target="_blank">Yadav et al</a>.</p>
|
||||
<p>This is a field with large scientific interest, spanning from studies of turbulence in fluid mechanics and meteorology to the solution of quantum mechanical systems. As reading background you can use the slides <a href="https://compphysics.github.io/MachineLearning/doc/pub/week43/html/week42.html" target="_blank">from week 43</a> and/or the textbook by <a href="https://www.springer.com/gp/book/9789401798150" target="_blank">Yadav et al</a>.</p>
|
||||
<h2 id="the-basic-structure-of-your-project">The basic structure of your project </h2>
|
||||
|
||||
<p>Here follows a set up on how to structure your report and analyze the data you have opted for.</p>
|
||||
@@ -242,9 +254,14 @@ equation in one dimension using a standard explicit scheme and neural
|
||||
networks to solve the same equations.
|
||||
</p>
|
||||
|
||||
<p>For the explicit scheme, you can study for example chapter 10 of the lecture notes in <a href="https://github.com/CompPhysics/ComputationalPhysics/blob/master/doc/Lectures/lectures2015.pdf" target="_blank">Computational Physics</a> or alternative sources. For the solution of ordinary and partial differential equations using neural networks, the lectures by <a href="https://compphysics.github.io/MachineLearning/doc/pub/week42/html/week43.html" target="_blank">Kristine Baluka Hein and included in the lectures of week 43</a> at this course are highly recommended.</p>
|
||||
<p>For the explicit scheme, you can study for example chapter 10 of the lecture notes in <a href="https://github.com/CompPhysics/ComputationalPhysics/blob/master/doc/Lectures/lectures2015.pdf" target="_blank">Computational Physics, FYS3150/4150</a> or alternative sources from courses like <a href="https://www.uio.no/studier/emner/matnat/math/MAT-MEK4270/index.html" target="_blank">MAT-MEK4270</a>. For the solution of ordinary and partial differential equations using neural networks, the lectures by <a href="https://compphysics.github.io/MachineLearning/doc/pub/week42/html/week43.html" target="_blank">included in the lectures of week 43</a> at this course are highly recommended.</p>
|
||||
|
||||
<p>For the machine learning part you can use your own code from project 2 or the functionality of for example <b>Tensorflow/Keras</b>.. </p>
|
||||
<p>For the machine learning part you can use your own code from project 2 or the functionality of for example <b>Tensorflow/Keras</b>, <b>PyTorch</b> or other libraries such <a href="https://maziarraissi.github.io/PINNs/" target="_blank">Physics informed machine learning</a>. </p>
|
||||
<h3 id="alternative-differential-equations">Alternative differential equations </h3>
|
||||
|
||||
<p>Note that you can replace the one-dimensional diffusion equation discussed below with other sets of either ordinary differential equations or partial differential equations.
|
||||
Please discuss such a change with us at the lab.
|
||||
</p>
|
||||
<h3 id="part-a-setting-up-the-problem">Part a), setting up the problem </h3>
|
||||
|
||||
<p>The physical problem can be that of the temperature gradient in a rod of length \( L=1 \) at \( x=0 \) and \( x=1 \).
|
||||
@@ -339,11 +356,16 @@ part b). Discuss your results and compare them with the standard
|
||||
explicit scheme. Include also the analytical solution and compare with
|
||||
that.
|
||||
</p>
|
||||
<h3 id="part-d">Part d) </h3>
|
||||
<h3 id="part-d-neural-network-complexity">Part d) Neural network complexity </h3>
|
||||
|
||||
<p>Here we study the stability of the results of the results as functions of the number of hidden nodes, layers and activation functions for the hidden layers.
|
||||
Increase the number of hidden nodes and layers in order to see if this improves your results. Try also different activation functions for the hidden layers, such as the <b>tanh</b>, <b>ReLU</b>, and other activation functions.
|
||||
Discuss your results.
|
||||
</p>
|
||||
<h3 id="part-e">Part e) </h3>
|
||||
|
||||
<p>Finally, present a critical assessment of the methods you have studied
|
||||
and discuss the potential for the solving differential equations and
|
||||
eigenvalue problems with machine learning methods.
|
||||
and discuss the potential for the solving differential equations with machine learning methods.
|
||||
</p>
|
||||
<h2 id="introduction-to-numerical-projects">Introduction to numerical projects </h2>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "5831c36a",
|
||||
"id": "32bbc99a",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -14,7 +14,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "2d774c8b",
|
||||
"id": "21397747",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -22,14 +22,14 @@
|
||||
"# Project 3 on Machine Learning, deadline December 18 (midnight), 2023\n",
|
||||
"**[Data Analysis and Machine Learning FYS-STK3155/FYS4155](http://www.uio.no/studier/emner/matnat/fys/FYS3155/index-eng.html)**, Department of Physics, University of Oslo, Norway\n",
|
||||
"\n",
|
||||
"Date: **Nov 12, 2023**\n",
|
||||
"Date: **Nov 13, 2023**\n",
|
||||
"\n",
|
||||
"Copyright 1999-2023, [Data Analysis and Machine Learning FYS-STK3155/FYS4155](http://www.uio.no/studier/emner/matnat/fys/FYS3155/index-eng.html). Released under CC Attribution-NonCommercial 4.0 license"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "5cbde03b",
|
||||
"id": "a13debcc",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -39,7 +39,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "5170403b",
|
||||
"id": "9d1f1220",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -54,11 +54,15 @@
|
||||
"3. Or other sources.\n",
|
||||
"\n",
|
||||
"The approach to the analysis of these new data sets should follow to a large extent what you did in projects 1 and 2. That is:\n",
|
||||
"1. Whether you end up with a regression or a classification problem, you should employ at least two of the methods we have discussed among **linear regression (including Ridge and Lasso)**, **Logistic Regression**, **Neural Networks**, **Convolution Neural Networks**, **Recurrent Neural Networks**, and **Decision Trees, Random Forests, Bagging and Boosting**. You could for example explore all of the approaches from decision trees, via bagging and voting classifiers, to random forests, boosting and finally XGboost. If you wish to venture into **convolutional neural networks** or **recurrent neural networks**, or extensions of neural networkds, feel free to do so. You can also study unsupervised methods, although we in this course have mainly paid attention to supervised learning. \n",
|
||||
"1. Whether you end up with a regression or a classification problem, you should employ at least two of the methods we have discussed among **linear regression (including Ridge and Lasso)**, **Logistic Regression**, **Neural Networks**, **Convolution Neural Networks**, **Recurrent Neural Networks**, and **Decision Trees, Random Forests, Bagging and Boosting**.\n",
|
||||
"\n",
|
||||
"Feel also free to use support vector machines, $k$-means and principal components analysis, although the latter have not been covered during the lectures. This material can be found in the lecture notes.\n",
|
||||
"\n",
|
||||
"You could for example explore all of the approaches from decision trees, via bagging and voting classifiers, to random forests, boosting and finally XGboost. If you wish to venture into **convolutional neural networks** or **recurrent neural networks**, or extensions of neural networkds, feel free to do so. You can also study unsupervised methods, although we in this course have mainly paid attention to supervised learning. \n",
|
||||
"\n",
|
||||
"For Boosting, feel also free to write your own codes.\n",
|
||||
"\n",
|
||||
"1. For project 3, you should feel free to use your own codes from projects 1 and 2, eventually write your own for Decision trees/random forests/bagging/boosting' or use the available functionality of **Scikit-Learn**, **Tensorflow**, etc. \n",
|
||||
"1. For project 3, you should feel free to use your own codes from projects 1 and 2, eventually write your own for Decision trees/random forests/bagging/boosting' or use the available functionality of **Scikit-Learn**, **Tensorflow**, PyTorch etc. \n",
|
||||
"\n",
|
||||
"2. The estimates you used and tested in projects 1 and 2 should also be included, that is the $R2$-score, **MSE**, confusion matrix, accuracy score, information gain, ROC and Cumulative gains curves and other, cross-validation and/or bootstrap if these are relevant.\n",
|
||||
"\n",
|
||||
@@ -72,12 +76,12 @@
|
||||
"\n",
|
||||
"We propose also an alternative to the above. This is a project on using machine learning methods (neural networks mainly) to the solution of ordinary differential equations and partial differential equations, with a final twist on how to diagonalize a symmetric matrix with neural networks.\n",
|
||||
"\n",
|
||||
"This is a field with a large interest recently, spanning from studies of turbulence in fluid mechanics and meteorology to the solution of quantum mechanical systems. As reading background you can use the slides [from week 43](https://compphysics.github.io/MachineLearning/doc/pub/week43/html/week42.html) and/or the textbook by [Yadav et al](https://www.springer.com/gp/book/9789401798150)."
|
||||
"This is a field with large scientific interest, spanning from studies of turbulence in fluid mechanics and meteorology to the solution of quantum mechanical systems. As reading background you can use the slides [from week 43](https://compphysics.github.io/MachineLearning/doc/pub/week43/html/week42.html) and/or the textbook by [Yadav et al](https://www.springer.com/gp/book/9789401798150)."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "e9fc8e8e",
|
||||
"id": "6416060c",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -89,7 +93,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "ce8b52a3",
|
||||
"id": "18827262",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -101,7 +105,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "eb943f7a",
|
||||
"id": "bcee53f4",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -113,7 +117,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "17447dcc",
|
||||
"id": "83ec8275",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -125,7 +129,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "d9bea856",
|
||||
"id": "2be62c8e",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -137,7 +141,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "5b74282b",
|
||||
"id": "385e0b16",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -149,7 +153,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "28f082d7",
|
||||
"id": "fbf49165",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -162,14 +166,27 @@
|
||||
"equation in one dimension using a standard explicit scheme and neural\n",
|
||||
"networks to solve the same equations.\n",
|
||||
"\n",
|
||||
"For the explicit scheme, you can study for example chapter 10 of the lecture notes in [Computational Physics](https://github.com/CompPhysics/ComputationalPhysics/blob/master/doc/Lectures/lectures2015.pdf) or alternative sources. For the solution of ordinary and partial differential equations using neural networks, the lectures by [Kristine Baluka Hein and included in the lectures of week 43](https://compphysics.github.io/MachineLearning/doc/pub/week42/html/week43.html) at this course are highly recommended.\n",
|
||||
"For the explicit scheme, you can study for example chapter 10 of the lecture notes in [Computational Physics, FYS3150/4150](https://github.com/CompPhysics/ComputationalPhysics/blob/master/doc/Lectures/lectures2015.pdf) or alternative sources from courses like [MAT-MEK4270](https://www.uio.no/studier/emner/matnat/math/MAT-MEK4270/index.html). For the solution of ordinary and partial differential equations using neural networks, the lectures by [included in the lectures of week 43](https://compphysics.github.io/MachineLearning/doc/pub/week42/html/week43.html) at this course are highly recommended.\n",
|
||||
"\n",
|
||||
"For the machine learning part you can use your own code from project 2 or the functionality of for example **Tensorflow/Keras**.."
|
||||
"For the machine learning part you can use your own code from project 2 or the functionality of for example **Tensorflow/Keras**, **PyTorch** or other libraries such [Physics informed machine learning](https://maziarraissi.github.io/PINNs/)."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "5e855e7f",
|
||||
"id": "c97df4f9",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"### Alternative differential equations\n",
|
||||
"\n",
|
||||
"Note that you can replace the one-dimensional diffusion equation discussed below with other sets of either ordinary differential equations or partial differential equations.\n",
|
||||
"Please discuss such a change with us at the lab."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "ecde0a0e",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -183,7 +200,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "bc4be75f",
|
||||
"id": "56429d7e",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -195,7 +212,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "caa1eca4",
|
||||
"id": "c2e49662",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -205,7 +222,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "98a2bd5b",
|
||||
"id": "fd661d63",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -217,7 +234,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "980b949d",
|
||||
"id": "a1d77183",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -227,7 +244,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7401e9ec",
|
||||
"id": "73d187ef",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -239,7 +256,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "e953662e",
|
||||
"id": "b9b49da0",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -250,7 +267,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "52122eb7",
|
||||
"id": "aee685e3",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -262,7 +279,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "ab71a383",
|
||||
"id": "96ec18ae",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -272,7 +289,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "4f886681",
|
||||
"id": "57c542b7",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -284,7 +301,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "83f8d12e",
|
||||
"id": "b6e8e863",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -297,7 +314,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "4bcf494f",
|
||||
"id": "76ae9476",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -309,7 +326,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7f95982b",
|
||||
"id": "95e239a3",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -319,7 +336,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "1ee81ac0",
|
||||
"id": "63fb1417",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -331,7 +348,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "bae7898a",
|
||||
"id": "e1c77709",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -341,7 +358,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "5de23ea9",
|
||||
"id": "2631e4bd",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -353,7 +370,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "4d5d56e3",
|
||||
"id": "0fa54ca3",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -364,7 +381,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "e52523ef",
|
||||
"id": "7579152d",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -380,7 +397,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "678607d0",
|
||||
"id": "e8ceb962",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -397,21 +414,34 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "61d51d93",
|
||||
"id": "fe5c3f2f",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"### Part d)\n",
|
||||
"### Part d) Neural network complexity\n",
|
||||
"\n",
|
||||
"Finally, present a critical assessment of the methods you have studied\n",
|
||||
"and discuss the potential for the solving differential equations and\n",
|
||||
"eigenvalue problems with machine learning methods."
|
||||
"Here we study the stability of the results of the results as functions of the number of hidden nodes, layers and activation functions for the hidden layers.\n",
|
||||
"Increase the number of hidden nodes and layers in order to see if this improves your results. Try also different activation functions for the hidden layers, such as the **tanh**, **ReLU**, and other activation functions. \n",
|
||||
"Discuss your results."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "d2163034",
|
||||
"id": "3b2adf3a",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"### Part e)\n",
|
||||
"\n",
|
||||
"Finally, present a critical assessment of the methods you have studied\n",
|
||||
"and discuss the potential for the solving differential equations with machine learning methods."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c2ed7243",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -442,7 +472,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "e31290fd",
|
||||
"id": "e9f450e7",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -464,7 +494,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "99e78b73",
|
||||
"id": "4ec24e55",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
|
||||
Binary file not shown.
@@ -149,7 +149,7 @@ Project 3 on Machine Learning, deadline December 18 (midnight), 2023
|
||||
|
||||
% --- begin date ---
|
||||
\begin{center}
|
||||
Nov 12, 2023
|
||||
Nov 13, 2023
|
||||
\end{center}
|
||||
% --- end date ---
|
||||
|
||||
@@ -172,14 +172,18 @@ For project 3, you can propose own data sets that relate to your research intere
|
||||
\noindent
|
||||
The approach to the analysis of these new data sets should follow to a large extent what you did in projects 1 and 2. That is:
|
||||
\begin{enumerate}
|
||||
\item Whether you end up with a regression or a classification problem, you should employ at least two of the methods we have discussed among \textbf{linear regression (including Ridge and Lasso)}, \textbf{Logistic Regression}, \textbf{Neural Networks}, \textbf{Convolution Neural Networks}, \textbf{Recurrent Neural Networks}, and \textbf{Decision Trees, Random Forests, Bagging and Boosting}. You could for example explore all of the approaches from decision trees, via bagging and voting classifiers, to random forests, boosting and finally XGboost. If you wish to venture into \textbf{convolutional neural networks} or \textbf{recurrent neural networks}, or extensions of neural networkds, feel free to do so. You can also study unsupervised methods, although we in this course have mainly paid attention to supervised learning.
|
||||
\item Whether you end up with a regression or a classification problem, you should employ at least two of the methods we have discussed among \textbf{linear regression (including Ridge and Lasso)}, \textbf{Logistic Regression}, \textbf{Neural Networks}, \textbf{Convolution Neural Networks}, \textbf{Recurrent Neural Networks}, and \textbf{Decision Trees, Random Forests, Bagging and Boosting}.
|
||||
\end{enumerate}
|
||||
|
||||
\noindent
|
||||
Feel also free to use support vector machines, $k$-means and principal components analysis, although the latter have not been covered during the lectures. This material can be found in the lecture notes.
|
||||
|
||||
You could for example explore all of the approaches from decision trees, via bagging and voting classifiers, to random forests, boosting and finally XGboost. If you wish to venture into \textbf{convolutional neural networks} or \textbf{recurrent neural networks}, or extensions of neural networkds, feel free to do so. You can also study unsupervised methods, although we in this course have mainly paid attention to supervised learning.
|
||||
|
||||
For Boosting, feel also free to write your own codes.
|
||||
|
||||
\begin{enumerate}
|
||||
\item For project 3, you should feel free to use your own codes from projects 1 and 2, eventually write your own for Decision trees/random forests/bagging/boosting' or use the available functionality of \textbf{Scikit-Learn}, \textbf{Tensorflow}, etc.
|
||||
\item For project 3, you should feel free to use your own codes from projects 1 and 2, eventually write your own for Decision trees/random forests/bagging/boosting' or use the available functionality of \textbf{Scikit-Learn}, \textbf{Tensorflow}, PyTorch etc.
|
||||
|
||||
\item The estimates you used and tested in projects 1 and 2 should also be included, that is the $R2$-score, \textbf{MSE}, confusion matrix, accuracy score, information gain, ROC and Cumulative gains curves and other, cross-validation and/or bootstrap if these are relevant.
|
||||
|
||||
@@ -195,7 +199,7 @@ All in all, the report should follow the same pattern as the two previous ones,
|
||||
|
||||
We propose also an alternative to the above. This is a project on using machine learning methods (neural networks mainly) to the solution of ordinary differential equations and partial differential equations, with a final twist on how to diagonalize a symmetric matrix with neural networks.
|
||||
|
||||
This is a field with a large interest recently, spanning from studies of turbulence in fluid mechanics and meteorology to the solution of quantum mechanical systems. As reading background you can use the slides \href{{https://compphysics.github.io/MachineLearning/doc/pub/week43/html/week42.html}}{from week 43} and/or the textbook by \href{{https://www.springer.com/gp/book/9789401798150}}{Yadav et al}.
|
||||
This is a field with large scientific interest, spanning from studies of turbulence in fluid mechanics and meteorology to the solution of quantum mechanical systems. As reading background you can use the slides \href{{https://compphysics.github.io/MachineLearning/doc/pub/week43/html/week42.html}}{from week 43} and/or the textbook by \href{{https://www.springer.com/gp/book/9789401798150}}{Yadav et al}.
|
||||
|
||||
\subsection{The basic structure of your project}
|
||||
|
||||
@@ -224,9 +228,13 @@ finite difference schemes. We will study the solution of the diffusion
|
||||
equation in one dimension using a standard explicit scheme and neural
|
||||
networks to solve the same equations.
|
||||
|
||||
For the explicit scheme, you can study for example chapter 10 of the lecture notes in \href{{https://github.com/CompPhysics/ComputationalPhysics/blob/master/doc/Lectures/lectures2015.pdf}}{Computational Physics} or alternative sources. For the solution of ordinary and partial differential equations using neural networks, the lectures by \href{{https://compphysics.github.io/MachineLearning/doc/pub/week42/html/week43.html}}{Kristine Baluka Hein and included in the lectures of week 43} at this course are highly recommended.
|
||||
For the explicit scheme, you can study for example chapter 10 of the lecture notes in \href{{https://github.com/CompPhysics/ComputationalPhysics/blob/master/doc/Lectures/lectures2015.pdf}}{Computational Physics, FYS3150/4150} or alternative sources from courses like \href{{https://www.uio.no/studier/emner/matnat/math/MAT-MEK4270/index.html}}{MAT-MEK4270}. For the solution of ordinary and partial differential equations using neural networks, the lectures by \href{{https://compphysics.github.io/MachineLearning/doc/pub/week42/html/week43.html}}{included in the lectures of week 43} at this course are highly recommended.
|
||||
|
||||
For the machine learning part you can use your own code from project 2 or the functionality of for example \textbf{Tensorflow/Keras}..
|
||||
For the machine learning part you can use your own code from project 2 or the functionality of for example \textbf{Tensorflow/Keras}, \textbf{PyTorch} or other libraries such \href{{https://maziarraissi.github.io/PINNs/}}{Physics informed machine learning}.
|
||||
|
||||
\paragraph{Alternative differential equations.}
|
||||
Note that you can replace the one-dimensional diffusion equation discussed below with other sets of either ordinary differential equations or partial differential equations.
|
||||
Please discuss such a change with us at the lab.
|
||||
|
||||
\paragraph{Part a), setting up the problem.}
|
||||
The physical problem can be that of the temperature gradient in a rod of length $L=1$ at $x=0$ and $x=1$.
|
||||
@@ -292,10 +300,14 @@ part b). Discuss your results and compare them with the standard
|
||||
explicit scheme. Include also the analytical solution and compare with
|
||||
that.
|
||||
|
||||
\paragraph{Part d).}
|
||||
\paragraph{Part d) Neural network complexity.}
|
||||
Here we study the stability of the results of the results as functions of the number of hidden nodes, layers and activation functions for the hidden layers.
|
||||
Increase the number of hidden nodes and layers in order to see if this improves your results. Try also different activation functions for the hidden layers, such as the \textbf{tanh}, \textbf{ReLU}, and other activation functions.
|
||||
Discuss your results.
|
||||
|
||||
\paragraph{Part e).}
|
||||
Finally, present a critical assessment of the methods you have studied
|
||||
and discuss the potential for the solving differential equations and
|
||||
eigenvalue problems with machine learning methods.
|
||||
and discuss the potential for the solving differential equations with machine learning methods.
|
||||
|
||||
\subsection{Introduction to numerical projects}
|
||||
|
||||
|
||||
Binary file not shown.
@@ -123,7 +123,7 @@ Project 3 on Machine Learning, deadline December 18 (midnight), 2023
|
||||
|
||||
% --- begin date ---
|
||||
\begin{center}
|
||||
Nov 12, 2023
|
||||
Nov 13, 2023
|
||||
\end{center}
|
||||
% --- end date ---
|
||||
|
||||
@@ -146,14 +146,18 @@ For project 3, you can propose own data sets that relate to your research intere
|
||||
\noindent
|
||||
The approach to the analysis of these new data sets should follow to a large extent what you did in projects 1 and 2. That is:
|
||||
\begin{enumerate}
|
||||
\item Whether you end up with a regression or a classification problem, you should employ at least two of the methods we have discussed among \textbf{linear regression (including Ridge and Lasso)}, \textbf{Logistic Regression}, \textbf{Neural Networks}, \textbf{Convolution Neural Networks}, \textbf{Recurrent Neural Networks}, and \textbf{Decision Trees, Random Forests, Bagging and Boosting}. You could for example explore all of the approaches from decision trees, via bagging and voting classifiers, to random forests, boosting and finally XGboost. If you wish to venture into \textbf{convolutional neural networks} or \textbf{recurrent neural networks}, or extensions of neural networkds, feel free to do so. You can also study unsupervised methods, although we in this course have mainly paid attention to supervised learning.
|
||||
\item Whether you end up with a regression or a classification problem, you should employ at least two of the methods we have discussed among \textbf{linear regression (including Ridge and Lasso)}, \textbf{Logistic Regression}, \textbf{Neural Networks}, \textbf{Convolution Neural Networks}, \textbf{Recurrent Neural Networks}, and \textbf{Decision Trees, Random Forests, Bagging and Boosting}.
|
||||
\end{enumerate}
|
||||
|
||||
\noindent
|
||||
Feel also free to use support vector machines, $k$-means and principal components analysis, although the latter have not been covered during the lectures. This material can be found in the lecture notes.
|
||||
|
||||
You could for example explore all of the approaches from decision trees, via bagging and voting classifiers, to random forests, boosting and finally XGboost. If you wish to venture into \textbf{convolutional neural networks} or \textbf{recurrent neural networks}, or extensions of neural networkds, feel free to do so. You can also study unsupervised methods, although we in this course have mainly paid attention to supervised learning.
|
||||
|
||||
For Boosting, feel also free to write your own codes.
|
||||
|
||||
\begin{enumerate}
|
||||
\item For project 3, you should feel free to use your own codes from projects 1 and 2, eventually write your own for Decision trees/random forests/bagging/boosting' or use the available functionality of \textbf{Scikit-Learn}, \textbf{Tensorflow}, etc.
|
||||
\item For project 3, you should feel free to use your own codes from projects 1 and 2, eventually write your own for Decision trees/random forests/bagging/boosting' or use the available functionality of \textbf{Scikit-Learn}, \textbf{Tensorflow}, PyTorch etc.
|
||||
|
||||
\item The estimates you used and tested in projects 1 and 2 should also be included, that is the $R2$-score, \textbf{MSE}, confusion matrix, accuracy score, information gain, ROC and Cumulative gains curves and other, cross-validation and/or bootstrap if these are relevant.
|
||||
|
||||
@@ -169,7 +173,7 @@ All in all, the report should follow the same pattern as the two previous ones,
|
||||
|
||||
We propose also an alternative to the above. This is a project on using machine learning methods (neural networks mainly) to the solution of ordinary differential equations and partial differential equations, with a final twist on how to diagonalize a symmetric matrix with neural networks.
|
||||
|
||||
This is a field with a large interest recently, spanning from studies of turbulence in fluid mechanics and meteorology to the solution of quantum mechanical systems. As reading background you can use the slides \href{{https://compphysics.github.io/MachineLearning/doc/pub/week43/html/week42.html}}{from week 43} and/or the textbook by \href{{https://www.springer.com/gp/book/9789401798150}}{Yadav et al}.
|
||||
This is a field with large scientific interest, spanning from studies of turbulence in fluid mechanics and meteorology to the solution of quantum mechanical systems. As reading background you can use the slides \href{{https://compphysics.github.io/MachineLearning/doc/pub/week43/html/week42.html}}{from week 43} and/or the textbook by \href{{https://www.springer.com/gp/book/9789401798150}}{Yadav et al}.
|
||||
|
||||
\subsection*{The basic structure of your project}
|
||||
|
||||
@@ -198,9 +202,13 @@ finite difference schemes. We will study the solution of the diffusion
|
||||
equation in one dimension using a standard explicit scheme and neural
|
||||
networks to solve the same equations.
|
||||
|
||||
For the explicit scheme, you can study for example chapter 10 of the lecture notes in \href{{https://github.com/CompPhysics/ComputationalPhysics/blob/master/doc/Lectures/lectures2015.pdf}}{Computational Physics} or alternative sources. For the solution of ordinary and partial differential equations using neural networks, the lectures by \href{{https://compphysics.github.io/MachineLearning/doc/pub/week42/html/week43.html}}{Kristine Baluka Hein and included in the lectures of week 43} at this course are highly recommended.
|
||||
For the explicit scheme, you can study for example chapter 10 of the lecture notes in \href{{https://github.com/CompPhysics/ComputationalPhysics/blob/master/doc/Lectures/lectures2015.pdf}}{Computational Physics, FYS3150/4150} or alternative sources from courses like \href{{https://www.uio.no/studier/emner/matnat/math/MAT-MEK4270/index.html}}{MAT-MEK4270}. For the solution of ordinary and partial differential equations using neural networks, the lectures by \href{{https://compphysics.github.io/MachineLearning/doc/pub/week42/html/week43.html}}{included in the lectures of week 43} at this course are highly recommended.
|
||||
|
||||
For the machine learning part you can use your own code from project 2 or the functionality of for example \textbf{Tensorflow/Keras}..
|
||||
For the machine learning part you can use your own code from project 2 or the functionality of for example \textbf{Tensorflow/Keras}, \textbf{PyTorch} or other libraries such \href{{https://maziarraissi.github.io/PINNs/}}{Physics informed machine learning}.
|
||||
|
||||
\paragraph{Alternative differential equations.}
|
||||
Note that you can replace the one-dimensional diffusion equation discussed below with other sets of either ordinary differential equations or partial differential equations.
|
||||
Please discuss such a change with us at the lab.
|
||||
|
||||
\paragraph{Part a), setting up the problem.}
|
||||
The physical problem can be that of the temperature gradient in a rod of length $L=1$ at $x=0$ and $x=1$.
|
||||
@@ -266,10 +274,14 @@ part b). Discuss your results and compare them with the standard
|
||||
explicit scheme. Include also the analytical solution and compare with
|
||||
that.
|
||||
|
||||
\paragraph{Part d).}
|
||||
\paragraph{Part d) Neural network complexity.}
|
||||
Here we study the stability of the results of the results as functions of the number of hidden nodes, layers and activation functions for the hidden layers.
|
||||
Increase the number of hidden nodes and layers in order to see if this improves your results. Try also different activation functions for the hidden layers, such as the \textbf{tanh}, \textbf{ReLU}, and other activation functions.
|
||||
Discuss your results.
|
||||
|
||||
\paragraph{Part e).}
|
||||
Finally, present a critical assessment of the methods you have studied
|
||||
and discuss the potential for the solving differential equations and
|
||||
eigenvalue problems with machine learning methods.
|
||||
and discuss the potential for the solving differential equations with machine learning methods.
|
||||
|
||||
\subsection*{Introduction to numerical projects}
|
||||
|
||||
|
||||
@@ -0,0 +1,546 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "32bbc99a",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"<!-- HTML file automatically generated from DocOnce source (https://github.com/doconce/doconce/)\n",
|
||||
"doconce format html Project3.do.txt -->\n",
|
||||
"<!-- dom:TITLE: Project 3 on Machine Learning, deadline December 18 (midnight), 2023 -->"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "21397747",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"# Project 3 on Machine Learning, deadline December 18 (midnight), 2023\n",
|
||||
"**[Data Analysis and Machine Learning FYS-STK3155/FYS4155](http://www.uio.no/studier/emner/matnat/fys/FYS3155/index-eng.html)**, Department of Physics, University of Oslo, Norway\n",
|
||||
"\n",
|
||||
"Date: **Nov 13, 2023**\n",
|
||||
"\n",
|
||||
"Copyright 1999-2023, [Data Analysis and Machine Learning FYS-STK3155/FYS4155](http://www.uio.no/studier/emner/matnat/fys/FYS3155/index-eng.html). Released under CC Attribution-NonCommercial 4.0 license"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "a13debcc",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"# Paths for project 3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "9d1f1220",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"## Defining the data sets to analyze yourself\n",
|
||||
"\n",
|
||||
"For project 3, you can propose own data sets that relate to your research interests or just use existing data sets from say\n",
|
||||
"1. [Kaggle](https://www.kaggle.com/datasets) \n",
|
||||
"\n",
|
||||
"2. The [University of California at Irvine (UCI) with its machine learning repository](https://archive.ics.uci.edu/ml/index.php).\n",
|
||||
"\n",
|
||||
"3. Or other sources.\n",
|
||||
"\n",
|
||||
"The approach to the analysis of these new data sets should follow to a large extent what you did in projects 1 and 2. That is:\n",
|
||||
"1. Whether you end up with a regression or a classification problem, you should employ at least two of the methods we have discussed among **linear regression (including Ridge and Lasso)**, **Logistic Regression**, **Neural Networks**, **Convolution Neural Networks**, **Recurrent Neural Networks**, and **Decision Trees, Random Forests, Bagging and Boosting**.\n",
|
||||
"\n",
|
||||
"Feel also free to use support vector machines, $k$-means and principal components analysis, although the latter have not been covered during the lectures. This material can be found in the lecture notes.\n",
|
||||
"\n",
|
||||
"You could for example explore all of the approaches from decision trees, via bagging and voting classifiers, to random forests, boosting and finally XGboost. If you wish to venture into **convolutional neural networks** or **recurrent neural networks**, or extensions of neural networkds, feel free to do so. You can also study unsupervised methods, although we in this course have mainly paid attention to supervised learning. \n",
|
||||
"\n",
|
||||
"For Boosting, feel also free to write your own codes.\n",
|
||||
"\n",
|
||||
"1. For project 3, you should feel free to use your own codes from projects 1 and 2, eventually write your own for Decision trees/random forests/bagging/boosting' or use the available functionality of **Scikit-Learn**, **Tensorflow**, PyTorch etc. \n",
|
||||
"\n",
|
||||
"2. The estimates you used and tested in projects 1 and 2 should also be included, that is the $R2$-score, **MSE**, confusion matrix, accuracy score, information gain, ROC and Cumulative gains curves and other, cross-validation and/or bootstrap if these are relevant.\n",
|
||||
"\n",
|
||||
"3. Similarly, feel free to explore various activations functions in deep learning and various approachs to stochastic gradient descent approaches.\n",
|
||||
"\n",
|
||||
"4. If possible, you should link the data sets with exisiting research and analyses thereof. Scientific articles which have used Machine Learning algorithms to analyze the data are highly welcome. Perhaps you can improve previous analyses and even publish a new article? \n",
|
||||
"\n",
|
||||
"5. A critical assessment of the methods with ditto perspectives and recommendations is also something you need to include.\n",
|
||||
"\n",
|
||||
"All in all, the report should follow the same pattern as the two previous ones, with abstract, introduction, methods, code, results, conclusions etc..\n",
|
||||
"\n",
|
||||
"We propose also an alternative to the above. This is a project on using machine learning methods (neural networks mainly) to the solution of ordinary differential equations and partial differential equations, with a final twist on how to diagonalize a symmetric matrix with neural networks.\n",
|
||||
"\n",
|
||||
"This is a field with large scientific interest, spanning from studies of turbulence in fluid mechanics and meteorology to the solution of quantum mechanical systems. As reading background you can use the slides [from week 43](https://compphysics.github.io/MachineLearning/doc/pub/week43/html/week42.html) and/or the textbook by [Yadav et al](https://www.springer.com/gp/book/9789401798150)."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "6416060c",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"## The basic structure of your project\n",
|
||||
"\n",
|
||||
"Here follows a set up on how to structure your report and analyze the data you have opted for."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "18827262",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"### Part a)\n",
|
||||
"\n",
|
||||
"The first part deals with structuring and reading the data, much along the same lines as done in projects 1 and 2. Explain how the data are produced and place them in a proper context."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "bcee53f4",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"### Part b)\n",
|
||||
"\n",
|
||||
"You need to include at least two central algorithms, or as an alternative explore methods from decisions tree to bagging, random forests and boosting. Explain the basics of the methods you have chosen to work with. This would be your theory part."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "83ec8275",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"### Part c)\n",
|
||||
"\n",
|
||||
"Then describe your algorithm and its implementation and tests you have performed."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "2be62c8e",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"### Part d)\n",
|
||||
"\n",
|
||||
"Then presents your results and findings, link with existing literature and more."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "385e0b16",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"### Part e)\n",
|
||||
"\n",
|
||||
"Finally, here you should present a critical assessment of the methods you have studied and link your results with the existing literature."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "fbf49165",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"## Solving partial differential equations with neural networks\n",
|
||||
"\n",
|
||||
"For this variant of project 3, we will assume that you have some\n",
|
||||
"background in the solution of partial differential equations using\n",
|
||||
"finite difference schemes. We will study the solution of the diffusion\n",
|
||||
"equation in one dimension using a standard explicit scheme and neural\n",
|
||||
"networks to solve the same equations.\n",
|
||||
"\n",
|
||||
"For the explicit scheme, you can study for example chapter 10 of the lecture notes in [Computational Physics, FYS3150/4150](https://github.com/CompPhysics/ComputationalPhysics/blob/master/doc/Lectures/lectures2015.pdf) or alternative sources from courses like [MAT-MEK4270](https://www.uio.no/studier/emner/matnat/math/MAT-MEK4270/index.html). For the solution of ordinary and partial differential equations using neural networks, the lectures by [included in the lectures of week 43](https://compphysics.github.io/MachineLearning/doc/pub/week42/html/week43.html) at this course are highly recommended.\n",
|
||||
"\n",
|
||||
"For the machine learning part you can use your own code from project 2 or the functionality of for example **Tensorflow/Keras**, **PyTorch** or other libraries such [Physics informed machine learning](https://maziarraissi.github.io/PINNs/)."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c97df4f9",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"### Alternative differential equations\n",
|
||||
"\n",
|
||||
"Note that you can replace the one-dimensional diffusion equation discussed below with other sets of either ordinary differential equations or partial differential equations.\n",
|
||||
"Please discuss such a change with us at the lab."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "ecde0a0e",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"### Part a), setting up the problem\n",
|
||||
"\n",
|
||||
"The physical problem can be that of the temperature gradient in a rod of length $L=1$ at $x=0$ and $x=1$.\n",
|
||||
"We are looking at a one-dimensional\n",
|
||||
"problem"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "56429d7e",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"$$\n",
|
||||
"\\frac{\\partial^2 u(x,t)}{\\partial x^2} =\\frac{\\partial u(x,t)}{\\partial t}, t> 0, x\\in [0,L]\n",
|
||||
"$$"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c2e49662",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "fd661d63",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"$$\n",
|
||||
"u_{xx} = u_t,\n",
|
||||
"$$"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "a1d77183",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"with initial conditions, i.e., the conditions at $t=0$,"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "73d187ef",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"$$\n",
|
||||
"u(x,0)= \\sin{(\\pi x)} \\hspace{0.5cm} 0 < x < L,\n",
|
||||
"$$"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b9b49da0",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"with $L=1$ the length of the $x$-region of interest. The \n",
|
||||
"boundary conditions are"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "aee685e3",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"$$\n",
|
||||
"u(0,t)= 0 \\hspace{0.5cm} t \\ge 0,\n",
|
||||
"$$"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "96ec18ae",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"and"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "57c542b7",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"$$\n",
|
||||
"u(L,t)= 0 \\hspace{0.5cm} t \\ge 0.\n",
|
||||
"$$"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b6e8e863",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"The function $u(x,t)$ can be the temperature gradient of a rod.\n",
|
||||
"As time increases, the velocity approaches a linear variation with $x$. \n",
|
||||
"\n",
|
||||
"We will limit ourselves to the so-called explicit forward Euler algorithm with discretized versions of time given by a forward formula and a centered difference in space resulting in"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "76ae9476",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"$$\n",
|
||||
"u_t\\approx \\frac{u(x,t+\\Delta t)-u(x,t)}{\\Delta t}=\\frac{u(x_i,t_j+\\Delta t)-u(x_i,t_j)}{\\Delta t}\n",
|
||||
"$$"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "95e239a3",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"and"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "63fb1417",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"$$\n",
|
||||
"u_{xx}\\approx \\frac{u(x+\\Delta x,t)-2u(x,t)+u(x-\\Delta x,t)}{\\Delta x^2},\n",
|
||||
"$$"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "e1c77709",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"or"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "2631e4bd",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"$$\n",
|
||||
"u_{xx}\\approx \\frac{u(x_i+\\Delta x,t_j)-2u(x_i,t_j)+u(x_i-\\Delta x,t_j)}{\\Delta x^2}.\n",
|
||||
"$$"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "0fa54ca3",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"Write down the algorithm and the equations you need to implement.\n",
|
||||
"Find also the analytical solution to the problem."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7579152d",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"### Part b)\n",
|
||||
"\n",
|
||||
"Implement the explicit scheme algorithm and perform tests of the solution \n",
|
||||
"for $\\Delta x=1/10$, $\\Delta x=1/100$ using $\\Delta t$ as dictated by the stability limit of the explicit scheme. The stability criterion for the explicit scheme requires that $\\Delta t/\\Delta x^2 \\leq 1/2$. \n",
|
||||
"\n",
|
||||
"Study the solutions at two time points $t_1$ and $t_2$ where $u(x,t_1)$ is smooth but still significantly curved\n",
|
||||
"and $u(x,t_2)$ is almost linear, close to the stationary state."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "e8ceb962",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"### Part c) Neural networks\n",
|
||||
"\n",
|
||||
"Study now the lecture notes on solving ODEs and PDEs with neural\n",
|
||||
"network and use either your own code from project 2 or the\n",
|
||||
"functionality of tensorflow/keras to solve the same equation as in\n",
|
||||
"part b). Discuss your results and compare them with the standard\n",
|
||||
"explicit scheme. Include also the analytical solution and compare with\n",
|
||||
"that."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "fe5c3f2f",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"### Part d) Neural network complexity\n",
|
||||
"\n",
|
||||
"Here we study the stability of the results of the results as functions of the number of hidden nodes, layers and activation functions for the hidden layers.\n",
|
||||
"Increase the number of hidden nodes and layers in order to see if this improves your results. Try also different activation functions for the hidden layers, such as the **tanh**, **ReLU**, and other activation functions. \n",
|
||||
"Discuss your results."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "3b2adf3a",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"### Part e)\n",
|
||||
"\n",
|
||||
"Finally, present a critical assessment of the methods you have studied\n",
|
||||
"and discuss the potential for the solving differential equations with machine learning methods."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c2ed7243",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"## 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."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "e9f450e7",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"## Format for electronic delivery of report and programs\n",
|
||||
"\n",
|
||||
"The preferred format for the report is a PDF file. You can also use DOC or postscript formats or as an ipython notebook file. As programming language we prefer that you choose between C/C++, Fortran2008 or Python. The following prescription should be followed when preparing the report:\n",
|
||||
"\n",
|
||||
" * Use Canvas to hand in your projects, log in at <https://www.uio.no/english/services/it/education/canvas/> with your normal UiO username and password.\n",
|
||||
"\n",
|
||||
" * Upload **only** the report file or the link to your GitHub/GitLab or similar typo of repos! For the source code file(s) you have developed please provide us with your link to your GitHub/GitLab or similar domain. The report file should include all of your discussions and a list of the codes you have developed. Do not include library files which are available at the course homepage, unless you have made specific changes to them.\n",
|
||||
"\n",
|
||||
" * In your GitHub/GitLab or similar repository, please include a folder which contains selected results. These can be in the form of output from your code for a selected set of runs and input parameters.\n",
|
||||
"\n",
|
||||
"Finally, \n",
|
||||
"we encourage you to collaborate. Optimal working groups consist of \n",
|
||||
"2-3 students. You can then hand in a common report."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "4ec24e55",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"## Software and needed installations\n",
|
||||
"\n",
|
||||
"If you have Python installed (we recommend Python3) and you feel pretty familiar with installing different packages, \n",
|
||||
"we recommend that you install the following Python packages via **pip** as\n",
|
||||
"1. pip install numpy scipy matplotlib ipython scikit-learn tensorflow sympy pandas pillow\n",
|
||||
"\n",
|
||||
"For Python3, replace **pip** with **pip3**.\n",
|
||||
"\n",
|
||||
"See below for a discussion of **tensorflow** and **scikit-learn**. \n",
|
||||
"\n",
|
||||
"For OSX users we recommend also, after having installed Xcode, to install **brew**. Brew allows \n",
|
||||
"for a seamless installation of additional software via for example\n",
|
||||
"1. brew install python3\n",
|
||||
"\n",
|
||||
"For Linux users, with its variety of distributions like for example the widely popular Ubuntu distribution\n",
|
||||
"you can use **pip** as well and simply install Python as \n",
|
||||
"1. sudo apt-get install python3 (or python for python2.7)\n",
|
||||
"\n",
|
||||
"etc etc. \n",
|
||||
"\n",
|
||||
"If you don't want to install various Python packages with their dependencies separately, we recommend two widely used distrubutions which set up all relevant dependencies for Python, namely\n",
|
||||
"1. [Anaconda](https://docs.anaconda.com/) Anaconda is an open source distribution of the Python and R programming languages for large-scale data processing, predictive analytics, and scientific computing, that aims to simplify package management and deployment. Package versions are managed by the package management system **conda**\n",
|
||||
"\n",
|
||||
"2. [Enthought canopy](https://www.enthought.com/product/canopy/) is a Python distribution for scientific and analytic computing distribution and analysis environment, available for free and under a commercial license.\n",
|
||||
"\n",
|
||||
"Popular software packages written in Python for ML are\n",
|
||||
"\n",
|
||||
"* [Scikit-learn](http://scikit-learn.org/stable/), \n",
|
||||
"\n",
|
||||
"* [Tensorflow](https://www.tensorflow.org/),\n",
|
||||
"\n",
|
||||
"* [PyTorch](http://pytorch.org/) and \n",
|
||||
"\n",
|
||||
"* [Keras](https://keras.io/).\n",
|
||||
"\n",
|
||||
"These are all freely available at their respective GitHub sites. They \n",
|
||||
"encompass communities of developers in the thousands or more. And the number\n",
|
||||
"of code developers and contributors keeps increasing."
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
||||
@@ -14,11 +14,14 @@ o Or other sources.
|
||||
|
||||
|
||||
The approach to the analysis of these new data sets should follow to a large extent what you did in projects 1 and 2. That is:
|
||||
o Whether you end up with a regression or a classification problem, you should employ at least two of the methods we have discussed among _linear regression (including Ridge and Lasso)_, _Logistic Regression_, _Neural Networks_, _Convolution Neural Networks_, _Recurrent Neural Networks_, and _Decision Trees, Random Forests, Bagging and Boosting_. You could for example explore all of the approaches from decision trees, via bagging and voting classifiers, to random forests, boosting and finally XGboost. If you wish to venture into _convolutional neural networks_ or _recurrent neural networks_, or extensions of neural networkds, feel free to do so. You can also study unsupervised methods, although we in this course have mainly paid attention to supervised learning.
|
||||
o Whether you end up with a regression or a classification problem, you should employ at least two of the methods we have discussed among _linear regression (including Ridge and Lasso)_, _Logistic Regression_, _Neural Networks_, _Convolution Neural Networks_, _Recurrent Neural Networks_, and _Decision Trees, Random Forests, Bagging and Boosting_.
|
||||
Feel also free to use support vector machines, $k$-means and principal components analysis, although the latter have not been covered during the lectures. This material can be found in the lecture notes.
|
||||
|
||||
You could for example explore all of the approaches from decision trees, via bagging and voting classifiers, to random forests, boosting and finally XGboost. If you wish to venture into _convolutional neural networks_ or _recurrent neural networks_, or extensions of neural networkds, feel free to do so. You can also study unsupervised methods, although we in this course have mainly paid attention to supervised learning.
|
||||
|
||||
For Boosting, feel also free to write your own codes.
|
||||
|
||||
o For project 3, you should feel free to use your own codes from projects 1 and 2, eventually write your own for Decision trees/random forests/bagging/boosting' or use the available functionality of _Scikit-Learn_, _Tensorflow_, etc.
|
||||
o For project 3, you should feel free to use your own codes from projects 1 and 2, eventually write your own for Decision trees/random forests/bagging/boosting' or use the available functionality of _Scikit-Learn_, _Tensorflow_, PyTorch etc.
|
||||
|
||||
o The estimates you used and tested in projects 1 and 2 should also be included, that is the $R2$-score, _MSE_, confusion matrix, accuracy score, information gain, ROC and Cumulative gains curves and other, cross-validation and/or bootstrap if these are relevant.
|
||||
|
||||
@@ -32,7 +35,7 @@ All in all, the report should follow the same pattern as the two previous ones,
|
||||
|
||||
We propose also an alternative to the above. This is a project on using machine learning methods (neural networks mainly) to the solution of ordinary differential equations and partial differential equations, with a final twist on how to diagonalize a symmetric matrix with neural networks.
|
||||
|
||||
This is a field with a large interest recently, spanning from studies of turbulence in fluid mechanics and meteorology to the solution of quantum mechanical systems. As reading background you can use the slides "from week 43":"https://compphysics.github.io/MachineLearning/doc/pub/week43/html/week42.html" and/or the textbook by "Yadav et al":"https://www.springer.com/gp/book/9789401798150".
|
||||
This is a field with large scientific interest, spanning from studies of turbulence in fluid mechanics and meteorology to the solution of quantum mechanical systems. As reading background you can use the slides "from week 43":"https://compphysics.github.io/MachineLearning/doc/pub/week43/html/week42.html" and/or the textbook by "Yadav et al":"https://www.springer.com/gp/book/9789401798150".
|
||||
|
||||
|
||||
===== The basic structure of your project =====
|
||||
@@ -68,9 +71,14 @@ finite difference schemes. We will study the solution of the diffusion
|
||||
equation in one dimension using a standard explicit scheme and neural
|
||||
networks to solve the same equations.
|
||||
|
||||
For the explicit scheme, you can study for example chapter 10 of the lecture notes in "Computational Physics":"https://github.com/CompPhysics/ComputationalPhysics/blob/master/doc/Lectures/lectures2015.pdf" or alternative sources. For the solution of ordinary and partial differential equations using neural networks, the lectures by "Kristine Baluka Hein and included in the lectures of week 43":"https://compphysics.github.io/MachineLearning/doc/pub/week42/html/week43.html" at this course are highly recommended.
|
||||
For the explicit scheme, you can study for example chapter 10 of the lecture notes in "Computational Physics, FYS3150/4150":"https://github.com/CompPhysics/ComputationalPhysics/blob/master/doc/Lectures/lectures2015.pdf" or alternative sources from courses like "MAT-MEK4270":"https://www.uio.no/studier/emner/matnat/math/MAT-MEK4270/index.html". For the solution of ordinary and partial differential equations using neural networks, the lectures by "included in the lectures of week 43":"https://compphysics.github.io/MachineLearning/doc/pub/week42/html/week43.html" at this course are highly recommended.
|
||||
|
||||
For the machine learning part you can use your own code from project 2 or the functionality of for example _Tensorflow/Keras_..
|
||||
For the machine learning part you can use your own code from project 2 or the functionality of for example _Tensorflow/Keras_, _PyTorch_ or other libraries such "Physics informed machine learning":"https://maziarraissi.github.io/PINNs/".
|
||||
|
||||
=== Alternative differential equations ===
|
||||
|
||||
Note that you can replace the one-dimensional diffusion equation discussed below with other sets of either ordinary differential equations or partial differential equations.
|
||||
Please discuss such a change with us at the lab.
|
||||
|
||||
=== Part a), setting up the problem ===
|
||||
|
||||
@@ -157,13 +165,18 @@ explicit scheme. Include also the analytical solution and compare with
|
||||
that.
|
||||
|
||||
|
||||
=== Part d) Neural network complexity ===
|
||||
|
||||
Here we study the stability of the results of the results as functions of the number of hidden nodes, layers and activation functions for the hidden layers.
|
||||
Increase the number of hidden nodes and layers in order to see if this improves your results. Try also different activation functions for the hidden layers, such as the _tanh_, _ReLU_, and other activation functions.
|
||||
Discuss your results.
|
||||
|
||||
=== Part d) ===
|
||||
=== Part e) ===
|
||||
|
||||
Finally, present a critical assessment of the methods you have studied
|
||||
and discuss the potential for the solving differential equations and
|
||||
eigenvalue problems with machine learning methods.
|
||||
and discuss the potential for the solving differential equations with machine learning methods.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -246,3 +259,8 @@ of code developers and contributors keeps increasing.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user