update week43

This commit is contained in:
Morten Hjorth-Jensen
2022-10-22 22:48:50 +02:00
parent 053299ab07
commit dc15672951
7 changed files with 228 additions and 390 deletions
+6 -103
View File
@@ -8,8 +8,7 @@ doconce format html week43.do.txt --html_style=bootstrap --pygments_html_style=d
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/doconce/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 43: Deep Learning: Recurrent Neural Networks and other Deep Learning Methods. Principal Component analysis">
<title>Week 43: Deep Learning: Recurrent Neural Networks and other Deep Learning Methods. Principal Component analysis</title>
<title></title>
<!-- Bootstrap style: bootstrap -->
<!-- doconce format html week43.do.txt --html_style=bootstrap --pygments_html_style=default --html_admon=bootstrap_panel --html_output=week43-bs --no_mako -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
@@ -38,10 +37,6 @@ doconce format html week43.do.txt --html_style=bootstrap --pygments_html_style=d
{'highest level': 2,
'sections': [('Plans for week 43', 2, None, 'plans-for-week-43'),
('Reading Recommendations', 2, None, 'reading-recommendations'),
('Summary on Deep Learning Methods',
2,
None,
'summary-on-deep-learning-methods'),
('CNNs in brief', 2, None, 'cnns-in-brief'),
('Recurrent neural networks: Overarching view',
2,
@@ -169,93 +164,10 @@ MathJax.Hub.Config({
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week43-bs.html">Week 43: Deep Learning: Recurrent Neural Networks and other Deep Learning Methods. Principal Component analysis</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="#plans-for-week-43" style="font-size: 80%;"><b>Plans for week 43</b></a></li>
<!-- navigation toc: --> <li><a href="#reading-recommendations" style="font-size: 80%;"><b>Reading Recommendations</b></a></li>
<!-- navigation toc: --> <li><a href="#summary-on-deep-learning-methods" style="font-size: 80%;"><b>Summary on Deep Learning Methods</b></a></li>
<!-- navigation toc: --> <li><a href="#cnns-in-brief" style="font-size: 80%;"><b>CNNs in brief</b></a></li>
<!-- navigation toc: --> <li><a href="#recurrent-neural-networks-overarching-view" style="font-size: 80%;"><b>Recurrent neural networks: Overarching view</b></a></li>
<!-- navigation toc: --> <li><a href="#set-up-of-an-rnn" style="font-size: 80%;"><b>Set up of an RNN</b></a></li>
<!-- navigation toc: --> <li><a href="#a-simple-example" style="font-size: 80%;"><b>A simple example</b></a></li>
<!-- navigation toc: --> <li><a href="#an-extrapolation-example" style="font-size: 80%;"><b>An extrapolation example</b></a></li>
<!-- navigation toc: --> <li><a href="#formatting-the-data" style="font-size: 80%;"><b>Formatting the Data</b></a></li>
<!-- navigation toc: --> <li><a href="#predicting-new-points-with-a-trained-recurrent-neural-network" style="font-size: 80%;"><b>Predicting New Points With A Trained Recurrent Neural Network</b></a></li>
<!-- navigation toc: --> <li><a href="#other-things-to-try" style="font-size: 80%;"><b>Other Things to Try</b></a></li>
<!-- navigation toc: --> <li><a href="#other-types-of-recurrent-neural-networks" style="font-size: 80%;"><b>Other Types of Recurrent Neural Networks</b></a></li>
<!-- navigation toc: --> <li><a href="#generative-models" style="font-size: 80%;"><b>Generative Models</b></a></li>
<!-- navigation toc: --> <li><a href="#generative-adversarial-networks" style="font-size: 80%;"><b>Generative Adversarial Networks</b></a></li>
<!-- navigation toc: --> <li><a href="#discriminator" style="font-size: 80%;"><b>Discriminator</b></a></li>
<!-- navigation toc: --> <li><a href="#learning-process" style="font-size: 80%;"><b>Learning Process</b></a></li>
<!-- navigation toc: --> <li><a href="#more-about-the-learning-process" style="font-size: 80%;"><b>More about the Learning Process</b></a></li>
<!-- navigation toc: --> <li><a href="#additional-references" style="font-size: 80%;"><b>Additional References</b></a></li>
<!-- navigation toc: --> <li><a href="#writing-our-first-generative-adversarial-network" style="font-size: 80%;"><b>Writing Our First Generative Adversarial Network</b></a></li>
<!-- navigation toc: --> <li><a href="#mnist-and-gans" style="font-size: 80%;"><b>MNIST and GANs</b></a></li>
<!-- navigation toc: --> <li><a href="#other-models" style="font-size: 80%;"><b>Other Models</b></a></li>
<!-- navigation toc: --> <li><a href="#training-step" style="font-size: 80%;"><b>Training Step</b></a></li>
<!-- navigation toc: --> <li><a href="#checkpoints" style="font-size: 80%;"><b>Checkpoints</b></a></li>
<!-- navigation toc: --> <li><a href="#exploring-the-latent-space" style="font-size: 80%;"><b>Exploring the Latent Space</b></a></li>
<!-- navigation toc: --> <li><a href="#getting-results" style="font-size: 80%;"><b>Getting Results</b></a></li>
<!-- navigation toc: --> <li><a href="#interpolating-between-mnist-digits" style="font-size: 80%;"><b>Interpolating Between MNIST Digits</b></a></li>
<!-- navigation toc: --> <li><a href="#basic-ideas-of-the-principal-component-analysis-pca" style="font-size: 80%;"><b>Basic ideas of the Principal Component Analysis (PCA)</b></a></li>
<!-- navigation toc: --> <li><a href="#introducing-the-covariance-and-correlation-functions" style="font-size: 80%;"><b>Introducing the Covariance and Correlation functions</b></a></li>
<!-- navigation toc: --> <li><a href="#more-on-the-covariance" style="font-size: 80%;"><b>More on the covariance</b></a></li>
<!-- navigation toc: --> <li><a href="#reminding-ourselves-about-linear-regression" style="font-size: 80%;"><b>Reminding ourselves about Linear Regression</b></a></li>
<!-- navigation toc: --> <li><a href="#simple-example" style="font-size: 80%;"><b>Simple Example</b></a></li>
<!-- navigation toc: --> <li><a href="#the-correlation-matrix" style="font-size: 80%;"><b>The Correlation Matrix</b></a></li>
<!-- navigation toc: --> <li><a href="#numpy-functionality" style="font-size: 80%;"><b>Numpy Functionality</b></a></li>
<!-- navigation toc: --> <li><a href="#correlation-matrix-again" style="font-size: 80%;"><b>Correlation Matrix again</b></a></li>
<!-- navigation toc: --> <li><a href="#using-pandas" style="font-size: 80%;"><b>Using Pandas</b></a></li>
<!-- navigation toc: --> <li><a href="#and-then-the-franke-function" style="font-size: 80%;"><b>And then the Franke Function</b></a></li>
<!-- navigation toc: --> <li><a href="#lnks-with-the-design-matrix" style="font-size: 80%;"><b>Lnks with the Design Matrix</b></a></li>
<!-- navigation toc: --> <li><a href="#computing-the-expectation-values" style="font-size: 80%;"><b>Computing the Expectation Values</b></a></li>
<!-- navigation toc: --> <li><a href="#towards-the-pca-theorem" style="font-size: 80%;"><b>Towards the PCA theorem</b></a></li>
<!-- navigation toc: --> <li><a href="#more-on-the-pca-theorem" style="font-size: 80%;"><b>More on the PCA Theorem</b></a></li>
<!-- navigation toc: --> <li><a href="#the-algorithm-before-the-theorem" style="font-size: 80%;"><b>The Algorithm before the Theorem</b></a></li>
<!-- navigation toc: --> <li><a href="#writing-our-own-pca-code" style="font-size: 80%;"><b>Writing our own PCA code</b></a></li>
<!-- navigation toc: --> <li><a href="#implementing-it" style="font-size: 80%;"><b>Implementing it</b></a></li>
<!-- navigation toc: --> <li><a href="#first-step" style="font-size: 80%;"><b>First Step</b></a></li>
<!-- navigation toc: --> <li><a href="#scaling" style="font-size: 80%;"><b>Scaling</b></a></li>
<!-- navigation toc: --> <li><a href="#centered-data" style="font-size: 80%;"><b>Centered Data</b></a></li>
<!-- navigation toc: --> <li><a href="#exploring" style="font-size: 80%;"><b>Exploring</b></a></li>
<!-- navigation toc: --> <li><a href="#diagonalize-the-sample-covariance-matrix-to-obtain-the-principal-components" style="font-size: 80%;"><b>Diagonalize the sample covariance matrix to obtain the principal components</b></a></li>
<!-- navigation toc: --> <li><a href="#collecting-all-steps" style="font-size: 80%;"><b>Collecting all Steps</b></a></li>
<!-- navigation toc: --> <li><a href="#classical-pca-theorem" style="font-size: 80%;"><b>Classical PCA Theorem</b></a></li>
<!-- navigation toc: --> <li><a href="#the-pca-theorem" style="font-size: 80%;"><b>The PCA Theorem</b></a></li>
<!-- navigation toc: --> <li><a href="#geometric-interpretation-and-link-with-singular-value-decomposition" style="font-size: 80%;"><b>Geometric Interpretation and link with Singular Value Decomposition</b></a></li>
<!-- navigation toc: --> <li><a href="#pca-and-scikit-learn" style="font-size: 80%;"><b>PCA and scikit-learn</b></a></li>
<!-- navigation toc: --> <li><a href="#back-to-the-cancer-data" style="font-size: 80%;"><b>Back to the Cancer Data</b></a></li>
<!-- navigation toc: --> <li><a href="#incremental-pca" style="font-size: 80%;"><b>Incremental PCA</b></a></li>
<!-- navigation toc: --> <li><a href="#randomized-pca" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Randomized PCA</a></li>
<!-- navigation toc: --> <li><a href="#kernel-pca" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Kernel PCA</a></li>
<!-- navigation toc: --> <li><a href="#other-techniques" style="font-size: 80%;"><b>Other techniques</b></a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<!-- ------------------- main content ---------------------- -->
<div class="jumbotron">
<center>
<h1>Week 43: Deep Learning: Recurrent Neural Networks and other Deep Learning Methods. Principal Component analysis</h1>
</center> <!-- document title -->
<p>ATITLE: Week 43: Deep Learning: Recurrent Neural Networks and other Deep Learning Methods. Principal Component analysis
<!-- author(s): Morten Hjorth-Jensen -->
<center>
@@ -270,19 +182,17 @@ MathJax.Hub.Config({
</center>
<br>
<center>
<h4>Aug 23, 2022</h4>
<h4>Oct 22, 2022</h4>
</center> <!-- date -->
<br>
<!-- potential-jumbotron-button -->
</div> <!-- end jumbotron -->
</p>
<!-- !split -->
<h2 id="plans-for-week-43" class="anchor">Plans for week 43 </h2>
<ul>
<li> Thursday: Summary of Convolutional Neural Networks from week 42 and Recurrent Neural Networks</li>
<li> Friday: Recurrent Neural Networks and other Deep Learning methods such as Generalized Adversarial Neural Networks. Start discussing Principal component analysis</li>
<li> Thursday: Convolutional Neural Networks, basic elements and</li>
<li> Friday: Recurrent Neural Networks and other Deep, Generalized Adversarial Neural Networ and autoencoders</li>
</ul>
<div class="panel panel-default">
<div class="panel-body">
@@ -314,13 +224,6 @@ MathJax.Hub.Config({
<li> Goodfellow et al, chapter 10 on Recurrent NNs, chapters 11 and 12 on various practicalities around deep learning are also recommended.</li>
<li> Aurelien Geron, chapter 14 on RNNs.</li>
</ul>
<!-- !split -->
<h2 id="summary-on-deep-learning-methods" class="anchor">Summary on Deep Learning Methods </h2>
<p>We have studied fully connected neural networks (also called artifical nueral networks) and convolutional neural networks (CNNs).</p>
<p>The first type of deep learning networks work very well on homogeneous and structured input data while CCNs are normally tailored to recognizing images.</p>
<!-- !split -->
<h2 id="cnns-in-brief" class="anchor">CNNs in brief </h2>
+6 -16
View File
@@ -9,8 +9,7 @@ doconce format html week43-reveal.html week43-reveal reveal --html_slide_theme=b
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/doconce/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 43: Deep Learning: Recurrent Neural Networks and other Deep Learning Methods. Principal Component analysis">
<title>Week 43: Deep Learning: Recurrent Neural Networks and other Deep Learning Methods. Principal Component analysis</title>
<title></title>
<!-- reveal.js: https://lab.hakim.se/reveal-js/ -->
@@ -167,9 +166,7 @@ MathJax.Hub.Config({
<section>
<!-- ------------------- main content ---------------------- -->
<center>
<h1 style="text-align: center;">Week 43: Deep Learning: Recurrent Neural Networks and other Deep Learning Methods. Principal Component analysis</h1>
</center> <!-- document title -->
<p>ATITLE: Week 43: Deep Learning: Recurrent Neural Networks and other Deep Learning Methods. Principal Component analysis
<!-- author(s): Morten Hjorth-Jensen -->
<center>
@@ -184,9 +181,10 @@ MathJax.Hub.Config({
</center>
<br>
<center>
<h4>Aug 23, 2022</h4>
<h4>Oct 22, 2022</h4>
</center> <!-- date -->
<br>
</p>
<center style="font-size:80%">
@@ -198,8 +196,8 @@ MathJax.Hub.Config({
<h2 id="plans-for-week-43">Plans for week 43 </h2>
<ul>
<p><li> Thursday: Summary of Convolutional Neural Networks from week 42 and Recurrent Neural Networks</li>
<p><li> Friday: Recurrent Neural Networks and other Deep Learning methods such as Generalized Adversarial Neural Networks. Start discussing Principal component analysis</li>
<p><li> Thursday: Convolutional Neural Networks, basic elements and</li>
<p><li> Friday: Recurrent Neural Networks and other Deep, Generalized Adversarial Neural Networ and autoencoders</li>
</ul>
<p>
<div class="alert alert-block alert-block alert-text-normal">
@@ -232,14 +230,6 @@ MathJax.Hub.Config({
</ul>
</section>
<section>
<h2 id="summary-on-deep-learning-methods">Summary on Deep Learning Methods </h2>
<p>We have studied fully connected neural networks (also called artifical nueral networks) and convolutional neural networks (CNNs).</p>
<p>The first type of deep learning networks work very well on homogeneous and structured input data while CCNs are normally tailored to recognizing images.</p>
</section>
<section>
<h2 id="cnns-in-brief">CNNs in brief </h2>
+6 -19
View File
@@ -8,8 +8,7 @@ doconce format html week43.do.txt --pygments_html_style=perldoc --html_style=sol
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/doconce/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 43: Deep Learning: Recurrent Neural Networks and other Deep Learning Methods. Principal Component analysis">
<title>Week 43: Deep Learning: Recurrent Neural Networks and other Deep Learning Methods. Principal Component analysis</title>
<title></title>
<link href="https://cdn.rawgit.com/doconce/doconce/master/bundled/html_styles/style_solarized_box/css/solarized_light_code.css" rel="stylesheet" type="text/css" title="light"/>
<script src="https://cdn.rawgit.com/doconce/doconce/master/bundled/html_styles/style_solarized_box/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
@@ -65,10 +64,6 @@ div.toc p,a {
{'highest level': 2,
'sections': [('Plans for week 43', 2, None, 'plans-for-week-43'),
('Reading Recommendations', 2, None, 'reading-recommendations'),
('Summary on Deep Learning Methods',
2,
None,
'summary-on-deep-learning-methods'),
('CNNs in brief', 2, None, 'cnns-in-brief'),
('Recurrent neural networks: Overarching view',
2,
@@ -197,9 +192,7 @@ MathJax.Hub.Config({
<!-- ------------------- main content ---------------------- -->
<center>
<h1>Week 43: Deep Learning: Recurrent Neural Networks and other Deep Learning Methods. Principal Component analysis</h1>
</center> <!-- document title -->
<p>ATITLE: Week 43: Deep Learning: Recurrent Neural Networks and other Deep Learning Methods. Principal Component analysis
<!-- author(s): Morten Hjorth-Jensen -->
<center>
@@ -214,16 +207,17 @@ MathJax.Hub.Config({
</center>
<br>
<center>
<h4>Aug 23, 2022</h4>
<h4>Oct 22, 2022</h4>
</center> <!-- date -->
<br>
</p>
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
<h2 id="plans-for-week-43">Plans for week 43 </h2>
<ul>
<li> Thursday: Summary of Convolutional Neural Networks from week 42 and Recurrent Neural Networks</li>
<li> Friday: Recurrent Neural Networks and other Deep Learning methods such as Generalized Adversarial Neural Networks. Start discussing Principal component analysis</li>
<li> Thursday: Convolutional Neural Networks, basic elements and</li>
<li> Friday: Recurrent Neural Networks and other Deep, Generalized Adversarial Neural Networ and autoencoders</li>
</ul>
<div class="alert alert-block alert-block alert-text-normal">
<b>Excellent lectures on CNNs and RNNs</b>
@@ -253,13 +247,6 @@ MathJax.Hub.Config({
<li> Goodfellow et al, chapter 10 on Recurrent NNs, chapters 11 and 12 on various practicalities around deep learning are also recommended.</li>
<li> Aurelien Geron, chapter 14 on RNNs.</li>
</ul>
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
<h2 id="summary-on-deep-learning-methods">Summary on Deep Learning Methods </h2>
<p>We have studied fully connected neural networks (also called artifical nueral networks) and convolutional neural networks (CNNs).</p>
<p>The first type of deep learning networks work very well on homogeneous and structured input data while CCNs are normally tailored to recognizing images.</p>
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
<h2 id="cnns-in-brief">CNNs in brief </h2>
+6 -19
View File
@@ -8,8 +8,7 @@ doconce format html week43.do.txt --pygments_html_style=default --html_style=blo
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/doconce/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 43: Deep Learning: Recurrent Neural Networks and other Deep Learning Methods. Principal Component analysis">
<title>Week 43: Deep Learning: Recurrent Neural Networks and other Deep Learning Methods. Principal Component analysis</title>
<title></title>
<style type="text/css">
/* bloodish style */
body {
@@ -142,10 +141,6 @@ div.toc p,a {
{'highest level': 2,
'sections': [('Plans for week 43', 2, None, 'plans-for-week-43'),
('Reading Recommendations', 2, None, 'reading-recommendations'),
('Summary on Deep Learning Methods',
2,
None,
'summary-on-deep-learning-methods'),
('CNNs in brief', 2, None, 'cnns-in-brief'),
('Recurrent neural networks: Overarching view',
2,
@@ -274,9 +269,7 @@ MathJax.Hub.Config({
<!-- ------------------- main content ---------------------- -->
<center>
<h1>Week 43: Deep Learning: Recurrent Neural Networks and other Deep Learning Methods. Principal Component analysis</h1>
</center> <!-- document title -->
<p>ATITLE: Week 43: Deep Learning: Recurrent Neural Networks and other Deep Learning Methods. Principal Component analysis
<!-- author(s): Morten Hjorth-Jensen -->
<center>
@@ -291,16 +284,17 @@ MathJax.Hub.Config({
</center>
<br>
<center>
<h4>Aug 23, 2022</h4>
<h4>Oct 22, 2022</h4>
</center> <!-- date -->
<br>
</p>
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
<h2 id="plans-for-week-43">Plans for week 43 </h2>
<ul>
<li> Thursday: Summary of Convolutional Neural Networks from week 42 and Recurrent Neural Networks</li>
<li> Friday: Recurrent Neural Networks and other Deep Learning methods such as Generalized Adversarial Neural Networks. Start discussing Principal component analysis</li>
<li> Thursday: Convolutional Neural Networks, basic elements and</li>
<li> Friday: Recurrent Neural Networks and other Deep, Generalized Adversarial Neural Networ and autoencoders</li>
</ul>
<div class="alert alert-block alert-block alert-text-normal">
<b>Excellent lectures on CNNs and RNNs</b>
@@ -330,13 +324,6 @@ MathJax.Hub.Config({
<li> Goodfellow et al, chapter 10 on Recurrent NNs, chapters 11 and 12 on various practicalities around deep learning are also recommended.</li>
<li> Aurelien Geron, chapter 14 on RNNs.</li>
</ul>
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
<h2 id="summary-on-deep-learning-methods">Summary on Deep Learning Methods </h2>
<p>We have studied fully connected neural networks (also called artifical nueral networks) and convolutional neural networks (CNNs).</p>
<p>The first type of deep learning networks work very well on homogeneous and structured input data while CCNs are normally tailored to recognizing images.</p>
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
<h2 id="cnns-in-brief">CNNs in brief </h2>
Binary file not shown.
File diff suppressed because it is too large Load Diff
+3 -9
View File
@@ -1,12 +1,12 @@
TITLE: Week 43: Deep Learning: Recurrent Neural Networks and other Deep Learning Methods. Principal Component analysis
ATITLE: Week 43: Deep Learning: Recurrent Neural Networks and other Deep Learning Methods. Principal Component analysis
AUTHOR: Morten Hjorth-Jensen {copyright, 1999-present|CC BY-NC} at Department of Physics, University of Oslo & Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University
DATE: today
!split
===== Plans for week 43 =====
* Thursday: Summary of Convolutional Neural Networks from week 42 and Recurrent Neural Networks
* Friday: Recurrent Neural Networks and other Deep Learning methods such as Generalized Adversarial Neural Networks. Start discussing Principal component analysis
* Thursday: Convolutional Neural Networks, basic elements and
* Friday: Recurrent Neural Networks and other Deep, Generalized Adversarial Neural Networ and autoencoders
@@ -29,12 +29,6 @@ DATE: today
* Aurelien Geron, chapter 14 on RNNs.
!split
===== Summary on Deep Learning Methods =====
We have studied fully connected neural networks (also called artifical nueral networks) and convolutional neural networks (CNNs).
The first type of deep learning networks work very well on homogeneous and structured input data while CCNs are normally tailored to recognizing images.
!split
===== CNNs in brief =====