From 0c2eade551fc621e29b2030f3e687ef7bfe267d6 Mon Sep 17 00:00:00 2001 From: Morten Hjorth-Jensen Date: Mon, 13 Nov 2023 06:12:50 +0100 Subject: [PATCH] update --- .../2023/Project3/html/._Project3-bs000.html | 46 +- .../2023/Project3/html/Project3-bs.html | 46 +- doc/Projects/2023/Project3/html/Project3.html | 42 +- .../2023/Project3/ipynb/Project3.ipynb | 118 ++-- .../Project3/ipynb/ipynb-Project3-src.tar.gz | Bin 193 -> 194 bytes doc/Projects/2023/Project3/pdf/Project3.p.tex | 30 +- doc/Projects/2023/Project3/pdf/Project3.pdf | Bin 230307 -> 232967 bytes doc/Projects/2023/Project3/pdf/Project3.tex | 30 +- doc/src/LectureNotes/Project3.ipynb | 546 ++++++++++++++++++ .../Projects/2023/Project3/Project3.do.txt | 34 +- 10 files changed, 790 insertions(+), 102 deletions(-) create mode 100644 doc/src/LectureNotes/Project3.ipynb diff --git a/doc/Projects/2023/Project3/html/._Project3-bs000.html b/doc/Projects/2023/Project3/html/._Project3-bs000.html index 3297de220..c8223a833 100644 --- a/doc/Projects/2023/Project3/html/._Project3-bs000.html +++ b/doc/Projects/2023/Project3/html/._Project3-bs000.html @@ -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({
  •       Part d)
  •       Part e)
  •    Solving partial differential equations with neural networks
  • +
  •       Alternative differential equations
  •       Part a), setting up the problem
  •       Part b)
  •       Part c) Neural networks
  • -
  •       Part d)
  • +
  •       Part d) Neural network complexity
  • +
  •       Part e)
  •    Introduction to numerical projects
  •    Format for electronic delivery of report and programs
  •    Software and needed installations
  • @@ -149,7 +159,7 @@ MathJax.Hub.Config({
    -

    Nov 12, 2023

    +

    Nov 13, 2023


    @@ -166,12 +176,16 @@ MathJax.Hub.Config({

    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:

      -
    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.
    2. +
    3. 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.

      -
    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.
    2. +
    3. 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.
    4. 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.
    5. Similarly, feel free to explore various activations functions in deep learning and various approachs to stochastic gradient descent approaches.
    6. 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?
    7. @@ -181,7 +195,7 @@ MathJax.Hub.Config({

      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 and/or the textbook by 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 from week 43 and/or the textbook by Yadav et al.

      The basic structure of your project

      Here follows a set up on how to structure your report and analyze the data you have opted for.

      @@ -209,9 +223,14 @@ 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 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 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 or alternative sources from courses like MAT-MEK4270. For the solution of ordinary and partial differential equations using neural networks, the lectures by 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 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.

      +

      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

      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.

      -

      Part d)

      +

      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 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.

      Introduction to numerical projects

      diff --git a/doc/Projects/2023/Project3/html/Project3-bs.html b/doc/Projects/2023/Project3/html/Project3-bs.html index 3297de220..c8223a833 100644 --- a/doc/Projects/2023/Project3/html/Project3-bs.html +++ b/doc/Projects/2023/Project3/html/Project3-bs.html @@ -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({
    8.       Part d)
    9.       Part e)
    10.    Solving partial differential equations with neural networks
    11. +
    12.       Alternative differential equations
    13.       Part a), setting up the problem
    14.       Part b)
    15.       Part c) Neural networks
    16. -
    17.       Part d)
    18. +
    19.       Part d) Neural network complexity
    20. +
    21.       Part e)
    22.    Introduction to numerical projects
    23.    Format for electronic delivery of report and programs
    24.    Software and needed installations
    25. @@ -149,7 +159,7 @@ MathJax.Hub.Config({
      -

      Nov 12, 2023

      +

      Nov 13, 2023


      @@ -166,12 +176,16 @@ MathJax.Hub.Config({

    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:

      -
    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.
    2. +
    3. 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.

      -
    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.
    2. +
    3. 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.
    4. 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.
    5. Similarly, feel free to explore various activations functions in deep learning and various approachs to stochastic gradient descent approaches.
    6. 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?
    7. @@ -181,7 +195,7 @@ MathJax.Hub.Config({

      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 and/or the textbook by 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 from week 43 and/or the textbook by Yadav et al.

      The basic structure of your project

      Here follows a set up on how to structure your report and analyze the data you have opted for.

      @@ -209,9 +223,14 @@ 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 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 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 or alternative sources from courses like MAT-MEK4270. For the solution of ordinary and partial differential equations using neural networks, the lectures by 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 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.

      +

      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

      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.

      -

      Part d)

      +

      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 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.

      Introduction to numerical projects

      diff --git a/doc/Projects/2023/Project3/html/Project3.html b/doc/Projects/2023/Project3/html/Project3.html index a1e9d29d5..b553cba6e 100644 --- a/doc/Projects/2023/Project3/html/Project3.html +++ b/doc/Projects/2023/Project3/html/Project3.html @@ -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({
      -

      Nov 12, 2023

      +

      Nov 13, 2023


      Paths for project 3

      @@ -199,12 +207,16 @@ MathJax.Hub.Config({

    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:

      -
    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.
    2. +
    3. 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.

      -
    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.
    2. +
    3. 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.
    4. 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.
    5. Similarly, feel free to explore various activations functions in deep learning and various approachs to stochastic gradient descent approaches.
    6. 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?
    7. @@ -214,7 +226,7 @@ MathJax.Hub.Config({

      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 and/or the textbook by 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 from week 43 and/or the textbook by Yadav et al.

      The basic structure of your project

      Here follows a set up on how to structure your report and analyze the data you have opted for.

      @@ -242,9 +254,14 @@ 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 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 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 or alternative sources from courses like MAT-MEK4270. For the solution of ordinary and partial differential equations using neural networks, the lectures by 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 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.

      +

      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

      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.

      -

      Part d)

      +

      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 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.

      Introduction to numerical projects

      diff --git a/doc/Projects/2023/Project3/ipynb/Project3.ipynb b/doc/Projects/2023/Project3/ipynb/Project3.ipynb index d45c511e8..d4e676b9c 100644 --- a/doc/Projects/2023/Project3/ipynb/Project3.ipynb +++ b/doc/Projects/2023/Project3/ipynb/Project3.ipynb @@ -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 }, diff --git a/doc/Projects/2023/Project3/ipynb/ipynb-Project3-src.tar.gz b/doc/Projects/2023/Project3/ipynb/ipynb-Project3-src.tar.gz index aa5f6fe8d5d913b146c0ddca0f244bda74f29c14..ac64997c19f1da7ba570f7d5fe849958469f63ff 100644 GIT binary patch literal 194 zcmV;z06qU7iwFQGuu)|I1MSaC3c@fD2H>uHia9|^nzUI9cHu%O;ssKh+Ekm=Bn5kW z`v6@jZi)!`Hb27*!^|PuZ1-8@?k-pjLMWvaretX{CyJMPhA{(7lb8~M5M_WcNn#cN zTJNNn-a2l^Q`))_$_n*vZXBzs4||qZ;F*8oSW64Ld~mf^ptKW())&Z)Zp6uvNOprN wpwz-nO)%otOCx}*0eD$TC$-|&urvB>cx$8Z*Y9|q=Xqax0KPUr#{dWb0F{(h;s5{u literal 193 zcmV;y06za8iwFRtNKs_~1MSaC3WG2Z24L5oVoo55MqL-`qKkr*ULe+3V{67H5$f&h z1KL$fH&P1u82AYphM7aQ+3vHz-mSM9LP)|GOqnL}oFrV{GfGpSEDl-7#)^Q@D2}KH zWWAMMdSkgBS83};C?nLnzOk*UKFnE8foJ}SV=WEr^1;@qK%o@{;stVzjX2pTklmmP vC{dW{6STPXQVZZ}0A7~TN>u#ncN)){w