Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Erik Strand
nmm_2020_site
Commits
1817db9e
Commit
1817db9e
authored
May 07, 2020
by
Erik Strand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update writeup
parent
9a174bad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
_code/pset_11/cwm.py
_code/pset_11/cwm.py
+1
-1
_psets/11.md
_psets/11.md
+5
-1
No files found.
_code/pset_11/cwm.py
View file @
1817db9e
...
...
@@ -139,8 +139,8 @@ def em_step():
predicted
=
np
.
array
([
cluster_func
(
x
[
n
],
m
)
for
n
in
range
(
N
)])
out_var
[
m
]
=
cw_expectation
((
y
-
predicted
)
**
2.0
,
m
)
+
tiny
make_plot
(
plot_name
(
0
))
print_everything
()
make_plot
(
plot_name
(
0
))
for
i
in
range
(
50
):
em_step
()
make_plot
(
plot_name
(
i
+
1
))
...
...
_psets/11.md
View file @
1817db9e
...
...
@@ -14,8 +14,12 @@ during the EM iterations.
My code lives
[
here
](
https://gitlab.cba.mit.edu/erik/nmm_2020_site/-/tree/master/_code/pset_11
)
.
Here's a video of the convergence progress with three clusters.
Here's a video of 50 EM iterations with three clusters. I'm displaying the local linear models over
a $$4
\s
igma$$ range. (I don't indicate the output variance in any way, would be nice to add this.)
<video
width=
"480"
height=
"320"
controls=
"controls"
muted
plays-inline
>
<source
type=
"video/mp4"
src=
"../assets/mp4/11_cwm.mp4"
>
</video>
Not surprisingly, for tanh three clusters seems to work best. Any less and the fit degrades, any
more and some clusters end up with needlessly similar local models.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment