Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
online_learning
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Reto Christen
online_learning
Commits
96bbb9ee
Commit
96bbb9ee
authored
3 years ago
by
JuanPi Carbajal
Browse files
Options
Downloads
Patches
Plain Diff
session 1: iterated map applets
parent
6e505ddb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lectures_beamer/S1E1_Modelling.tex
+38
-2
38 additions, 2 deletions
lectures_beamer/S1E1_Modelling.tex
mfiles/s_iterated_map1D.m
+50
-0
50 additions, 0 deletions
mfiles/s_iterated_map1D.m
mfiles/s_iterated_map2D.m
+67
-0
67 additions, 0 deletions
mfiles/s_iterated_map2D.m
with
155 additions
and
2 deletions
lectures_beamer/S1E1_Modelling.tex
+
38
−
2
View file @
96bbb9ee
...
...
@@ -52,13 +52,49 @@
}
\end{frame}
\begin{frame}
{
Filtering and smoothing
}
\end{frame}
\begin{frame}
{
Bayesian inference
}
Overview of the bayesian setup: prior, model, posterior
\end{frame}
\begin{frame}
{
Representing our understading of the process
}
Explain what types of models we can use w
e
the tools we are going to learn
Explain what types of models we can use w
ith
the tools we are going to learn
\end{frame}
\interludeframe
{
\textbf
{
\large
Coffee break: 20 minutes
}}
\section
{
Iterated maps
}
\begin{frame}
{
1D Example
}
\only
<1>
{
\[
x
_
k
=
x
_{
k
-
1
}
\]
}
\only
<2>
{
\[
x
_
k
=
x
_{
k
-
1
}
+
\epsilon
\quad
\epsilon
\gaussian
(
0
,
\sigma
^
2
)
\]
}
\end{frame}
\begin{frame}
{
2D Example
}
\only
<1>
{
\begin{align*}
\bm
{
x
}_
k = A
\bm
{
x
}_{
k-1
}
\\
A =
\alpha
\begin{bmatrix}
0
&
-1
\\
1
&
0
\end{bmatrix}
\quad
0 <
\alpha
< 1
\end{align*}
}
\only
<2>
{
\begin{align*}
\bm
{
x
}_
k = A
\bm
{
x
}_{
k-1
}
+
\begin{bmatrix}
0
\\
\epsilon
\end{bmatrix}
\quad
\epsilon
\gaussian
(0,
\sigma
^
2)
\\
A =
\alpha
\begin{bmatrix}
0
&
-1
\\
1
&
0
\end{bmatrix}
\quad
0 <
\alpha
< 1
\end{align*}
}
\end{frame}
\section
{
Ordinary differential equations
}
...
...
@@ -70,7 +106,7 @@
\section
{
Gaussian Distribution
}
% Gaussian distribution in 1D
% Gaussian distribution in 2D
% Gaussian distribution in 2D
: applet
% Gaussian distribution in more dimensions
% Linear transformation in 1D: analytic and visual
% Nonlinear transformation in 1D: visual
...
...
This diff is collapsed.
Click to expand it.
mfiles/s_iterated_map1D.m
0 → 100644
+
50
−
0
View file @
96bbb9ee
## Copyright (C) 2021 - Juan Pablo Carbajal
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see
<http:
//
www.gnu.org
/
licenses
/>
.
## Author: Juan Pablo Carbajal
<ajuanpi
+
dev
@
gmail.com
>
pkg load statistics
noise_std = 0.0;
steps = 200;
x0 = 0;
replicas = 10;
function y = map(x, sd=0)
y = x + normrnd(0, sd);
endfunction
figure()
for rep=1:replicas
x = zeros(steps+1, 1);
x(1) = x0;
for i=2:steps+1
x(i) = map(x(i-1), noise_std);
endfor
hold on;
plot(x, 'o', 'markersize', 2)
endfor
grid
xlabel('iteration')
ylabel('x')
axis tight
This diff is collapsed.
Click to expand it.
mfiles/s_iterated_map2D.m
0 → 100644
+
67
−
0
View file @
96bbb9ee
## Copyright (C) 2021 - Juan Pablo Carbajal
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see
<http:
//
www.gnu.org
/
licenses
/>
.
## Author: Juan Pablo Carbajal
<ajuanpi
+
dev
@
gmail.com
>
pkg load statistics
noise_std = 0.01;
steps = 200;
x0 = [0 0.1];
replicas = 3;
function y = map(x, sd=0)
A = [0 -1; 1 0] * 0.05;
y = x + x * A;
y(2) += normrnd(0, sd);
endfunction
figure ()
ax1 = subplot (2, 2, [2, 4]);
axis(ax1, "equal")
hold(ax1, 'on')
ax2 = subplot (2, 2, 1);
hold(ax2, 'on')
ax3 = subplot (2, 2, 3);
hold(ax3, 'on')
for rep = 1:replicas
x = zeros(steps+1, 2);
x(1, :) = x0;
for i=2:steps+1
x(i, :) = map (x(i-1, :), noise_std);
endfor
plot(ax1, x(:,1), x(:,2), 'o', 'markersize', 2)
plot(ax2, x(:,1), 'o', 'markersize', 2)
plot(ax3, x(:,2), 'o', 'markersize', 2)
endfor
grid(ax1)
grid(ax2)
grid(ax3)
xlabel(ax1, 'x_1')
ylabel(ax1, 'x_2')
ylabel(ax2, 'x_1')
xlabel(ax3, 'iteration')
ylabel(ax3, 'x_2')
axis(ax1, "tight")
axis(ax2, "tight")
axis(ax3, "tight")
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment