updated project 3
This commit is contained in:
@@ -6,9 +6,9 @@ Automatically generated HTML file from DocOnce source
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
|
||||
<meta name="description" content="Project 3 on Machine Learning, deadline December 10">
|
||||
<meta name="description" content="Project 3 on Machine Learning, deadline December 14">
|
||||
|
||||
<title>Project 3 on Machine Learning, deadline December 10</title>
|
||||
<title>Project 3 on Machine Learning, deadline December 14</title>
|
||||
|
||||
<!-- Bootstrap style: bootstrap -->
|
||||
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
@@ -39,15 +39,35 @@ Automatically generated HTML file from DocOnce source
|
||||
</head>
|
||||
|
||||
<!-- tocinfo
|
||||
{'highest level': 2,
|
||||
'sections': [('Premises for project 3', 2, None, '___sec0'),
|
||||
('Part a): Text to come', 3, None, '___sec1'),
|
||||
('Introduction to numerical projects', 2, None, '___sec2'),
|
||||
{'highest level': 1,
|
||||
'sections': [('Paths for project 3', 1, None, '___sec0'),
|
||||
('Defining the data sets to analyze yourself',
|
||||
2,
|
||||
None,
|
||||
'___sec1'),
|
||||
('Studying the credic card data set as possible project',
|
||||
2,
|
||||
None,
|
||||
'___sec2'),
|
||||
('Part a)', 3, None, '___sec3'),
|
||||
('Part b)', 3, None, '___sec4'),
|
||||
('Part c)', 3, None, '___sec5'),
|
||||
('Part d)', 3, None, '___sec6'),
|
||||
('Part e)', 3, None, '___sec7'),
|
||||
('Solving partial differential equations with neural networks',
|
||||
2,
|
||||
None,
|
||||
'___sec8'),
|
||||
('Part a), setting up the problem', 3, None, '___sec9'),
|
||||
('Part b)', 3, None, '___sec10'),
|
||||
('Part c) Neural networks', 3, None, '___sec11'),
|
||||
('Part d)', 3, None, '___sec12'),
|
||||
('Introduction to numerical projects', 2, None, '___sec13'),
|
||||
('Format for electronic delivery of report and programs',
|
||||
2,
|
||||
None,
|
||||
'___sec3'),
|
||||
('Software and needed installations', 2, None, '___sec4')]}
|
||||
'___sec14'),
|
||||
('Software and needed installations', 2, None, '___sec15')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -77,7 +97,7 @@ MathJax.Hub.Config({
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="Project3-bs.html">Project 3 on Machine Learning, deadline December 10</a>
|
||||
<a class="navbar-brand" href="Project3-bs.html">Project 3 on Machine Learning, deadline December 14</a>
|
||||
</div>
|
||||
|
||||
<div class="navbar-collapse collapse navbar-responsive-collapse">
|
||||
@@ -85,11 +105,22 @@ MathJax.Hub.Config({
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<!-- navigation toc: --> <li><a href="#___sec0" style="font-size: 80%;"><b>Premises for project 3</b></a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec1" style="font-size: 80%;"> Part a): Text to come</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec2" style="font-size: 80%;"><b>Introduction to numerical projects</b></a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec3" style="font-size: 80%;"><b>Format for electronic delivery of report and programs</b></a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec4" style="font-size: 80%;"><b>Software and needed installations</b></a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec0" style="font-size: 80%;"><b>Paths for project 3</b></a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec1" style="font-size: 80%;"> Defining the data sets to analyze yourself</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec2" style="font-size: 80%;"> Studying the credic card data set as possible project</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec3" style="font-size: 80%;"> Part a)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec4" style="font-size: 80%;"> Part b)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec5" style="font-size: 80%;"> Part c)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec6" style="font-size: 80%;"> Part d)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec7" style="font-size: 80%;"> Part e)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec8" style="font-size: 80%;"> Solving partial differential equations with neural networks</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec9" style="font-size: 80%;"> Part a), setting up the problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec10" style="font-size: 80%;"> Part b)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec11" style="font-size: 80%;"> Part c) Neural networks</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec12" style="font-size: 80%;"> Part d)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec13" style="font-size: 80%;"> Introduction to numerical projects</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec14" style="font-size: 80%;"> Format for electronic delivery of report and programs</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec15" style="font-size: 80%;"> Software and needed installations</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -108,7 +139,7 @@ MathJax.Hub.Config({
|
||||
|
||||
|
||||
<div class="jumbotron">
|
||||
<center><h1>Project 3 on Machine Learning, deadline December 10</h1></center> <!-- document title -->
|
||||
<center><h1>Project 3 on Machine Learning, deadline December 14</h1></center> <!-- document title -->
|
||||
|
||||
<p>
|
||||
<!-- author(s): <a href="http://www.uio.no/studier/emner/matnat/fys/FYS3155/index-eng.html" target="_self">Data Analysis and Machine Learning FYS-STK3155/FYS4155</a> -->
|
||||
@@ -123,12 +154,14 @@ MathJax.Hub.Config({
|
||||
<center><b>Department of Physics, University of Oslo, Norway</b></center>
|
||||
<br>
|
||||
<p>
|
||||
<center><h4>Nov 12, 2018</h4></center> <!-- date -->
|
||||
<center><h4>Nov 13, 2018</h4></center> <!-- date -->
|
||||
<br>
|
||||
<p>
|
||||
</div> <!-- end jumbotron -->
|
||||
|
||||
<h2 id="___sec0" class="anchor">Premises for project 3 </h2>
|
||||
<h1 id="___sec0" class="anchor">Paths for project 3 </h1>
|
||||
|
||||
<h2 id="___sec1" class="anchor">Defining the data sets to analyze yourself </h2>
|
||||
|
||||
<p>
|
||||
For project 3, you can propose own data sets that relate to your research interests or just use existing data sets from say
|
||||
@@ -136,7 +169,8 @@ For project 3, you can propose own data sets that relate to your research intere
|
||||
<ol>
|
||||
<li> <a href="https://www.kaggle.com/datasets" target="_self">Kaggle</a></li>
|
||||
<li> The <a href="http://archive.ics.uci.edu/ml/datasets.html" target="_self">University of California at Irvine (UCI) with its machine learning repository</a></li>
|
||||
<li> The credit card data set from <a href="https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients" target="_self">UCI</a> is also interesting and links to a <a href="https://bradzzz.gitbooks.io/ga-seattle-dsi/content/dsi/dsi_05_classification_databases/2.1-lesson/assets/datasets/DefaultCreditCardClients_yeh_2009.pdf" target="_self">recent scientific article</a>.</li>
|
||||
<li> The credit card data set from <a href="https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients" target="_self">UCI</a> is also interesting and links to a <a href="https://bradzzz.gitbooks.io/ga-seattle-dsi/content/dsi/dsi_05_classification_databases/2.1-lesson/assets/datasets/DefaultCreditCardClients_yeh_2009.pdf" target="_self">recent scientific article</a>. See however below for possible project example</li>
|
||||
<li> Another interesting case is the bitcoin example discussed at the piazza link <a href="https://piazza.com/class/ji78s1cduul39a?cid=104" target="_self"><tt>https://piazza.com/class/ji78s1cduul39a?cid=104</tt></a>, read more there to see if this could of interest.</li>
|
||||
</ol>
|
||||
|
||||
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:
|
||||
@@ -144,7 +178,7 @@ The approach to the analysis of these new data sets should follow to a large ext
|
||||
<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>Support Vector Machines</b> and <b>Decision Trees and Random Forests</b>. 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.</li>
|
||||
<li> For project 3, you should feel free to use your own codes from projects 1 and 2, eventually write your own for SVMs and/or Decision trees and random forests' or use the available functionality of <b>scikit-learn</b>, <b>tensorflow</b>, 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>, cross-validation and/or bootstrap.</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>, cross-validation and/or bootstrap if these are relevant.</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>
|
||||
<li> A critical assessment of the methods with ditto perspectives and recommendations is also something you need to include.</li>
|
||||
</ol>
|
||||
@@ -157,9 +191,151 @@ We propose also an alternative to the above. This is a project on using machine
|
||||
<p>
|
||||
This is a field with a large interest recently, spanning from studies of turbulence in meteorology to the solution of quantum mechanical systems.
|
||||
|
||||
<h3 id="___sec1" class="anchor">Part a): Text to come </h3>
|
||||
<h2 id="___sec2" class="anchor">Studying the credic card data set as possible project </h2>
|
||||
|
||||
<h2 id="___sec2" class="anchor">Introduction to numerical projects </h2>
|
||||
<p>
|
||||
We include this data set as an example on how one could study new data sets with the algorithms we have discussed during the lectures, using either your own codes or the functionality of <b>scikit-learn</b>, <b>tensorflow</b> or other Python packages.
|
||||
|
||||
<p>
|
||||
The data set is presented at the site of <a href="https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients" target="_self">UCI</a>. It is particularly interesting since it is also analyzed using ML methods in a <a href="https://bradzzz.gitbooks.io/ga-seattle-dsi/content/dsi/dsi_05_classification_databases/2.1-lesson/assets/datasets/DefaultCreditCardClients_yeh_2009.pdf" target="_self">recent scientific article</a>.
|
||||
|
||||
<p>
|
||||
The authors apply several ML methods, from nearest neighbors via logistic regression to neural networks and Bayesian analysis (not covered much in our course).
|
||||
Here follows a set up on how to analyze these data.
|
||||
|
||||
<h3 id="___sec3" class="anchor">Part a) </h3>
|
||||
|
||||
The first part deals with structuring and reading the data, much along the same lines as done in projects 1 and 2.
|
||||
|
||||
<h3 id="___sec4" class="anchor">Part b) </h3>
|
||||
|
||||
<p>
|
||||
Perform a logistic regression analysis and see if you can reproduce the results of figure 3 of the above article.
|
||||
|
||||
<h3 id="___sec5" class="anchor">Part c) </h3>
|
||||
|
||||
<p>
|
||||
The next step is to use either your own code for neural networks from project 2 or the functionality provided by tensorflow/keras or scikit-learn's MLP method. Compare and discuss again your results with those from the above article.
|
||||
|
||||
<h3 id="___sec6" class="anchor">Part d) </h3>
|
||||
|
||||
<p>
|
||||
The above article does not study random forests or support vector machine algorithms. Try to apply one of these methods or both to the credit card data and see if these methods provide a better description of the data. Can you outperform the authors of the article?
|
||||
|
||||
<h3 id="___sec7" class="anchor">Part e) </h3>
|
||||
|
||||
<p>
|
||||
Finally, here you should present a critical assessment of the methods you have studied and link your results with the existing literature.
|
||||
|
||||
<h2 id="___sec8" class="anchor">Solving partial differential equations with neural networks </h2>
|
||||
|
||||
<p>
|
||||
For this variant of project 3, we will assume that you have some background in the solution of partial differential equations using 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.
|
||||
|
||||
<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/odenn/html/odenn-bs.html" target="_self">Kristine Baluka Hein</a> at this course are highly recommended.
|
||||
|
||||
<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>.
|
||||
|
||||
<h3 id="___sec9" 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 \).
|
||||
We are looking at a one-dimensional
|
||||
problem
|
||||
|
||||
$$
|
||||
\begin{equation*}
|
||||
\frac{\partial^2 u(x,t)}{\partial x^2} =\frac{\partial u(x,t)}{\partial t}, t> 0, x\in [0,L]
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
or
|
||||
|
||||
$$
|
||||
\begin{equation*}
|
||||
u_{xx} = u_t,
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
with initial conditions, i.e., the conditions at \( t=0 \),
|
||||
$$
|
||||
\begin{equation*}
|
||||
u(x,0)= \sin{(\pi x)} \hspace{0.5cm} 0 < x < L,
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
with \( L=1 \) the length of the \( x \)-region of interest. The
|
||||
boundary conditions are
|
||||
|
||||
$$
|
||||
\begin{equation*}
|
||||
u(0,t)= 0 \hspace{0.5cm} t \ge 0,
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
and
|
||||
|
||||
$$
|
||||
\begin{equation*}
|
||||
u(L,t)= 0 \hspace{0.5cm} t \ge 0.
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
The function \( u(x,t) \) can be the temperature gradient of a rod.
|
||||
As time increases, the velocity approaches a linear variation with \( x \).
|
||||
|
||||
<p>
|
||||
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
|
||||
$$
|
||||
\begin{equation*}
|
||||
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}
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
and
|
||||
|
||||
$$
|
||||
\begin{equation*}
|
||||
u_{xx}\approx \frac{u(x+\Delta x,t)-2u(x,t)+u(x-\Delta x,t)}{\Delta x^2},
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
or
|
||||
|
||||
$$
|
||||
\begin{equation*}
|
||||
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}.
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
<p>
|
||||
Write down the algorithm and the equations you need to implement.
|
||||
Find also the analytic solution to the problem.
|
||||
|
||||
<h3 id="___sec10" class="anchor">Part b) </h3>
|
||||
|
||||
<p>
|
||||
Implement the explicit scheme algorithm and perform tests of the solution
|
||||
for \( \Delta x=1/10 \), \( \Delta x=1/100 \) using \( \Delta t \) as dictated by the stability limit of the explicit scheme. This stability scheme requires that \( \Delta t/\Delta x^2 \leq 1/2 \).
|
||||
|
||||
<p>
|
||||
Study the solutions at two time points \( t_1 \) and \( t_2 \) where \( u(x,t_1) \) is smooth but still significantly curved
|
||||
and \( u(x,t_2) \) is almost linear, close to the stationary state.
|
||||
|
||||
<h3 id="___sec11" class="anchor">Part c) Neural networks </h3>
|
||||
|
||||
<p>
|
||||
Study now the lecture notes on solving ODEs and PDEs with neural network and use either your own code from project 2 or the functionality of tensorflow/keras to solve the same equation as in part b).
|
||||
Discuss your results and compare them with the standard explicit scheme. Include also the analytical solution and compare with that.
|
||||
|
||||
<h3 id="___sec12" class="anchor">Part d) </h3>
|
||||
|
||||
<p>
|
||||
Finally, present a critical assessment of the methods you have studied and discuss the potential for the solving differential equations with machine learning methods.
|
||||
|
||||
<h2 id="___sec13" class="anchor">Introduction to numerical projects </h2>
|
||||
|
||||
<p>
|
||||
Here follows a brief recipe and recommendation on how to write a report for each
|
||||
@@ -177,7 +353,7 @@ project.
|
||||
<li> Try to establish a practice where you log your work at the computerlab. You may find such a logbook very handy at later stages in your work, especially when you don't properly remember what a previous test version of your program did. Here you could also record the time spent on solving the exercise, various algorithms you may have tested or other topics which you feel worthy of mentioning.</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="___sec3" class="anchor">Format for electronic delivery of report and programs </h2>
|
||||
<h2 id="___sec14" class="anchor">Format for electronic delivery of report and programs </h2>
|
||||
|
||||
<p>
|
||||
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:
|
||||
@@ -194,7 +370,7 @@ Finally,
|
||||
we encourage you to collaborate. Optimal working groups consist of
|
||||
2-3 students. You can then hand in a common report.
|
||||
|
||||
<h2 id="___sec4" class="anchor">Software and needed installations </h2>
|
||||
<h2 id="___sec15" class="anchor">Software and needed installations </h2>
|
||||
|
||||
<p>
|
||||
If you have Python installed (we recommend Python3) and you feel pretty familiar with installing different packages,
|
||||
|
||||
@@ -6,9 +6,9 @@ Automatically generated HTML file from DocOnce source
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
|
||||
<meta name="description" content="Project 3 on Machine Learning, deadline December 10">
|
||||
<meta name="description" content="Project 3 on Machine Learning, deadline December 14">
|
||||
|
||||
<title>Project 3 on Machine Learning, deadline December 10</title>
|
||||
<title>Project 3 on Machine Learning, deadline December 14</title>
|
||||
|
||||
<!-- Bootstrap style: bootstrap -->
|
||||
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
@@ -39,15 +39,35 @@ Automatically generated HTML file from DocOnce source
|
||||
</head>
|
||||
|
||||
<!-- tocinfo
|
||||
{'highest level': 2,
|
||||
'sections': [('Premises for project 3', 2, None, '___sec0'),
|
||||
('Part a): Text to come', 3, None, '___sec1'),
|
||||
('Introduction to numerical projects', 2, None, '___sec2'),
|
||||
{'highest level': 1,
|
||||
'sections': [('Paths for project 3', 1, None, '___sec0'),
|
||||
('Defining the data sets to analyze yourself',
|
||||
2,
|
||||
None,
|
||||
'___sec1'),
|
||||
('Studying the credic card data set as possible project',
|
||||
2,
|
||||
None,
|
||||
'___sec2'),
|
||||
('Part a)', 3, None, '___sec3'),
|
||||
('Part b)', 3, None, '___sec4'),
|
||||
('Part c)', 3, None, '___sec5'),
|
||||
('Part d)', 3, None, '___sec6'),
|
||||
('Part e)', 3, None, '___sec7'),
|
||||
('Solving partial differential equations with neural networks',
|
||||
2,
|
||||
None,
|
||||
'___sec8'),
|
||||
('Part a), setting up the problem', 3, None, '___sec9'),
|
||||
('Part b)', 3, None, '___sec10'),
|
||||
('Part c) Neural networks', 3, None, '___sec11'),
|
||||
('Part d)', 3, None, '___sec12'),
|
||||
('Introduction to numerical projects', 2, None, '___sec13'),
|
||||
('Format for electronic delivery of report and programs',
|
||||
2,
|
||||
None,
|
||||
'___sec3'),
|
||||
('Software and needed installations', 2, None, '___sec4')]}
|
||||
'___sec14'),
|
||||
('Software and needed installations', 2, None, '___sec15')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -77,7 +97,7 @@ MathJax.Hub.Config({
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="Project3-bs.html">Project 3 on Machine Learning, deadline December 10</a>
|
||||
<a class="navbar-brand" href="Project3-bs.html">Project 3 on Machine Learning, deadline December 14</a>
|
||||
</div>
|
||||
|
||||
<div class="navbar-collapse collapse navbar-responsive-collapse">
|
||||
@@ -85,11 +105,22 @@ MathJax.Hub.Config({
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<!-- navigation toc: --> <li><a href="#___sec0" style="font-size: 80%;"><b>Premises for project 3</b></a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec1" style="font-size: 80%;"> Part a): Text to come</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec2" style="font-size: 80%;"><b>Introduction to numerical projects</b></a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec3" style="font-size: 80%;"><b>Format for electronic delivery of report and programs</b></a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec4" style="font-size: 80%;"><b>Software and needed installations</b></a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec0" style="font-size: 80%;"><b>Paths for project 3</b></a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec1" style="font-size: 80%;"> Defining the data sets to analyze yourself</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec2" style="font-size: 80%;"> Studying the credic card data set as possible project</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec3" style="font-size: 80%;"> Part a)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec4" style="font-size: 80%;"> Part b)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec5" style="font-size: 80%;"> Part c)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec6" style="font-size: 80%;"> Part d)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec7" style="font-size: 80%;"> Part e)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec8" style="font-size: 80%;"> Solving partial differential equations with neural networks</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec9" style="font-size: 80%;"> Part a), setting up the problem</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec10" style="font-size: 80%;"> Part b)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec11" style="font-size: 80%;"> Part c) Neural networks</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec12" style="font-size: 80%;"> Part d)</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec13" style="font-size: 80%;"> Introduction to numerical projects</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec14" style="font-size: 80%;"> Format for electronic delivery of report and programs</a></li>
|
||||
<!-- navigation toc: --> <li><a href="#___sec15" style="font-size: 80%;"> Software and needed installations</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
@@ -108,7 +139,7 @@ MathJax.Hub.Config({
|
||||
|
||||
|
||||
<div class="jumbotron">
|
||||
<center><h1>Project 3 on Machine Learning, deadline December 10</h1></center> <!-- document title -->
|
||||
<center><h1>Project 3 on Machine Learning, deadline December 14</h1></center> <!-- document title -->
|
||||
|
||||
<p>
|
||||
<!-- author(s): <a href="http://www.uio.no/studier/emner/matnat/fys/FYS3155/index-eng.html" target="_self">Data Analysis and Machine Learning FYS-STK3155/FYS4155</a> -->
|
||||
@@ -123,12 +154,14 @@ MathJax.Hub.Config({
|
||||
<center><b>Department of Physics, University of Oslo, Norway</b></center>
|
||||
<br>
|
||||
<p>
|
||||
<center><h4>Nov 12, 2018</h4></center> <!-- date -->
|
||||
<center><h4>Nov 13, 2018</h4></center> <!-- date -->
|
||||
<br>
|
||||
<p>
|
||||
</div> <!-- end jumbotron -->
|
||||
|
||||
<h2 id="___sec0" class="anchor">Premises for project 3 </h2>
|
||||
<h1 id="___sec0" class="anchor">Paths for project 3 </h1>
|
||||
|
||||
<h2 id="___sec1" class="anchor">Defining the data sets to analyze yourself </h2>
|
||||
|
||||
<p>
|
||||
For project 3, you can propose own data sets that relate to your research interests or just use existing data sets from say
|
||||
@@ -136,7 +169,8 @@ For project 3, you can propose own data sets that relate to your research intere
|
||||
<ol>
|
||||
<li> <a href="https://www.kaggle.com/datasets" target="_self">Kaggle</a></li>
|
||||
<li> The <a href="http://archive.ics.uci.edu/ml/datasets.html" target="_self">University of California at Irvine (UCI) with its machine learning repository</a></li>
|
||||
<li> The credit card data set from <a href="https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients" target="_self">UCI</a> is also interesting and links to a <a href="https://bradzzz.gitbooks.io/ga-seattle-dsi/content/dsi/dsi_05_classification_databases/2.1-lesson/assets/datasets/DefaultCreditCardClients_yeh_2009.pdf" target="_self">recent scientific article</a>.</li>
|
||||
<li> The credit card data set from <a href="https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients" target="_self">UCI</a> is also interesting and links to a <a href="https://bradzzz.gitbooks.io/ga-seattle-dsi/content/dsi/dsi_05_classification_databases/2.1-lesson/assets/datasets/DefaultCreditCardClients_yeh_2009.pdf" target="_self">recent scientific article</a>. See however below for possible project example</li>
|
||||
<li> Another interesting case is the bitcoin example discussed at the piazza link <a href="https://piazza.com/class/ji78s1cduul39a?cid=104" target="_self"><tt>https://piazza.com/class/ji78s1cduul39a?cid=104</tt></a>, read more there to see if this could of interest.</li>
|
||||
</ol>
|
||||
|
||||
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:
|
||||
@@ -144,7 +178,7 @@ The approach to the analysis of these new data sets should follow to a large ext
|
||||
<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>Support Vector Machines</b> and <b>Decision Trees and Random Forests</b>. 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.</li>
|
||||
<li> For project 3, you should feel free to use your own codes from projects 1 and 2, eventually write your own for SVMs and/or Decision trees and random forests' or use the available functionality of <b>scikit-learn</b>, <b>tensorflow</b>, 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>, cross-validation and/or bootstrap.</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>, cross-validation and/or bootstrap if these are relevant.</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>
|
||||
<li> A critical assessment of the methods with ditto perspectives and recommendations is also something you need to include.</li>
|
||||
</ol>
|
||||
@@ -157,9 +191,151 @@ We propose also an alternative to the above. This is a project on using machine
|
||||
<p>
|
||||
This is a field with a large interest recently, spanning from studies of turbulence in meteorology to the solution of quantum mechanical systems.
|
||||
|
||||
<h3 id="___sec1" class="anchor">Part a): Text to come </h3>
|
||||
<h2 id="___sec2" class="anchor">Studying the credic card data set as possible project </h2>
|
||||
|
||||
<h2 id="___sec2" class="anchor">Introduction to numerical projects </h2>
|
||||
<p>
|
||||
We include this data set as an example on how one could study new data sets with the algorithms we have discussed during the lectures, using either your own codes or the functionality of <b>scikit-learn</b>, <b>tensorflow</b> or other Python packages.
|
||||
|
||||
<p>
|
||||
The data set is presented at the site of <a href="https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients" target="_self">UCI</a>. It is particularly interesting since it is also analyzed using ML methods in a <a href="https://bradzzz.gitbooks.io/ga-seattle-dsi/content/dsi/dsi_05_classification_databases/2.1-lesson/assets/datasets/DefaultCreditCardClients_yeh_2009.pdf" target="_self">recent scientific article</a>.
|
||||
|
||||
<p>
|
||||
The authors apply several ML methods, from nearest neighbors via logistic regression to neural networks and Bayesian analysis (not covered much in our course).
|
||||
Here follows a set up on how to analyze these data.
|
||||
|
||||
<h3 id="___sec3" class="anchor">Part a) </h3>
|
||||
|
||||
The first part deals with structuring and reading the data, much along the same lines as done in projects 1 and 2.
|
||||
|
||||
<h3 id="___sec4" class="anchor">Part b) </h3>
|
||||
|
||||
<p>
|
||||
Perform a logistic regression analysis and see if you can reproduce the results of figure 3 of the above article.
|
||||
|
||||
<h3 id="___sec5" class="anchor">Part c) </h3>
|
||||
|
||||
<p>
|
||||
The next step is to use either your own code for neural networks from project 2 or the functionality provided by tensorflow/keras or scikit-learn's MLP method. Compare and discuss again your results with those from the above article.
|
||||
|
||||
<h3 id="___sec6" class="anchor">Part d) </h3>
|
||||
|
||||
<p>
|
||||
The above article does not study random forests or support vector machine algorithms. Try to apply one of these methods or both to the credit card data and see if these methods provide a better description of the data. Can you outperform the authors of the article?
|
||||
|
||||
<h3 id="___sec7" class="anchor">Part e) </h3>
|
||||
|
||||
<p>
|
||||
Finally, here you should present a critical assessment of the methods you have studied and link your results with the existing literature.
|
||||
|
||||
<h2 id="___sec8" class="anchor">Solving partial differential equations with neural networks </h2>
|
||||
|
||||
<p>
|
||||
For this variant of project 3, we will assume that you have some background in the solution of partial differential equations using 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.
|
||||
|
||||
<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/odenn/html/odenn-bs.html" target="_self">Kristine Baluka Hein</a> at this course are highly recommended.
|
||||
|
||||
<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>.
|
||||
|
||||
<h3 id="___sec9" 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 \).
|
||||
We are looking at a one-dimensional
|
||||
problem
|
||||
|
||||
$$
|
||||
\begin{equation*}
|
||||
\frac{\partial^2 u(x,t)}{\partial x^2} =\frac{\partial u(x,t)}{\partial t}, t> 0, x\in [0,L]
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
or
|
||||
|
||||
$$
|
||||
\begin{equation*}
|
||||
u_{xx} = u_t,
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
with initial conditions, i.e., the conditions at \( t=0 \),
|
||||
$$
|
||||
\begin{equation*}
|
||||
u(x,0)= \sin{(\pi x)} \hspace{0.5cm} 0 < x < L,
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
with \( L=1 \) the length of the \( x \)-region of interest. The
|
||||
boundary conditions are
|
||||
|
||||
$$
|
||||
\begin{equation*}
|
||||
u(0,t)= 0 \hspace{0.5cm} t \ge 0,
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
and
|
||||
|
||||
$$
|
||||
\begin{equation*}
|
||||
u(L,t)= 0 \hspace{0.5cm} t \ge 0.
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
The function \( u(x,t) \) can be the temperature gradient of a rod.
|
||||
As time increases, the velocity approaches a linear variation with \( x \).
|
||||
|
||||
<p>
|
||||
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
|
||||
$$
|
||||
\begin{equation*}
|
||||
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}
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
and
|
||||
|
||||
$$
|
||||
\begin{equation*}
|
||||
u_{xx}\approx \frac{u(x+\Delta x,t)-2u(x,t)+u(x-\Delta x,t)}{\Delta x^2},
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
or
|
||||
|
||||
$$
|
||||
\begin{equation*}
|
||||
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}.
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
<p>
|
||||
Write down the algorithm and the equations you need to implement.
|
||||
Find also the analytic solution to the problem.
|
||||
|
||||
<h3 id="___sec10" class="anchor">Part b) </h3>
|
||||
|
||||
<p>
|
||||
Implement the explicit scheme algorithm and perform tests of the solution
|
||||
for \( \Delta x=1/10 \), \( \Delta x=1/100 \) using \( \Delta t \) as dictated by the stability limit of the explicit scheme. This stability scheme requires that \( \Delta t/\Delta x^2 \leq 1/2 \).
|
||||
|
||||
<p>
|
||||
Study the solutions at two time points \( t_1 \) and \( t_2 \) where \( u(x,t_1) \) is smooth but still significantly curved
|
||||
and \( u(x,t_2) \) is almost linear, close to the stationary state.
|
||||
|
||||
<h3 id="___sec11" class="anchor">Part c) Neural networks </h3>
|
||||
|
||||
<p>
|
||||
Study now the lecture notes on solving ODEs and PDEs with neural network and use either your own code from project 2 or the functionality of tensorflow/keras to solve the same equation as in part b).
|
||||
Discuss your results and compare them with the standard explicit scheme. Include also the analytical solution and compare with that.
|
||||
|
||||
<h3 id="___sec12" class="anchor">Part d) </h3>
|
||||
|
||||
<p>
|
||||
Finally, present a critical assessment of the methods you have studied and discuss the potential for the solving differential equations with machine learning methods.
|
||||
|
||||
<h2 id="___sec13" class="anchor">Introduction to numerical projects </h2>
|
||||
|
||||
<p>
|
||||
Here follows a brief recipe and recommendation on how to write a report for each
|
||||
@@ -177,7 +353,7 @@ project.
|
||||
<li> Try to establish a practice where you log your work at the computerlab. You may find such a logbook very handy at later stages in your work, especially when you don't properly remember what a previous test version of your program did. Here you could also record the time spent on solving the exercise, various algorithms you may have tested or other topics which you feel worthy of mentioning.</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="___sec3" class="anchor">Format for electronic delivery of report and programs </h2>
|
||||
<h2 id="___sec14" class="anchor">Format for electronic delivery of report and programs </h2>
|
||||
|
||||
<p>
|
||||
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:
|
||||
@@ -194,7 +370,7 @@ Finally,
|
||||
we encourage you to collaborate. Optimal working groups consist of
|
||||
2-3 students. You can then hand in a common report.
|
||||
|
||||
<h2 id="___sec4" class="anchor">Software and needed installations </h2>
|
||||
<h2 id="___sec15" class="anchor">Software and needed installations </h2>
|
||||
|
||||
<p>
|
||||
If you have Python installed (we recommend Python3) and you feel pretty familiar with installing different packages,
|
||||
|
||||
@@ -6,9 +6,9 @@ Automatically generated HTML file from DocOnce source
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
|
||||
<meta name="description" content="Project 3 on Machine Learning, deadline December 10">
|
||||
<meta name="description" content="Project 3 on Machine Learning, deadline December 14">
|
||||
|
||||
<title>Project 3 on Machine Learning, deadline December 10</title>
|
||||
<title>Project 3 on Machine Learning, deadline December 14</title>
|
||||
|
||||
|
||||
<style type="text/css">
|
||||
@@ -38,15 +38,35 @@ div { text-align: justify; text-justify: inter-word; }
|
||||
</head>
|
||||
|
||||
<!-- tocinfo
|
||||
{'highest level': 2,
|
||||
'sections': [('Premises for project 3', 2, None, '___sec0'),
|
||||
('Part a): Text to come', 3, None, '___sec1'),
|
||||
('Introduction to numerical projects', 2, None, '___sec2'),
|
||||
{'highest level': 1,
|
||||
'sections': [('Paths for project 3', 1, None, '___sec0'),
|
||||
('Defining the data sets to analyze yourself',
|
||||
2,
|
||||
None,
|
||||
'___sec1'),
|
||||
('Studying the credic card data set as possible project',
|
||||
2,
|
||||
None,
|
||||
'___sec2'),
|
||||
('Part a)', 3, None, '___sec3'),
|
||||
('Part b)', 3, None, '___sec4'),
|
||||
('Part c)', 3, None, '___sec5'),
|
||||
('Part d)', 3, None, '___sec6'),
|
||||
('Part e)', 3, None, '___sec7'),
|
||||
('Solving partial differential equations with neural networks',
|
||||
2,
|
||||
None,
|
||||
'___sec8'),
|
||||
('Part a), setting up the problem', 3, None, '___sec9'),
|
||||
('Part b)', 3, None, '___sec10'),
|
||||
('Part c) Neural networks', 3, None, '___sec11'),
|
||||
('Part d)', 3, None, '___sec12'),
|
||||
('Introduction to numerical projects', 2, None, '___sec13'),
|
||||
('Format for electronic delivery of report and programs',
|
||||
2,
|
||||
None,
|
||||
'___sec3'),
|
||||
('Software and needed installations', 2, None, '___sec4')]}
|
||||
'___sec14'),
|
||||
('Software and needed installations', 2, None, '___sec15')]}
|
||||
end of tocinfo -->
|
||||
|
||||
<body>
|
||||
@@ -72,7 +92,7 @@ MathJax.Hub.Config({
|
||||
|
||||
|
||||
|
||||
<center><h1>Project 3 on Machine Learning, deadline December 10</h1></center> <!-- document title -->
|
||||
<center><h1>Project 3 on Machine Learning, deadline December 14</h1></center> <!-- document title -->
|
||||
|
||||
<p>
|
||||
<!-- author(s): <a href="http://www.uio.no/studier/emner/matnat/fys/FYS3155/index-eng.html" target="_blank">Data Analysis and Machine Learning FYS-STK3155/FYS4155</a> -->
|
||||
@@ -87,10 +107,12 @@ MathJax.Hub.Config({
|
||||
<center><b>Department of Physics, University of Oslo, Norway</b></center>
|
||||
<br>
|
||||
<p>
|
||||
<center><h4>Nov 12, 2018</h4></center> <!-- date -->
|
||||
<center><h4>Nov 13, 2018</h4></center> <!-- date -->
|
||||
<br>
|
||||
|
||||
<h2 id="___sec0">Premises for project 3 </h2>
|
||||
<h1 id="___sec0">Paths for project 3 </h1>
|
||||
|
||||
<h2 id="___sec1">Defining the data sets to analyze yourself </h2>
|
||||
|
||||
<p>
|
||||
For project 3, you can propose own data sets that relate to your research interests or just use existing data sets from say
|
||||
@@ -98,7 +120,8 @@ For project 3, you can propose own data sets that relate to your research intere
|
||||
<ol>
|
||||
<li> <a href="https://www.kaggle.com/datasets" target="_blank">Kaggle</a></li>
|
||||
<li> The <a href="http://archive.ics.uci.edu/ml/datasets.html" target="_blank">University of California at Irvine (UCI) with its machine learning repository</a></li>
|
||||
<li> The credit card data set from <a href="https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients" target="_blank">UCI</a> is also interesting and links to a <a href="https://bradzzz.gitbooks.io/ga-seattle-dsi/content/dsi/dsi_05_classification_databases/2.1-lesson/assets/datasets/DefaultCreditCardClients_yeh_2009.pdf" target="_blank">recent scientific article</a>.</li>
|
||||
<li> The credit card data set from <a href="https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients" target="_blank">UCI</a> is also interesting and links to a <a href="https://bradzzz.gitbooks.io/ga-seattle-dsi/content/dsi/dsi_05_classification_databases/2.1-lesson/assets/datasets/DefaultCreditCardClients_yeh_2009.pdf" target="_blank">recent scientific article</a>. See however below for possible project example</li>
|
||||
<li> Another interesting case is the bitcoin example discussed at the piazza link <a href="https://piazza.com/class/ji78s1cduul39a?cid=104" target="_blank"><tt>https://piazza.com/class/ji78s1cduul39a?cid=104</tt></a>, read more there to see if this could of interest.</li>
|
||||
</ol>
|
||||
|
||||
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:
|
||||
@@ -106,7 +129,7 @@ The approach to the analysis of these new data sets should follow to a large ext
|
||||
<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>Support Vector Machines</b> and <b>Decision Trees and Random Forests</b>. 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.</li>
|
||||
<li> For project 3, you should feel free to use your own codes from projects 1 and 2, eventually write your own for SVMs and/or Decision trees and random forests' or use the available functionality of <b>scikit-learn</b>, <b>tensorflow</b>, 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>, cross-validation and/or bootstrap.</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>, cross-validation and/or bootstrap if these are relevant.</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>
|
||||
<li> A critical assessment of the methods with ditto perspectives and recommendations is also something you need to include.</li>
|
||||
</ol>
|
||||
@@ -119,9 +142,151 @@ We propose also an alternative to the above. This is a project on using machine
|
||||
<p>
|
||||
This is a field with a large interest recently, spanning from studies of turbulence in meteorology to the solution of quantum mechanical systems.
|
||||
|
||||
<h3 id="___sec1">Part a): Text to come </h3>
|
||||
<h2 id="___sec2">Studying the credic card data set as possible project </h2>
|
||||
|
||||
<h2 id="___sec2">Introduction to numerical projects </h2>
|
||||
<p>
|
||||
We include this data set as an example on how one could study new data sets with the algorithms we have discussed during the lectures, using either your own codes or the functionality of <b>scikit-learn</b>, <b>tensorflow</b> or other Python packages.
|
||||
|
||||
<p>
|
||||
The data set is presented at the site of <a href="https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients" target="_blank">UCI</a>. It is particularly interesting since it is also analyzed using ML methods in a <a href="https://bradzzz.gitbooks.io/ga-seattle-dsi/content/dsi/dsi_05_classification_databases/2.1-lesson/assets/datasets/DefaultCreditCardClients_yeh_2009.pdf" target="_blank">recent scientific article</a>.
|
||||
|
||||
<p>
|
||||
The authors apply several ML methods, from nearest neighbors via logistic regression to neural networks and Bayesian analysis (not covered much in our course).
|
||||
Here follows a set up on how to analyze these data.
|
||||
|
||||
<h3 id="___sec3">Part a) </h3>
|
||||
|
||||
The first part deals with structuring and reading the data, much along the same lines as done in projects 1 and 2.
|
||||
|
||||
<h3 id="___sec4">Part b) </h3>
|
||||
|
||||
<p>
|
||||
Perform a logistic regression analysis and see if you can reproduce the results of figure 3 of the above article.
|
||||
|
||||
<h3 id="___sec5">Part c) </h3>
|
||||
|
||||
<p>
|
||||
The next step is to use either your own code for neural networks from project 2 or the functionality provided by tensorflow/keras or scikit-learn's MLP method. Compare and discuss again your results with those from the above article.
|
||||
|
||||
<h3 id="___sec6">Part d) </h3>
|
||||
|
||||
<p>
|
||||
The above article does not study random forests or support vector machine algorithms. Try to apply one of these methods or both to the credit card data and see if these methods provide a better description of the data. Can you outperform the authors of the article?
|
||||
|
||||
<h3 id="___sec7">Part e) </h3>
|
||||
|
||||
<p>
|
||||
Finally, here you should present a critical assessment of the methods you have studied and link your results with the existing literature.
|
||||
|
||||
<h2 id="___sec8">Solving partial differential equations with neural networks </h2>
|
||||
|
||||
<p>
|
||||
For this variant of project 3, we will assume that you have some background in the solution of partial differential equations using 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.
|
||||
|
||||
<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/odenn/html/odenn-bs.html" target="_blank">Kristine Baluka Hein</a> at this course are highly recommended.
|
||||
|
||||
<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>.
|
||||
|
||||
<h3 id="___sec9">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 \).
|
||||
We are looking at a one-dimensional
|
||||
problem
|
||||
|
||||
$$
|
||||
\begin{equation*}
|
||||
\frac{\partial^2 u(x,t)}{\partial x^2} =\frac{\partial u(x,t)}{\partial t}, t> 0, x\in [0,L]
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
or
|
||||
|
||||
$$
|
||||
\begin{equation*}
|
||||
u_{xx} = u_t,
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
with initial conditions, i.e., the conditions at \( t=0 \),
|
||||
$$
|
||||
\begin{equation*}
|
||||
u(x,0)= \sin{(\pi x)} \hspace{0.5cm} 0 < x < L,
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
with \( L=1 \) the length of the \( x \)-region of interest. The
|
||||
boundary conditions are
|
||||
|
||||
$$
|
||||
\begin{equation*}
|
||||
u(0,t)= 0 \hspace{0.5cm} t \ge 0,
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
and
|
||||
|
||||
$$
|
||||
\begin{equation*}
|
||||
u(L,t)= 0 \hspace{0.5cm} t \ge 0.
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
The function \( u(x,t) \) can be the temperature gradient of a rod.
|
||||
As time increases, the velocity approaches a linear variation with \( x \).
|
||||
|
||||
<p>
|
||||
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
|
||||
$$
|
||||
\begin{equation*}
|
||||
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}
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
and
|
||||
|
||||
$$
|
||||
\begin{equation*}
|
||||
u_{xx}\approx \frac{u(x+\Delta x,t)-2u(x,t)+u(x-\Delta x,t)}{\Delta x^2},
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
or
|
||||
|
||||
$$
|
||||
\begin{equation*}
|
||||
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}.
|
||||
\end{equation*}
|
||||
$$
|
||||
|
||||
<p>
|
||||
Write down the algorithm and the equations you need to implement.
|
||||
Find also the analytic solution to the problem.
|
||||
|
||||
<h3 id="___sec10">Part b) </h3>
|
||||
|
||||
<p>
|
||||
Implement the explicit scheme algorithm and perform tests of the solution
|
||||
for \( \Delta x=1/10 \), \( \Delta x=1/100 \) using \( \Delta t \) as dictated by the stability limit of the explicit scheme. This stability scheme requires that \( \Delta t/\Delta x^2 \leq 1/2 \).
|
||||
|
||||
<p>
|
||||
Study the solutions at two time points \( t_1 \) and \( t_2 \) where \( u(x,t_1) \) is smooth but still significantly curved
|
||||
and \( u(x,t_2) \) is almost linear, close to the stationary state.
|
||||
|
||||
<h3 id="___sec11">Part c) Neural networks </h3>
|
||||
|
||||
<p>
|
||||
Study now the lecture notes on solving ODEs and PDEs with neural network and use either your own code from project 2 or the functionality of tensorflow/keras to solve the same equation as in part b).
|
||||
Discuss your results and compare them with the standard explicit scheme. Include also the analytical solution and compare with that.
|
||||
|
||||
<h3 id="___sec12">Part d) </h3>
|
||||
|
||||
<p>
|
||||
Finally, present a critical assessment of the methods you have studied and discuss the potential for the solving differential equations with machine learning methods.
|
||||
|
||||
<h2 id="___sec13">Introduction to numerical projects </h2>
|
||||
|
||||
<p>
|
||||
Here follows a brief recipe and recommendation on how to write a report for each
|
||||
@@ -139,7 +304,7 @@ project.
|
||||
<li> Try to establish a practice where you log your work at the computerlab. You may find such a logbook very handy at later stages in your work, especially when you don't properly remember what a previous test version of your program did. Here you could also record the time spent on solving the exercise, various algorithms you may have tested or other topics which you feel worthy of mentioning.</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="___sec3">Format for electronic delivery of report and programs </h2>
|
||||
<h2 id="___sec14">Format for electronic delivery of report and programs </h2>
|
||||
|
||||
<p>
|
||||
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:
|
||||
@@ -156,7 +321,7 @@ Finally,
|
||||
we encourage you to collaborate. Optimal working groups consist of
|
||||
2-3 students. You can then hand in a common report.
|
||||
|
||||
<h2 id="___sec4">Software and needed installations </h2>
|
||||
<h2 id="___sec15">Software and needed installations </h2>
|
||||
|
||||
<p>
|
||||
If you have Python installed (we recommend Python3) and you feel pretty familiar with installing different packages,
|
||||
|
||||
Binary file not shown.
@@ -129,7 +129,7 @@ final, % draft: marks overfull hboxes, figures with paths
|
||||
\begin{center}
|
||||
{\LARGE\bf
|
||||
\begin{spacing}{1.25}
|
||||
Project 3 on Machine Learning, deadline December 10
|
||||
Project 3 on Machine Learning, deadline December 14
|
||||
\end{spacing}
|
||||
}
|
||||
\end{center}
|
||||
@@ -149,14 +149,16 @@ Project 3 on Machine Learning, deadline December 10
|
||||
|
||||
% --- begin date ---
|
||||
\begin{center}
|
||||
Nov 12, 2018
|
||||
Nov 13, 2018
|
||||
\end{center}
|
||||
% --- end date ---
|
||||
|
||||
\vspace{1cm}
|
||||
|
||||
|
||||
\subsection{Premises for project 3}
|
||||
\section{Paths for project 3}
|
||||
|
||||
\subsection{Defining the data sets to analyze yourself}
|
||||
|
||||
For project 3, you can propose own data sets that relate to your research interests or just use existing data sets from say
|
||||
\begin{enumerate}
|
||||
@@ -164,7 +166,9 @@ For project 3, you can propose own data sets that relate to your research intere
|
||||
|
||||
\item The \href{{http://archive.ics.uci.edu/ml/datasets.html}}{University of California at Irvine (UCI) with its machine learning repository}
|
||||
|
||||
\item The credit card data set from \href{{https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients}}{UCI} is also interesting and links to a \href{{https://bradzzz.gitbooks.io/ga-seattle-dsi/content/dsi/dsi_05_classification_databases/2.1-lesson/assets/datasets/DefaultCreditCardClients_yeh_2009.pdf}}{recent scientific article}.
|
||||
\item The credit card data set from \href{{https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients}}{UCI} is also interesting and links to a \href{{https://bradzzz.gitbooks.io/ga-seattle-dsi/content/dsi/dsi_05_classification_databases/2.1-lesson/assets/datasets/DefaultCreditCardClients_yeh_2009.pdf}}{recent scientific article}. See however below for possible project example
|
||||
|
||||
\item Another interesting case is the bitcoin example discussed at the piazza link \href{{https://piazza.com/class/ji78s1cduul39a?cid=104}}{\nolinkurl{https://piazza.com/class/ji78s1cduul39a?cid=104}}, read more there to see if this could of interest.
|
||||
\end{enumerate}
|
||||
|
||||
\noindent
|
||||
@@ -174,7 +178,7 @@ The approach to the analysis of these new data sets should follow to a large ext
|
||||
|
||||
\item For project 3, you should feel free to use your own codes from projects 1 and 2, eventually write your own for SVMs and/or Decision trees and random forests' or use the available functionality of \textbf{scikit-learn}, \textbf{tensorflow}, etc.
|
||||
|
||||
\item The estimates you used and tested in projects 1 and 2 should also be included, that is the $R2$-score, \textbf{MSE}, cross-validation and/or bootstrap.
|
||||
\item The estimates you used and tested in projects 1 and 2 should also be included, that is the $R2$-score, \textbf{MSE}, cross-validation and/or bootstrap if these are relevant.
|
||||
|
||||
\item 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?
|
||||
|
||||
@@ -188,7 +192,103 @@ We propose also an alternative to the above. This is a project on using machine
|
||||
|
||||
This is a field with a large interest recently, spanning from studies of turbulence in meteorology to the solution of quantum mechanical systems.
|
||||
|
||||
\paragraph{Part a): Text to come.}
|
||||
\subsection{Studying the credic card data set as possible project}
|
||||
|
||||
We include this data set as an example on how one could study new data sets with the algorithms we have discussed during the lectures, using either your own codes or the functionality of \textbf{scikit-learn}, \textbf{tensorflow} or other Python packages.
|
||||
|
||||
The data set is presented at the site of \href{{https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients}}{UCI}. It is particularly interesting since it is also analyzed using ML methods in a \href{{https://bradzzz.gitbooks.io/ga-seattle-dsi/content/dsi/dsi_05_classification_databases/2.1-lesson/assets/datasets/DefaultCreditCardClients_yeh_2009.pdf}}{recent scientific article}.
|
||||
|
||||
The authors apply several ML methods, from nearest neighbors via logistic regression to neural networks and Bayesian analysis (not covered much in our course).
|
||||
Here follows a set up on how to analyze these data.
|
||||
|
||||
\paragraph{Part a).}
|
||||
The first part deals with structuring and reading the data, much along the same lines as done in projects 1 and 2.
|
||||
|
||||
\paragraph{Part b).}
|
||||
Perform a logistic regression analysis and see if you can reproduce the results of figure 3 of the above article.
|
||||
|
||||
\paragraph{Part c).}
|
||||
The next step is to use either your own code for neural networks from project 2 or the functionality provided by tensorflow/keras or scikit-learn's MLP method. Compare and discuss again your results with those from the above article.
|
||||
|
||||
\paragraph{Part d).}
|
||||
The above article does not study random forests or support vector machine algorithms. Try to apply one of these methods or both to the credit card data and see if these methods provide a better description of the data. Can you outperform the authors of the article?
|
||||
|
||||
\paragraph{Part e).}
|
||||
Finally, here you should present a critical assessment of the methods you have studied and link your results with the existing literature.
|
||||
|
||||
\subsection{Solving partial differential equations with neural networks}
|
||||
|
||||
For this variant of project 3, we will assume that you have some background in the solution of partial differential equations using 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/odenn/html/odenn-bs.html}}{Kristine Baluka Hein} 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}.
|
||||
|
||||
\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$.
|
||||
We are looking at a one-dimensional
|
||||
problem
|
||||
|
||||
\begin{equation*}
|
||||
\frac{\partial^2 u(x,t)}{\partial x^2} =\frac{\partial u(x,t)}{\partial t}, t> 0, x\in [0,L]
|
||||
\end{equation*}
|
||||
or
|
||||
|
||||
\begin{equation*}
|
||||
u_{xx} = u_t,
|
||||
\end{equation*}
|
||||
with initial conditions, i.e., the conditions at $t=0$,
|
||||
\begin{equation*}
|
||||
u(x,0)= \sin{(\pi x)} \hspace{0.5cm} 0 < x < L,
|
||||
\end{equation*}
|
||||
with $L=1$ the length of the $x$-region of interest. The
|
||||
boundary conditions are
|
||||
|
||||
\begin{equation*}
|
||||
u(0,t)= 0 \hspace{0.5cm} t \ge 0,
|
||||
\end{equation*}
|
||||
and
|
||||
|
||||
\begin{equation*}
|
||||
u(L,t)= 0 \hspace{0.5cm} t \ge 0.
|
||||
\end{equation*}
|
||||
The function $u(x,t)$ can be the temperature gradient of a rod.
|
||||
As time increases, the velocity approaches a linear variation with $x$.
|
||||
|
||||
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
|
||||
\begin{equation*}
|
||||
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}
|
||||
\end{equation*}
|
||||
and
|
||||
|
||||
\begin{equation*}
|
||||
u_{xx}\approx \frac{u(x+\Delta x,t)-2u(x,t)+u(x-\Delta x,t)}{\Delta x^2},
|
||||
\end{equation*}
|
||||
or
|
||||
|
||||
\begin{equation*}
|
||||
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}.
|
||||
\end{equation*}
|
||||
|
||||
Write down the algorithm and the equations you need to implement.
|
||||
Find also the analytic solution to the problem.
|
||||
|
||||
\paragraph{Part b).}
|
||||
Implement the explicit scheme algorithm and perform tests of the solution
|
||||
for $\Delta x=1/10$, $\Delta x=1/100$ using $\Delta t$ as dictated by the stability limit of the explicit scheme. This stability scheme requires that $\Delta t/\Delta x^2 \leq 1/2$.
|
||||
|
||||
Study the solutions at two time points $t_1$ and $t_2$ where $u(x,t_1)$ is smooth but still significantly curved
|
||||
and $u(x,t_2)$ is almost linear, close to the stationary state.
|
||||
|
||||
|
||||
\paragraph{Part c) Neural networks.}
|
||||
Study now the lecture notes on solving ODEs and PDEs with neural network and use either your own code from project 2 or the functionality of tensorflow/keras to solve the same equation as in 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).}
|
||||
Finally, present a critical assessment of the methods you have studied and discuss the potential for the solving differential equations with machine learning methods.
|
||||
|
||||
|
||||
\subsection{Introduction to numerical projects}
|
||||
|
||||
Here follows a brief recipe and recommendation on how to write a report for each
|
||||
|
||||
Binary file not shown.
@@ -103,7 +103,7 @@ final, % draft: marks overfull hboxes, figures with paths
|
||||
\begin{center}
|
||||
{\LARGE\bf
|
||||
\begin{spacing}{1.25}
|
||||
Project 3 on Machine Learning, deadline December 10
|
||||
Project 3 on Machine Learning, deadline December 14
|
||||
\end{spacing}
|
||||
}
|
||||
\end{center}
|
||||
@@ -123,14 +123,16 @@ Project 3 on Machine Learning, deadline December 10
|
||||
|
||||
% --- begin date ---
|
||||
\begin{center}
|
||||
Nov 12, 2018
|
||||
Nov 13, 2018
|
||||
\end{center}
|
||||
% --- end date ---
|
||||
|
||||
\vspace{1cm}
|
||||
|
||||
|
||||
\subsection*{Premises for project 3}
|
||||
\section*{Paths for project 3}
|
||||
|
||||
\subsection*{Defining the data sets to analyze yourself}
|
||||
|
||||
For project 3, you can propose own data sets that relate to your research interests or just use existing data sets from say
|
||||
\begin{enumerate}
|
||||
@@ -138,7 +140,9 @@ For project 3, you can propose own data sets that relate to your research intere
|
||||
|
||||
\item The \href{{http://archive.ics.uci.edu/ml/datasets.html}}{University of California at Irvine (UCI) with its machine learning repository}
|
||||
|
||||
\item The credit card data set from \href{{https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients}}{UCI} is also interesting and links to a \href{{https://bradzzz.gitbooks.io/ga-seattle-dsi/content/dsi/dsi_05_classification_databases/2.1-lesson/assets/datasets/DefaultCreditCardClients_yeh_2009.pdf}}{recent scientific article}.
|
||||
\item The credit card data set from \href{{https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients}}{UCI} is also interesting and links to a \href{{https://bradzzz.gitbooks.io/ga-seattle-dsi/content/dsi/dsi_05_classification_databases/2.1-lesson/assets/datasets/DefaultCreditCardClients_yeh_2009.pdf}}{recent scientific article}. See however below for possible project example
|
||||
|
||||
\item Another interesting case is the bitcoin example discussed at the piazza link \href{{https://piazza.com/class/ji78s1cduul39a?cid=104}}{\nolinkurl{https://piazza.com/class/ji78s1cduul39a?cid=104}}, read more there to see if this could of interest.
|
||||
\end{enumerate}
|
||||
|
||||
\noindent
|
||||
@@ -148,7 +152,7 @@ The approach to the analysis of these new data sets should follow to a large ext
|
||||
|
||||
\item For project 3, you should feel free to use your own codes from projects 1 and 2, eventually write your own for SVMs and/or Decision trees and random forests' or use the available functionality of \textbf{scikit-learn}, \textbf{tensorflow}, etc.
|
||||
|
||||
\item The estimates you used and tested in projects 1 and 2 should also be included, that is the $R2$-score, \textbf{MSE}, cross-validation and/or bootstrap.
|
||||
\item The estimates you used and tested in projects 1 and 2 should also be included, that is the $R2$-score, \textbf{MSE}, cross-validation and/or bootstrap if these are relevant.
|
||||
|
||||
\item 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?
|
||||
|
||||
@@ -162,7 +166,103 @@ We propose also an alternative to the above. This is a project on using machine
|
||||
|
||||
This is a field with a large interest recently, spanning from studies of turbulence in meteorology to the solution of quantum mechanical systems.
|
||||
|
||||
\paragraph{Part a): Text to come.}
|
||||
\subsection*{Studying the credic card data set as possible project}
|
||||
|
||||
We include this data set as an example on how one could study new data sets with the algorithms we have discussed during the lectures, using either your own codes or the functionality of \textbf{scikit-learn}, \textbf{tensorflow} or other Python packages.
|
||||
|
||||
The data set is presented at the site of \href{{https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients}}{UCI}. It is particularly interesting since it is also analyzed using ML methods in a \href{{https://bradzzz.gitbooks.io/ga-seattle-dsi/content/dsi/dsi_05_classification_databases/2.1-lesson/assets/datasets/DefaultCreditCardClients_yeh_2009.pdf}}{recent scientific article}.
|
||||
|
||||
The authors apply several ML methods, from nearest neighbors via logistic regression to neural networks and Bayesian analysis (not covered much in our course).
|
||||
Here follows a set up on how to analyze these data.
|
||||
|
||||
\paragraph{Part a).}
|
||||
The first part deals with structuring and reading the data, much along the same lines as done in projects 1 and 2.
|
||||
|
||||
\paragraph{Part b).}
|
||||
Perform a logistic regression analysis and see if you can reproduce the results of figure 3 of the above article.
|
||||
|
||||
\paragraph{Part c).}
|
||||
The next step is to use either your own code for neural networks from project 2 or the functionality provided by tensorflow/keras or scikit-learn's MLP method. Compare and discuss again your results with those from the above article.
|
||||
|
||||
\paragraph{Part d).}
|
||||
The above article does not study random forests or support vector machine algorithms. Try to apply one of these methods or both to the credit card data and see if these methods provide a better description of the data. Can you outperform the authors of the article?
|
||||
|
||||
\paragraph{Part e).}
|
||||
Finally, here you should present a critical assessment of the methods you have studied and link your results with the existing literature.
|
||||
|
||||
\subsection*{Solving partial differential equations with neural networks}
|
||||
|
||||
For this variant of project 3, we will assume that you have some background in the solution of partial differential equations using 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/odenn/html/odenn-bs.html}}{Kristine Baluka Hein} 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}.
|
||||
|
||||
\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$.
|
||||
We are looking at a one-dimensional
|
||||
problem
|
||||
|
||||
\begin{equation*}
|
||||
\frac{\partial^2 u(x,t)}{\partial x^2} =\frac{\partial u(x,t)}{\partial t}, t> 0, x\in [0,L]
|
||||
\end{equation*}
|
||||
or
|
||||
|
||||
\begin{equation*}
|
||||
u_{xx} = u_t,
|
||||
\end{equation*}
|
||||
with initial conditions, i.e., the conditions at $t=0$,
|
||||
\begin{equation*}
|
||||
u(x,0)= \sin{(\pi x)} \hspace{0.5cm} 0 < x < L,
|
||||
\end{equation*}
|
||||
with $L=1$ the length of the $x$-region of interest. The
|
||||
boundary conditions are
|
||||
|
||||
\begin{equation*}
|
||||
u(0,t)= 0 \hspace{0.5cm} t \ge 0,
|
||||
\end{equation*}
|
||||
and
|
||||
|
||||
\begin{equation*}
|
||||
u(L,t)= 0 \hspace{0.5cm} t \ge 0.
|
||||
\end{equation*}
|
||||
The function $u(x,t)$ can be the temperature gradient of a rod.
|
||||
As time increases, the velocity approaches a linear variation with $x$.
|
||||
|
||||
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
|
||||
\begin{equation*}
|
||||
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}
|
||||
\end{equation*}
|
||||
and
|
||||
|
||||
\begin{equation*}
|
||||
u_{xx}\approx \frac{u(x+\Delta x,t)-2u(x,t)+u(x-\Delta x,t)}{\Delta x^2},
|
||||
\end{equation*}
|
||||
or
|
||||
|
||||
\begin{equation*}
|
||||
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}.
|
||||
\end{equation*}
|
||||
|
||||
Write down the algorithm and the equations you need to implement.
|
||||
Find also the analytic solution to the problem.
|
||||
|
||||
\paragraph{Part b).}
|
||||
Implement the explicit scheme algorithm and perform tests of the solution
|
||||
for $\Delta x=1/10$, $\Delta x=1/100$ using $\Delta t$ as dictated by the stability limit of the explicit scheme. This stability scheme requires that $\Delta t/\Delta x^2 \leq 1/2$.
|
||||
|
||||
Study the solutions at two time points $t_1$ and $t_2$ where $u(x,t_1)$ is smooth but still significantly curved
|
||||
and $u(x,t_2)$ is almost linear, close to the stationary state.
|
||||
|
||||
|
||||
\paragraph{Part c) Neural networks.}
|
||||
Study now the lecture notes on solving ODEs and PDEs with neural network and use either your own code from project 2 or the functionality of tensorflow/keras to solve the same equation as in 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).}
|
||||
Finally, present a critical assessment of the methods you have studied and discuss the potential for the solving differential equations with machine learning methods.
|
||||
|
||||
|
||||
\subsection*{Introduction to numerical projects}
|
||||
|
||||
Here follows a brief recipe and recommendation on how to write a report for each
|
||||
|
||||
@@ -1,21 +1,24 @@
|
||||
TITLE: Project 3 on Machine Learning, deadline December 10
|
||||
TITLE: Project 3 on Machine Learning, deadline December 14
|
||||
AUTHOR: "Data Analysis and Machine Learning FYS-STK3155/FYS4155":"http://www.uio.no/studier/emner/matnat/fys/FYS3155/index-eng.html" {copyright, 1999-present|CC BY-NC} at Department of Physics, University of Oslo, Norway
|
||||
DATE: today
|
||||
|
||||
|
||||
===== Premises for project 3 =====
|
||||
======= Paths for project 3 =======
|
||||
|
||||
===== Defining the data sets to analyze yourself =====
|
||||
|
||||
For project 3, you can propose own data sets that relate to your research interests or just use existing data sets from say
|
||||
o "Kaggle":"https://www.kaggle.com/datasets"
|
||||
o The "University of California at Irvine (UCI) with its machine learning repository":"http://archive.ics.uci.edu/ml/datasets.html"
|
||||
o The credit card data set from "UCI":"https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients" is also interesting and links to a "recent scientific article":"https://bradzzz.gitbooks.io/ga-seattle-dsi/content/dsi/dsi_05_classification_databases/2.1-lesson/assets/datasets/DefaultCreditCardClients_yeh_2009.pdf".
|
||||
o The credit card data set from "UCI":"https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients" is also interesting and links to a "recent scientific article":"https://bradzzz.gitbooks.io/ga-seattle-dsi/content/dsi/dsi_05_classification_databases/2.1-lesson/assets/datasets/DefaultCreditCardClients_yeh_2009.pdf". See however below for possible project example
|
||||
o Another interesting case is the bitcoin example discussed at the piazza link URL:"https://piazza.com/class/ji78s1cduul39a?cid=104", read more there to see if this could of interest.
|
||||
|
||||
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_, _Support Vector Machines_ and _Decision Trees and Random Forests_. If you wish to venture into _convolutional neural networks_ or _recurrent neural networks_, or extensions of neural networkds, feel free to do so.
|
||||
|
||||
o For project 3, you should feel free to use your own codes from projects 1 and 2, eventually write your own for SVMs and/or Decision trees and random forests' or use the available functionality of _scikit-learn_, _tensorflow_, etc.
|
||||
|
||||
o The estimates you used and tested in projects 1 and 2 should also be included, that is the $R2$-score, _MSE_, cross-validation and/or bootstrap.
|
||||
o The estimates you used and tested in projects 1 and 2 should also be included, that is the $R2$-score, _MSE_, cross-validation and/or bootstrap if these are relevant.
|
||||
|
||||
o 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?
|
||||
|
||||
@@ -27,9 +30,125 @@ We propose also an alternative to the above. This is a project on using machine
|
||||
|
||||
This is a field with a large interest recently, spanning from studies of turbulence in meteorology to the solution of quantum mechanical systems.
|
||||
|
||||
=== Part a): Text to come ===
|
||||
===== Studying the credic card data set as possible project =====
|
||||
|
||||
We include this data set as an example on how one could study new data sets with the algorithms we have discussed during the lectures, using either your own codes or the functionality of _scikit-learn_, _tensorflow_ or other Python packages.
|
||||
|
||||
The data set is presented at the site of "UCI":"https://archive.ics.uci.edu/ml/datasets/default+of+credit+card+clients". It is particularly interesting since it is also analyzed using ML methods in a "recent scientific article":"https://bradzzz.gitbooks.io/ga-seattle-dsi/content/dsi/dsi_05_classification_databases/2.1-lesson/assets/datasets/DefaultCreditCardClients_yeh_2009.pdf".
|
||||
|
||||
The authors apply several ML methods, from nearest neighbors via logistic regression to neural networks and Bayesian analysis (not covered much in our course).
|
||||
Here follows a set up on how to analyze these data.
|
||||
|
||||
=== Part a) ===
|
||||
The first part deals with structuring and reading the data, much along the same lines as done in projects 1 and 2.
|
||||
|
||||
=== Part b) ===
|
||||
|
||||
Perform a logistic regression analysis and see if you can reproduce the results of figure 3 of the above article.
|
||||
|
||||
=== Part c) ===
|
||||
|
||||
The next step is to use either your own code for neural networks from project 2 or the functionality provided by tensorflow/keras or scikit-learn's MLP method. Compare and discuss again your results with those from the above article.
|
||||
|
||||
=== Part d) ===
|
||||
|
||||
The above article does not study random forests or support vector machine algorithms. Try to apply one of these methods or both to the credit card data and see if these methods provide a better description of the data. Can you outperform the authors of the article?
|
||||
|
||||
=== Part e) ===
|
||||
|
||||
Finally, here you should present a critical assessment of the methods you have studied and link your results with the existing literature.
|
||||
|
||||
===== Solving partial differential equations with neural networks =====
|
||||
|
||||
For this variant of project 3, we will assume that you have some background in the solution of partial differential equations using 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":"https://compphysics.github.io/MachineLearning/doc/pub/odenn/html/odenn-bs.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_.
|
||||
|
||||
=== 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$.
|
||||
We are looking at a one-dimensional
|
||||
problem
|
||||
|
||||
!bt
|
||||
\begin{equation*}
|
||||
\frac{\partial^2 u(x,t)}{\partial x^2} =\frac{\partial u(x,t)}{\partial t}, t> 0, x\in [0,L]
|
||||
\end{equation*}
|
||||
!et
|
||||
or
|
||||
|
||||
!bt
|
||||
\begin{equation*}
|
||||
u_{xx} = u_t,
|
||||
\end{equation*}
|
||||
!et
|
||||
with initial conditions, i.e., the conditions at $t=0$,
|
||||
!bt
|
||||
\begin{equation*}
|
||||
u(x,0)= \sin{(\pi x)} \hspace{0.5cm} 0 < x < L,
|
||||
\end{equation*}
|
||||
!et
|
||||
with $L=1$ the length of the $x$-region of interest. The
|
||||
boundary conditions are
|
||||
|
||||
!bt
|
||||
\begin{equation*}
|
||||
u(0,t)= 0 \hspace{0.5cm} t \ge 0,
|
||||
\end{equation*}
|
||||
!et
|
||||
and
|
||||
|
||||
!bt
|
||||
\begin{equation*}
|
||||
u(L,t)= 0 \hspace{0.5cm} t \ge 0.
|
||||
\end{equation*}
|
||||
!et
|
||||
The function $u(x,t)$ can be the temperature gradient of a rod.
|
||||
As time increases, the velocity approaches a linear variation with $x$.
|
||||
|
||||
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
|
||||
!bt
|
||||
\begin{equation*}
|
||||
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}
|
||||
\end{equation*}
|
||||
!et
|
||||
and
|
||||
|
||||
!bt
|
||||
\begin{equation*}
|
||||
u_{xx}\approx \frac{u(x+\Delta x,t)-2u(x,t)+u(x-\Delta x,t)}{\Delta x^2},
|
||||
\end{equation*}
|
||||
!et
|
||||
or
|
||||
|
||||
!bt
|
||||
\begin{equation*}
|
||||
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}.
|
||||
\end{equation*}
|
||||
!et
|
||||
|
||||
Write down the algorithm and the equations you need to implement.
|
||||
Find also the analytic solution to the problem.
|
||||
|
||||
=== Part b) ===
|
||||
|
||||
Implement the explicit scheme algorithm and perform tests of the solution
|
||||
for $\Delta x=1/10$, $\Delta x=1/100$ using $\Delta t$ as dictated by the stability limit of the explicit scheme. This stability scheme requires that $\Delta t/\Delta x^2 \leq 1/2$.
|
||||
|
||||
Study the solutions at two time points $t_1$ and $t_2$ where $u(x,t_1)$ is smooth but still significantly curved
|
||||
and $u(x,t_2)$ is almost linear, close to the stationary state.
|
||||
|
||||
|
||||
=== Part c) Neural networks ===
|
||||
|
||||
Study now the lecture notes on solving ODEs and PDEs with neural network and use either your own code from project 2 or the functionality of tensorflow/keras to solve the same equation as in part b).
|
||||
Discuss your results and compare them with the standard explicit scheme. Include also the analytical solution and compare with that.
|
||||
|
||||
=== Part d) ===
|
||||
|
||||
Finally, present a critical assessment of the methods you have studied and discuss the potential for the solving differential equations with machine learning methods.
|
||||
|
||||
|
||||
===== Introduction to numerical projects =====
|
||||
|
||||
Reference in New Issue
Block a user