text stringlengths 16 3.88k | source stringlengths 60 201 |
|---|---|
F E b
(cid:71)
U
d
dt
, we have
(cid:74)(cid:71)
(cid:74)(cid:71)
F
U
= Λ +
which is a set of Uncoupled ODEs!
SMA-HPC ©2002 NUS
12
Stability Analysis
Coupled ODEs to
Uncoupled ODEs
Expanding yields
dU
1
dt
dU
2
dt
dU
j
dt
U
λ=
1
1
+
F
1
U
λ=
2
2 F
+
2
U
λ=
j
j F
+
j
dU
1
N
λ−
= ... | https://ocw.mit.edu/courses/16-920j-numerical-methods-for-partial-differential-equations-sma-5212-spring-2003/5350b98a660c073d845f9128a3851a8b_lec5.pdf |
1
1
t
λ
c e
2
2
where
Particular (steady-state)
solution
t
λ
c e
j
j
λ
c e
N
N
1
−
t
1
−
T
14
SMA-HPC ©2002 NUS
Stability Analysis
Stability Criterion
We can think of the solution to the semi-discretized problem
(cid:74)(cid:74)(cid:74)(cid:74)(cid:71)
(cid:71)
t
λ
u E ce
(cid:71)
1
−
E... | https://ocw.mit.edu/courses/16-920j-numerical-methods-for-partial-differential-equations-sma-5212-spring-2003/5350b98a660c073d845f9128a3851a8b_lec5.pdf |
-integration scheme
(yet to be introduced) as a function of the eigenvalues λof
the space-discretization operators.
This analysis provides a general technique for the
determination of time integration methods which lead to
stable algorithms for a given space discretization.
SMA-HPC ©2002 NUS
17
Example 1
Cont... | https://ocw.mit.edu/courses/16-920j-numerical-methods-for-partial-differential-equations-sma-5212-spring-2003/5350b98a660c073d845f9128a3851a8b_lec5.pdf |
21
ξ
22
are
As the transient solution must decay with time, it is imperative that
)j
(
Real
λ ≤
j
0 for
1, 2.
=
SMA-HPC ©2002 NUS
19
Example 1
Discrete Time Operator
Suppose we have somehow discretized the time operator on the
LHS to obtain
n
u
1
n
u
2
=
n
a
u
1
1 1
1
−
n
1
−... | https://ocw.mit.edu/courses/16-920j-numerical-methods-for-partial-differential-equations-sma-5212-spring-2003/5350b98a660c073d845f9128a3851a8b_lec5.pdf |
71)
0
1
−
E E u
⋅
⋅ Λ
....
⋅
A
A
A
(cid:71)
n
u
(cid:74)(cid:74)(cid:71)
0
1
n
−
E
E u
= Λ
where
n
=
Λ
n
λ
1
0
0
n
λ
2
=
'
c
λ ξ λ ξ
11 1
n
1
+
'
c
12 2
2
n
=
'
c
λ ξ λ ξ
21 1
n
1
+
'
c
22 2
n
2
where
c
1
c
2
'
'
=
(cid:74)(ci... | https://ocw.mit.edu/courses/16-920j-numerical-methods-for-partial-differential-equations-sma-5212-spring-2003/5350b98a660c073d845f9128a3851a8b_lec5.pdf |
c
=
1
'
]
' c
2
ξ ξ
1
12
1
ξ
ξ
2
1
22
n
λ
1
n
λ
2
. teλ
fference equation where time is
e di
Th
solution
The difference equation where time is
solution
. nλ
co
nt
inuo
hus
as
exponential
discretized
has
power
SMA-HPC ©2002 NUS
22
Example 1
Compari... | https://ocw.mit.edu/courses/16-920j-numerical-methods-for-partial-differential-equations-sma-5212-spring-2003/5350b98a660c073d845f9128a3851a8b_lec5.pdf |
1
−
n
u
−
h
2
=
n
u
λ
h
µ
a
e
+
n
⇒
n
u
1 2
+
−
n
h u
λ
−
n
1
−
u
=
2
(
ha e
µ
hn
)
Solution of u consists of the complementary solution cn, and the
particular solution pn, i.e.
un = cn + pn
There are several ways of solving for the complementary and
particular solutions.
S and charac... | https://ocw.mit.edu/courses/16-920j-numerical-methods-for-partial-differential-equations-sma-5212-spring-2003/5350b98a660c073d845f9128a3851a8b_lec5.pdf |
σ
=
1
1
nβ+
σ
2 2
The particular solution to the modal equation is
n
p
=
2
h
µ
hn
h
µ
µ
ahe e
µ
e
2
h
−
λ
h
2
e
−
1
Combining the two components of the solution together,
n
u
n
)
) (
n c +
p
(
(
=
h
β λ
1
=
+
1
+
2
2
h
h
+
λ β λ
1
− +
2
2
h
λ
n
)
(
2
SMA-HPC ... | https://ocw.mit.edu/courses/16-920j-numerical-methods-for-partial-differential-equations-sma-5212-spring-2003/5350b98a660c073d845f9128a3851a8b_lec5.pdf |
Example 2
Leapfrog Time Discretization
In particular, by applying to the 1-D Parabolic PDE
u
∂
t
∂
=
υ
2
u
∂
2
x
∂
the central difference scheme for spatial discretization, we
obtain
A
=
υ
2
x
∆
1
−
2
1
0
2
−
1
0
1
−
2
1
which is the t... | https://ocw.mit.edu/courses/16-920j-numerical-methods-for-partial-differential-equations-sma-5212-spring-2003/5350b98a660c073d845f9128a3851a8b_lec5.pdf |
max
2
h
+
1
2
λ
max
2
h
+
1
which can be plotted in the absolute stability diagram.
SMA-HPC ©2002 NUS
31
Example 2
Leapfrog Time Discretization
Absolute Stability Diagram for σ
As applied to the 1-D Parabolic PDE, the absolute stability
diagram for σis
Im(σ)
Region of
instability
Unit
circle
σ2 ... | https://ocw.mit.edu/courses/16-920j-numerical-methods-for-partial-differential-equations-sma-5212-spring-2003/5350b98a660c073d845f9128a3851a8b_lec5.pdf |
2
2
h
λ
2
)
+
1
.
2
−
1
2 .
4
4
h
λ
!
2
σ
1
1
= +
h
λ
+
h
2
2
λ
2
+
...
and compared to
h
λ
e
1
= +
h
λ
+
2
2
h
λ
2!
.
..
+
is identical up to the second order of
is said to be second-order accurate.
h
λ
. Hence, the above scheme
SMA-HPC ©2002 NUS
34
Example 3
Euler-For... | https://ocw.mit.edu/courses/16-920j-numerical-methods-for-partial-differential-equations-sma-5212-spring-2003/5350b98a660c073d845f9128a3851a8b_lec5.pdf |
λ
σ
= −
1
s.t.
σ
<
1 in the
h
λ
-plane.
36
Example 3
Euler-Forward Time Discretization
Stability Diagram
The stability diagram for the Euler-forward time
discretization in the λh-plane is
Unit Circle
Im(λh)
-2
-1
0
Region of Stability
Re(λh)
SMA-HPC ©2002 NUS
37
Example 3
Euler-Forward Time Discr... | https://ocw.mit.edu/courses/16-920j-numerical-methods-for-partial-differential-equations-sma-5212-spring-2003/5350b98a660c073d845f9128a3851a8b_lec5.pdf |
roducing the time shift operator S
(cid:71)
n
hAu
2
(cid:71)
hb
n
+
2
•
i
1
−
+
−
=
A
(cid:71)
n
Su
(cid:71)
n
u
S
S S
−
h
2
Premultiplying
1
−
I EE
=
E AE E
−
1
−
Λ
(cid:71)
b
−
n
=
(cid:71)
n
I u
1
−
on the LHS and RHS and introducing
E
(cid:71)
n
u
... | https://ocw.mit.edu/courses/16-920j-numerical-methods-for-partial-differential-equations-sma-5212-spring-2003/5350b98a660c073d845f9128a3851a8b_lec5.pdf |
nF
= −
which is a set of uncoupled equations.
Hence, for each j, j = 1,2,….,N-1,
λ
j
−
−
1
S S
−
U
j
h
2
= −
F
j
SMA-HPC ©2002 NUS
41
Relationship
between σ and λh
σ = σ(λh)
Note that the analysis performed above is identical
to the analysis carried out using the modal equation
... | https://ocw.mit.edu/courses/16-920j-numerical-methods-for-partial-differential-equations-sma-5212-spring-2003/5350b98a660c073d845f9128a3851a8b_lec5.pdf |
matrix inversion), whilst updating the variables at
the same time.
Implicit schemes applied to ODEs that are inherently stable will
be unconditionally stable or A-stable.
SMA-HPC ©2002 NUS
44
Implicit Time-
Marching Scheme
Euler-Backward
Consider the Euler-backward scheme for time discretization
1
+
n
du
... | https://ocw.mit.edu/courses/16-920j-numerical-methods-for-partial-differential-equations-sma-5212-spring-2003/5350b98a660c073d845f9128a3851a8b_lec5.pdf |
2
h λ
+
2
2
h
+
.... , is only
The solution is
n
U
SMA-HPC ©2002 NUS
=
β
1
1
h
λ
−
n
+
)
(
h
1
u
µ
+
ahe
)
h
µ
e
h λ
−
(
1
−
1
46
Euler-Backward
Implicit Time-
Marching Scheme
For the Parabolic PDE, λis always real and < 0.
Therefore, the transient component will always... | https://ocw.mit.edu/courses/16-920j-numerical-methods-for-partial-differential-equations-sma-5212-spring-2003/5350b98a660c073d845f9128a3851a8b_lec5.pdf |
18.409 An Algorithmist’s Toolkit
September 17, 2009
Lecturer: Jonathan Kelner
Scribe: Andre Wibisono
Lecture 3
1 Outline
Today’s lecture covers three main parts:
• Courant-Fischer formula and Rayleigh quotients
• The connection of λ2 to graph cutting
• Cheeger’s Inequality
2 Courant-Fischer and Rayleigh Quoti... | https://ocw.mit.edu/courses/18-409-topics-in-theoretical-computer-science-an-algorithmists-toolkit-fall-2009/535add3f6457cc13e51d9774f16bf48f_MIT18_409F09_scribe3.pdf |
−1
−1
xT Ax
.
xT x
Let A = QT ΛQ be the eigendecomposition of A. We observe that xT Ax = xT QT ΛQx =
Proof
(Qx)T Λ(Qx), and since Q is orthogonal, (cid:3)Qx(cid:3) = (cid:3)x(cid:3). Thus it suffices to consider the case when A = Λ is a
diagonal matrix with the eigenvalues λ1, . . . , λn in the diagonal. Then we ... | https://ocw.mit.edu/courses/18-409-topics-in-theoretical-computer-science-an-algorithmists-toolkit-fall-2009/535add3f6457cc13e51d9774f16bf48f_MIT18_409F09_scribe3.pdf |
3-1
⊥
On the other hand, plugging in x = ek ∈ Sk
−1 yields xT Ax = (ek)T Aek = λk. This shows that
λk = min x T Ax.
(cid:2)x(cid:2)=1
⊥
x∈Sk
−1
Similarly, for (cid:3)x(cid:3) = 1,
x T Ax =
n
(cid:10)
λix 2
i
i=1
≤ λmax
n
(cid:10)
i = λmax(cid:3)x(cid:3)2 = λmax.
x 2
i=1
On the other hand, taking x = e... | https://ocw.mit.edu/courses/18-409-topics-in-theoretical-computer-science-an-algorithmists-toolkit-fall-2009/535add3f6457cc13e51d9774f16bf48f_MIT18_409F09_scribe3.pdf |
11)
We can interpret the formula for λ2 as putting springs on each edge (with slightly weird boundary
conditions corresponding to normalization) and minimizing the potential energy of the configuration.
Some big matrices are hard or annoying to diagonalize, so in some cases, we may not want to calculate
the exact va... | https://ocw.mit.edu/courses/18-409-topics-in-theoretical-computer-science-an-algorithmists-toolkit-fall-2009/535add3f6457cc13e51d9774f16bf48f_MIT18_409F09_scribe3.pdf |
A Complete Binary Tree
Let G be a complete binary tree on n = 2h − 1 nodes. Define the vector x ∈ Rn to have the value 0 on the
root node, −1 on all nodes in the left subtree of the root, and 1 on all nodes in the right subtree of the root.
3-2
(cid:3)
(cid:3)
It is easy to see that
the root, so x ⊥ 1. Calculating... | https://ocw.mit.edu/courses/18-409-topics-in-theoretical-computer-science-an-algorithmists-toolkit-fall-2009/535add3f6457cc13e51d9774f16bf48f_MIT18_409F09_scribe3.pdf |
set S ⊆ V of vertices of G, let S ¯ = V \ S be the complement of S in V . Let |S| and |S¯| denote the number
of vertices in S and S¯, respectively. Finally, let e(S) denote the number of edges between S and S¯. Note
that e(S) = e(S¯).
Now we consider some possible answers to our earlier question.
Attempt 1: Min-cut... | https://ocw.mit.edu/courses/18-409-topics-in-theoretical-computer-science-an-algorithmists-toolkit-fall-2009/535add3f6457cc13e51d9774f16bf48f_MIT18_409F09_scribe3.pdf |
1: Illustration for problems with the proposed graph cutting criteria.
Now we propose a criterion for graph cutting that balances the two approaches above.
Definition 3 (Cut Ratio) The cut ratio φ of a cut S − S ¯ is given by
φ(S) =
e(S)
.
min(|S|, |S¯|)
3-3
The cut of minimum ratio is the cut that minimizes φ(S... | https://ocw.mit.edu/courses/18-409-topics-in-theoretical-computer-science-an-algorithmists-toolkit-fall-2009/535add3f6457cc13e51d9774f16bf48f_MIT18_409F09_scribe3.pdf |
denote the characteristic function on A, so [A] = 1 if A is true, and
[A] = 0 if A is false. Then we also have
(cid:15)
(cid:10)
|S| · |S¯| =
[i ∈ S]
⎛
(cid:16)
⎞
S]⎠
[j ∈ ¯ =
(cid:10)
⎝
i∈V
j∈V
i,j∈V
Combining the two computations above,
(cid:10)
[i ∈ S, j ∈ ¯
S] =
1 (cid:10)
2
i,j∈V
[xi (cid:10)
=... | https://ocw.mit.edu/courses/18-409-topics-in-theoretical-computer-science-an-algorithmists-toolkit-fall-2009/535add3f6457cc13e51d9774f16bf48f_MIT18_409F09_scribe3.pdf |
xj )2
i<j
allows us to approximate φ(G) within a factor of 2. The bad news is that it is NP-hard to solve this program.
However, if we remove the x ∈ {−1, 1} constraint, we can actually solve the program. Note that removing
the constraint x ∈ {−1, 1} is actually the same as saying that x ∈ [−1, 1]n, since we can sc... | https://ocw.mit.edu/courses/18-409-topics-in-theoretical-computer-science-an-algorithmists-toolkit-fall-2009/535add3f6457cc13e51d9774f16bf48f_MIT18_409F09_scribe3.pdf |
f (q(cid:7)) ≤ γf (q) ≤ γf (p), so this process gives us a
γ-approximation.
3.4 Solving the Relaxed Program
Going back to our integer program to find the cut of minimum ratio, now consider the following relaxed
program,
(cid:11)
(i,j)∈E
min (cid:11)
x∈Rn
i<j
(xi − xj )2
.
(xi − xj )2
Since the value of the o... | https://ocw.mit.edu/courses/18-409-topics-in-theoretical-computer-science-an-algorithmists-toolkit-fall-2009/535add3f6457cc13e51d9774f16bf48f_MIT18_409F09_scribe3.pdf |
min
2 S⊆V |S| · |S¯|
(cid:11)
n
2 x∈{−1,1}n
(cid:11)
min (cid:11)
=
n
≥ min (cid:11)
2 x∈Rn
(cid:11)
(i,j)∈E (xi − xj )2
(xi − xj )2
i<j
(i,j)∈E (xi − xj )2
i<j (xi − xj )2
(i,j)∈E (xi − xj )2
i=1
(cid:11)n
xi
n
2
n
= min
2 x∈Rn
x⊥1
λ2 =
.
2
4 Cheeger’s Inequality
In the previous section, we... | https://ocw.mit.edu/courses/18-409-topics-in-theoretical-computer-science-an-algorithmists-toolkit-fall-2009/535add3f6457cc13e51d9774f16bf48f_MIT18_409F09_scribe3.pdf |
Inequality is the best we can do to bound λ2. The square
factor φ(G)2 is unfortunate, but if it were within a constant factor of φ(G), we would be able to find a constant
approximation of an NP-hard problem. Also, if we look at the examples of the path graph and the complete
binary tree, their isoperimetric numbers a... | https://ocw.mit.edu/courses/18-409-topics-in-theoretical-computer-science-an-algorithmists-toolkit-fall-2009/535add3f6457cc13e51d9774f16bf48f_MIT18_409F09_scribe3.pdf |
2dmax
This is great because it not only implies Cheeger’s inequality by taking x = v2, but it also gives an actual
cut. It also works even if we have not calculated the exact values for λ2 and v2; we just have to get a good
approximation of v2 and we can still get a cut.
4.2 Proof of Cheeger’s Inequality
4.2.1 Ste... | https://ocw.mit.edu/courses/18-409-topics-in-theoretical-computer-science-an-algorithmists-toolkit-fall-2009/535add3f6457cc13e51d9774f16bf48f_MIT18_409F09_scribe3.pdf |
2: A Little More Preprocessing
We do not want edges crossing ym = 0 (because we will later consider the positive and negative vertices
separately), so we replace any edge (i, j) with two edges (i, m) and (m, j). Call this new edge set E(cid:7) .
Claim 7
(cid:11)
(i,j)∈E (yi − yj )2
i∈V
(cid:11)
2
yi
≥
(cid:11)
... | https://ocw.mit.edu/courses/18-409-topics-in-theoretical-computer-science-an-algorithmists-toolkit-fall-2009/535add3f6457cc13e51d9774f16bf48f_MIT18_409F09_scribe3.pdf |
)
(i,j)∈E
+
n
y2
i=m i
(yi − yj )2
.
Note that ym appears twice in the summation on the denominator, which is fine since ym = 0. We also know
that for any a, b, c, d > 0,
so it is enough to bound
(cid:11)
(i,j)∈E
(cid:11)
(yi − yj )2
2
i
(cid:3)
−
m
i=1
y
a + b
c + d
(cid:12)
(cid:13)
,
a b
,
c d
≥... | https://ocw.mit.edu/courses/18-409-topics-in-theoretical-computer-science-an-algorithmists-toolkit-fall-2009/535add3f6457cc13e51d9774f16bf48f_MIT18_409F09_scribe3.pdf |
− zi = (zi+1 − zi) + (zi+2 − zi+1) + · · · + (zj − zj−1) =
j−1
(cid:10)
(zk+1 − zk).
k=i
Summing over (i, j) ∈ E(cid:7) , we observe that each term zk+1 − zk appears exactly Ck times. Therefore,
−
(cid:10)
|zi − zj | =
(cid:10)
m−1
Ck(zk+1 − zk) ≥ φ
(i,j)∈E
(cid:3)
−
k=1
(cid:10)
m−1
k(zk+1 − zk).
k=1
Not... | https://ocw.mit.edu/courses/18-409-topics-in-theoretical-computer-science-an-algorithmists-toolkit-fall-2009/535add3f6457cc13e51d9774f16bf48f_MIT18_409F09_scribe3.pdf |
, so
we apply the main lemma (Lemma 8) to a new vector z with zi = −yi
2 . We now have
(cid:10)
(i,j)∈E(cid:3)
−
2
2
|y − y
| ≥ φ
i
j
|y
2
| = φ.
i
m
(cid:10)
i=1
3. Next, we want something that looks like (yi − yj )2 instead of yi
2 − yj
2, so we are going to use the
Cauchy-Schwarz inequality.
(cid... | https://ocw.mit.edu/courses/18-409-topics-in-theoretical-computer-science-an-algorithmists-toolkit-fall-2009/535add3f6457cc13e51d9774f16bf48f_MIT18_409F09_scribe3.pdf |
get
(cid:11)
(i,j)∈E
(cid:11)
(yi − yj )2
2
i
(cid:3)
−
m
i=1
y
(cid:17)
(cid:11)
(cid:11)
(i,j)∈E
(cid:3)
−
(i,j)∈E
(cid:3)
−
≥
i=1
(cid:18)2
2
i
2
|y − y |
j
(yi + yj )2
≥
φ2
2dmax
.
Similarly, we can also show that
(cid:11)
(cid:3)
(i,j)∈E
(cid:11)
+
n
i=m
(yi − yj )2
2
yi
≥
φ2
2dmax
.
Ther... | https://ocw.mit.edu/courses/18-409-topics-in-theoretical-computer-science-an-algorithmists-toolkit-fall-2009/535add3f6457cc13e51d9774f16bf48f_MIT18_409F09_scribe3.pdf |
future lectures.
3-9
MIT OpenCourseWare
http://ocw.mit.edu
18.409 Topics in Theoretical Computer Science: An Algorithmist's Toolkit
Fall 2009
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. | https://ocw.mit.edu/courses/18-409-topics-in-theoretical-computer-science-an-algorithmists-toolkit-fall-2009/535add3f6457cc13e51d9774f16bf48f_MIT18_409F09_scribe3.pdf |
MIT OpenCourseWare
http://ocw.mit.edu
6.005 Elements of Software Construction
Fall 2008
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
6.005
elements of
software
construction
coding the photo organizer
Daniel Jackson
topics for today
how to implement an ob... | https://ocw.mit.edu/courses/6-005-elements-of-software-construction-fall-2008/536852e935745fdafa966f405cea7916_MIT6_005f08_lec19.pdf |
‣ classification of object does not change over time
‣ subset as subclass: class Root extends Album {...}
© Daniel Jackson 2008
6
example: Selected
OR
© Daniel Jackson 2008
7
PhotoSelectedSetCatalogelts!PhotoselectedPhotoBooleanisSelected!example: Root
OR
© Daniel Jackson 2008
8
AlbumRootAlbumCatalog!r... | https://ocw.mit.edu/courses/6-005-elements-of-software-construction-fall-2008/536852e935745fdafa966f405cea7916_MIT6_005f08_lec19.pdf |
<Album, Set<Photo>> insertedPhotos;}
or class Catalog {Map<Photo, Set<Album>> insertedInto;}
‣ for basic add operation, implementing as Album -> Photo is fine
‣ but if add operation removes photo from other collections,
will want both directions
© Daniel Jackson 2008
12
derived components
derived component
‣ ... | https://ocw.mit.edu/courses/6-005-elements-of-software-construction-fall-2008/536852e935745fdafa966f405cea7916_MIT6_005f08_lec19.pdf |
avoid back-dependences of model on view
© Daniel Jackson 2008
16
PhotoSelectedImage!File!?fileimagePhotoFile!fileListPreviewPanethumbnailsThumbnaileltsImage!imageBooleanisSelected!photo!??!?final code: catalog, album, etc
public class Catalog {
private static final String ROOTNAME = "all photos";
// root album... | https://ocw.mit.edu/courses/6-005-elements-of-software-construction-fall-2008/536852e935745fdafa966f405cea7916_MIT6_005f08_lec19.pdf |
// checking rep (1)
assert root != null: "root cannot be null!";
assert parent != null: "parent cannot be null!";
assert inserted != null: "inserted cannot be null!";
// checking rep (2,4)
assert parent.get(root) == null: "Root cannot have a parent!";
Set<Album> a1 = new HashSet<Album>(inserted.keySet());
... | https://ocw.mit.edu/courses/6-005-elements-of-software-construction-fall-2008/536852e935745fdafa966f405cea7916_MIT6_005f08_lec19.pdf |
2.160 System Identification, Estimation, and Learning
Lecture Notes No. 6
February 24, 2006
4.5.1 The Kalman Gain
Consider the error of a posteriori estimate x ıt
=
et ≡
x ı
t −
xt
=
x ı
t
x ı
t
+
1
t
−
K
t (
y t H
−
+
(
K H
t
xt
t
+
t
−
1
t
t
x ı t
vt
−
1−
)
−
xt
x ı t
t − )1
H
t
−
xt
(2... | https://ocw.mit.edu/courses/2-160-identification-estimation-and-learning-spring-2006/5374ca7c1c6c42d50e1a59807d00f438_lecture_6.pdf |
rule 2
+ 2
[ε T Kv −ε KHε ] ← rule 1
T
d
dK
T
= KH εε H + KHεε H − 2[
T
T
T
vKH
ε
T + Kvε H ] + 2KvvT + 2[εv − εε H ]
T
T
T
T
T
(3)0
The necessary condition for the mean squared error of state estimate with respect to
the gain matrix K is:
Jd t = 0
dK
(31)
T
T
aking expectation of ee
t
t
, differentiating ... | https://ocw.mit.edu/courses/2-160-identification-estimation-and-learning-spring-2006/5374ca7c1c6c42d50e1a59807d00f438_lecture_6.pdf |
+
1−tv
Uncorrelated with vt
A ⋅ xt − 2 + wt − 2
Uncorrelated with vt
∴
ı[
xE
tt − 1vt
T ] = 0
For the second term
xt =
xA
⋅
t − 1
tw
1−+
Uncorrelated with vt
A ⋅ xt − 2 + wt − 2
Uncorrelated with vt
-
∴
vxE
[
t
T
t ] =
Therefore
xAE
[
t − 1vt
T ] + wE
[
t − 1vt
T
0] =
2
E [εtvt
T ] = 0
(34)... | https://ocw.mit.edu/courses/2-160-identification-estimation-and-learning-spring-2006/5374ca7c1c6c42d50e1a59807d00f438_lecture_6.pdf |
6) into (33), we can conclude that the optimal gain must
Kt H t P
t
t −1Ht Kt Rt
+
T
−
T
t −1Ht
P
t
= 0
∴ Kt
= P t
t −1Ht
T
[H P
t
tt −1Ht
T
−1
+ R ]
t
(37)
(38)
This is called the Kalman Gain.
4.5.2 Updating the Error Covariance
The above Kalman gain contains the a priori error covariance P
tt −1
.... | https://ocw.mit.edu/courses/2-160-identification-estimation-and-learning-spring-2006/5374ca7c1c6c42d50e1a59807d00f438_lecture_6.pdf |
P = (I − H K
t
t
t
)P
t − 1
t
(41)
Exercise. Derive (41)
Furthermore, based on Pt we can compute
Pt + 1 t
by using the state transition equation
(8)
Consider
From (36)
Pt + 1 = E[ε ε T ]
t + 1 t + 1
t
ı
ε t + 1 = xt + 1 t − xt + 1
x A ıt
( x A +
=
t
t
= e A t − w G
t
−
t
t
t
w G
)
t
t
= E[( e A −... | https://ocw.mit.edu/courses/2-160-identification-estimation-and-learning-spring-2006/5374ca7c1c6c42d50e1a59807d00f438_lecture_6.pdf |
1
−
T
yı )}w ] −
t
t
x E
[
t
T ]
w
t
−
x H K E
t
[
T
x E
[
t
ı t t | − 1wt ] −
t
T ] −
w
t
[ ı
x E H K
t
t
T ]
w
t
T
t t | − 1wt ]
v E K
[
t
t
(42)
(43)
(44)
The first term: xıt− 1 does not depend on wt , hence vanishes. For the second term,
using (8), we can write
x E
[
t
w
t
T ] = E[( At− 1... | https://ocw.mit.edu/courses/2-160-identification-estimation-and-learning-spring-2006/5374ca7c1c6c42d50e1a59807d00f438_lecture_6.pdf |
State Estimate with
new measurement
ıx t
t −1 = At −1xt −1
ı
Update error covariance
tP
(=
PHKI
)
t
t
−
t
t
1
−
x ıt = x ı
t −1
t
+ Kt ( y − Ht x ı
t
t
)1−
t
tP +1
t
=
T
A P
A
t
t
t
+
T
GQG
t
t
t
t
1+← t
t
1+← t
State Estimate x ıt
On-Line or Off-Line
T
y1,y2,…yt ,…
his does not depend on ... | https://ocw.mit.edu/courses/2-160-identification-estimation-and-learning-spring-2006/5374ca7c1c6c42d50e1a59807d00f438_lecture_6.pdf |
ı −
Δ
P = E
t
t
−x ı([
x ı[E=
(
Δ
P
t −1|
t
−
t −1
|t
]
xt )T
xt )(x ı
1|
t −
t
: a posteriori state estimation error covariance
)T ]
−
xt
: a priori state estimation error covariance
Questions
Q1: How is the measurement noise covariance R used in the Kalman filter for
correcting (updating) the state es... | https://ocw.mit.edu/courses/2-160-identification-estimation-and-learning-spring-2006/5374ca7c1c6c42d50e1a59807d00f438_lecture_6.pdf |
��
⎥
σl ⎦⎥
2
yt 1
⎡Δ
⎤
⎢
⎥
�
Δy = ⎢
⎥
⎥
⎢
⎥
⎢
⎣Δytl ⎦
t
since if not diagonal we can change the coordinates.
2
⎤
⎡Δyt 1
σ1
⎥
T ⎢
�
⎢
⎥
⎢Δy σ2 ⎥
l ⎦
⎣
P H t
t
(28)
ıx t
x ıt
=
+
t −1
tl
Depending on the measurement noise variance, σ , the error correction term is
2
i
attenuated; Δy ti
2
iσ .
I... | https://ocw.mit.edu/courses/2-160-identification-estimation-and-learning-spring-2006/5374ca7c1c6c42d50e1a59807d00f438_lecture_6.pdf |
positive-definite, we can consider an
ellipsoid with eigenvalues
λmin(P ) ,λ (P )
max
t
t
xt 2
x ıt = x ı
t −1
t
+ P Δq
t
where Δq
=
H t
−1
T Rt Δ
y t
x t 1
minλ
Small variance � In average
No need to make a large change
x ı
t −1 is q
t
uite certain in this direction �
l -dim
measurement
space
tly
⎛
⎜ ... | https://ocw.mit.edu/courses/2-160-identification-estimation-and-learning-spring-2006/5374ca7c1c6c42d50e1a59807d00f438_lecture_6.pdf |
Lecture 7
ChIP-seq Analysis
Irreproducible Discovery Rate (IDR) Analysis
Foundations of Computational Systems Biology
David K. Gifford
1
Transcription factors regulate gene expression
© Emw on wikipedia. Some rights reserved. License: CC-BY-SA. This content is excluded from our Creative
Commons license. For m... | https://ocw.mit.edu/courses/7-91j-foundations-of-computational-and-systems-biology-spring-2014/53a07f80af4d4304844344039d97775e_MIT7_91JS14_Lecture7.pdf |
Seq reads are independently
generated from a set of spatially
discrete binding events
9GPS addresses the challenges
in ChIP-Seq analysis
ChIP DNA are
randomly fragmented
Model the spatial
distribution of the reads
Mixture of Reads
from different events
Construct a mixture
model
Courtesy of Wang and Zhang.... | https://ocw.mit.edu/courses/7-91j-foundations-of-computational-and-systems-biology-spring-2014/53a07f80af4d4304844344039d97775e_MIT7_91JS14_Lecture7.pdf |
π p r m
M
∑πm' p(rn | m')
m'=1
M step
(i) =
ˆπ
m
Nm
M∑
m'=1
Nm'
γ(zn
Nm
= ∑N
n=1
= m)
γ (zn=m) : the fraction of read
n assigned to event m
Nm : the effective number of
reads assigned to event m
14Expectation-Maximization (EM) algorithm with component elimination
Initialization
1π
=
M
j
Strength of binding even... | https://ocw.mit.edu/courses/7-91j-foundations-of-computational-and-systems-biology-spring-2014/53a07f80af4d4304844344039d97775e_MIT7_91JS14_Lecture7.pdf |
(zn = m) =
m
π p(r | m)
n
M
∑πm' p(rn | m')
m'=1
M step
i
)(
ˆ
π
m
=
∑
∑
N
n
1
=
N
m
=
γ
(
z
n
=
m
)
α
)
−
N
,0max(
M
m
,0max(
N
m
1'
=
−
α
)
m
'
γ (zn=m) : the fraction of read
n assigned to event m
Nm : the effective number of
reads assigned to event m
18Synthetic data, EM, sparse prior
(events at 500 and 550 ... | https://ocw.mit.edu/courses/7-91j-foundations-of-computational-and-systems-biology-spring-2014/53a07f80af4d4304844344039d97775e_MIT7_91JS14_Lecture7.pdf |
� For matched event i ranks are xi and yi in X and Y
27
Irreproducible Discovery Rate (IDR) Analysis
• Ψ
n(t) is the fraction of the n events that are
paired in the top n*t events in both X and Y It is
roughly linear from t=0 to the point when events
are no longer reproducible (not shared between
replicate... | https://ocw.mit.edu/courses/7-91j-foundations-of-computational-and-systems-biology-spring-2014/53a07f80af4d4304844344039d97775e_MIT7_91JS14_Lecture7.pdf |
1
Binding events and
explanatory DNA motifs
32Motif-based positional prior
biases the binding event prediction
Mixture model
1
2
M
Possible
events
N
Observed
reads
b
m
rn
N M
M
p(R | π) = ∏∑ p r | m), ∑π = 1
πm ( n
m
n=1 m=1
m=1
Position-specific
priors
• Events are sparse
• Events occurs more likely at... | https://ocw.mit.edu/courses/7-91j-foundations-of-computational-and-systems-biology-spring-2014/53a07f80af4d4304844344039d97775e_MIT7_91JS14_Lecture7.pdf |
20
40
60
80
100
Spatial resolution (distance from GABP motif, bp)
Spatial resolution (distance from CTCF motif, bp)
(Human GABP Data
Valouev et al., 2008)
(Mouse CTCF data
Chen , et. al. 2008)
Courtesy of PLoS Computational Biology. License: CC-BY.
Source: Guo, Yuchun, Shaun Mahony, et al. "High Resolution Genome ... | https://ocw.mit.edu/courses/7-91j-foundations-of-computational-and-systems-biology-spring-2014/53a07f80af4d4304844344039d97775e_MIT7_91JS14_Lecture7.pdf |
. License: CC-BY.
Source: Guo, Yuchun, Shaun Mahony, et al. "High Resolution Genome Wide Binding Event Finding and Motif Discovery
Reveals Transcription Factor Spatial Binding Constraints." PLoS Computational Biology 8, no. 8 (2012): e1002638.
38GEM Summary
• GEM incorporates motif information as a
position-specifi... | https://ocw.mit.edu/courses/7-91j-foundations-of-computational-and-systems-biology-spring-2014/53a07f80af4d4304844344039d97775e_MIT7_91JS14_Lecture7.pdf |
. "Tissue-specific Transcriptional Regulation has
Diverged Significantly between Human and Mouse." Nature Genetics 39, no. 6 (2007): 730-32.
D. Odom, R. Dowell E. Fraenkel, D. Gifford Labs
Nature Genetics, 2007
43FIN
44MIT OpenCourseWare
http://ocw.mit.edu
7.91J / 20.490J / 20.390J / 7.36J / 6.802J / 6.874J / HST.... | https://ocw.mit.edu/courses/7-91j-foundations-of-computational-and-systems-biology-spring-2014/53a07f80af4d4304844344039d97775e_MIT7_91JS14_Lecture7.pdf |
MIT EECS 6.837 Computer Graphics
Collision Detection
and Response
MIT EECS 6.837 – Matusik
MIT EECS 6.837 – Durand
Philippe Halsman: Dali Atomicus
1
This image is in the public domain. Source:Wikimedia Commons.
Collisions
• Detection
• Response
• Overshooting problem
(when we enter the solid)
2
Collision... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53c5b275d4fb9eba7968e6e80047f2d4_MIT6_837F12_Lec10.pdf |
. License: CC-BY-SA.
This content is excluded from our Creative Commons license. For more info
rmation, see http://ocw.mit.edu/help/faq-fair-use/.
9
Collision Detection in Big Scenes
• Imagine we have n objects. Can we test all pairwise
intersections?
– Quadratic cost O(n2)!
• Simple optimization: separate s... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53c5b275d4fb9eba7968e6e80047f2d4_MIT6_837F12_Lec10.pdf |
/.
15
Pseudocode (simplistic version)
boolean intersect(node1, node2)
// no overlap? ==> no intersection!
if (!overlap(node1->sphere, node2->sphere)
return false
// recurse down the larger of the two nodes
if (node1->radius()>node2->radius())
for each child c of node1
if intersect(c, node2) return true... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53c5b275d4fb9eba7968e6e80047f2d4_MIT6_837F12_Lec10.pdf |
node1
if intersect(c, node2) return true
else
for each child c f node2
if intersect(c, node1) return true
return false
© Gareth Bradshaw. All rights reserved. This content is excluded
from our Creative Commons license. For more information, see
http://ocw.mit.edu/help/faq-fair-use/.
Courtesy of Patrick Laug.... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53c5b275d4fb9eba7968e6e80047f2d4_MIT6_837F12_Lec10.pdf |
Creative Commons license. For more information, see
http://ocw.mit.edu/help/faq-fair-use/.
Courtesy of Patrick Laug. Used with permission.
22
Pseudocode (with leaf case)
boolean intersect(node1, node2)
if (!overlap(node1->sphere, node2->sphere)
return false
// if there is nowhere to go, test everything
if (n... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53c5b275d4fb9eba7968e6e80047f2d4_MIT6_837F12_Lec10.pdf |
)/2)
– Better than the average of the vertices because does not
suffer from non-uniform tessellation
© Gareth Bradshaw. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/.
28
Bounding Sphere of a Set of Points
• Using ax... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53c5b275d4fb9eba7968e6e80047f2d4_MIT6_837F12_Lec10.pdf |
(cid:2) )(cid:4)(cid:14)(cid:11)%(cid:30)(cid:11)(cid:14) (cid:15)(cid:11)%(cid:30)(cid:11)(cid:14)(cid:20)(cid:5)(cid:11)(cid:26)%(cid:7)(cid:7)(cid:31)(cid:5)(cid:11)
(cid:27) (cid:8)(cid:6)(cid:6)%"(cid:30)(cid:11)(cid:5)(cid:8)(cid:13)(cid:20)(cid:11)(cid:15)(cid:16)*(cid:5)(cid:13)(cid:14)(cid:11)(cid:15)(cid:17)(... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53c5b275d4fb9eba7968e6e80047f2d4_MIT6_837F12_Lec10.pdf |
cid:11)%(cid:14)(cid:11)
© Sara McMains. All rights reserved. This content
is excluded from our Creative Commons license.
For more information, see
http://ocw.mit.edu/help/faq-fair-use/.
© Gareth Bradshaw. All rights reserved.
This content is excluded from our Creative
Commons license. For more information,
see http:/... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53c5b275d4fb9eba7968e6e80047f2d4_MIT6_837F12_Lec10.pdf |
Graphics Pipeline & Rasterization
Image removed due to copyright restrictions.
MIT EECS 6.837 – Matusik
1
How Do We Render Interactively?
• Use graphics hardware, via OpenGL or DirectX
– OpenGL is multi-platform, DirectX is MS only
OpenGL rendering
Our ray tracer
© Khronos Group. All rights reserved. This cont... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53d96abf747a3c82fd3497d2fea540f5_MIT6_837F12_Lec21.pdf |
Pixel raster
Scene
primitives
7
GPUs do Rasterization
• The process of taking a
triangle and figuring out
which pixels it covers is
called rasterization
• We’ve seen acceleration
structures for ray
tracing; rasterization is
not stupid either
– We’re not actually going
to test all pixels for each
triangl... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53d96abf747a3c82fd3497d2fea540f5_MIT6_837F12_Lec21.pdf |
Advantages
• Modern scenes are more complicated than images
– A 1920x1080 frame at 64-bit color and 32-bit depth per
pixel is 24MB (not that much)
• Of course, if we have more than one sample per pixel this gets
larger, but e.g. 4x supersampling is still a relatively comfortable
~100MB
– Our scenes are routinely... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53d96abf747a3c82fd3497d2fea540f5_MIT6_837F12_Lec21.pdf |
, etc.)
• Disadvantages
– Hard to implement in hardware (lacks computation
coherence, must fit entire scene in memory, bad memory
behavior)
• Not such a big point any more given general purpose GPUs
– Has traditionally been too slow for interactive applications
– Both of the above are changing rather rapidly rig... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53d96abf747a3c82fd3497d2fea540f5_MIT6_837F12_Lec21.pdf |
excluded from our Creative Commons license. For more
information, see http://ocw.mit.edu/help/faq-fair-use/.
• Rasterize triangle: find
which pixels should be lit
– For each pixel,
test 3 edge equations
• if all pass, draw pixel
• Compute per-pixel color
• Test visibility (Z-buffer),
update frame buffer color
©... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53d96abf747a3c82fd3497d2fea540f5_MIT6_837F12_Lec21.pdf |
(perform projection)
setup 3 edge equations
for each pixel x,y
if passes all edge equations
compute z
if z<zbuffer[x,y]
zbuffer[x,y]=z
framebuffer[x,y]=shade()
Questions?
© source unknown. All rights reserved. This content is
excluded from our Creative Commons license. For more
information, see http://o... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53d96abf747a3c82fd3497d2fea540f5_MIT6_837F12_Lec21.pdf |
: openclipart
27
Perspective in 2D
The projected point in
homogeneous
coordinates
(we just added w=1):
This image is in the public domain. Source: openclipart
28
Perspective in 2D
Projectively
equivalent
This image is in the public domain. Source: openclipart
29
Perspective in 2D
We’ll just copy z to w, ... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53d96abf747a3c82fd3497d2fea540f5_MIT6_837F12_Lec21.pdf |
D
• (In 3D this is a truncated pyramid.)
image xmin
image xmax
37
The View Frustum in 2D
• Far and near are kind of arbitrary
• They bound the depth storage precision
image xmin
image xmax
38
The Canonical View Volume
z = 1
z = -1
x = -1
x = 1
• Point of the exercise: This gives screen coordinates
an... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53d96abf747a3c82fd3497d2fea540f5_MIT6_837F12_Lec21.pdf |
• Rasterize triangle: find
which pixels should be lit
• Compute per-pixel color
• Test visibility (Z-buffer),
update frame buffer
© source unknown. All rights reserved. This content is
excluded from our Creative Commons license. For more
information, see http://ocw.mit.edu/help/faq-fair-use/.
© Khronos Group. All ... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53d96abf747a3c82fd3497d2fea540f5_MIT6_837F12_Lec21.pdf |
all non-negative, pixel is in!
If the triangle is
small, lots of useless
computation if we
really test all pixels
53
Easy Optimization
• Improvement: Scan over only the pixels that overlap
the screen bounding box of the triangle
• How do we get such a bounding box?
– Xmin, Xmax, Ymin, Ymax of the projected... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53d96abf747a3c82fd3497d2fea540f5_MIT6_837F12_Lec21.pdf |
y + ci
For all pixels x in bbox
If all Ei>0
Framebuffer[x,y ] = triangleColor
Increment line equations: Ei += ai
• We save ~two multiplications and
two additions per pixel when the
triangle is large
59
Incremental Edge Functions
For every triangle
ComputeProjection
Compute bbox, clip bbox to screen ... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53d96abf747a3c82fd3497d2fea540f5_MIT6_837F12_Lec21.pdf |
block is inside the
triangle; then, can skip
edge functions tests for
all pixels for even further
speedups.(Must still test
Z, because they might
still be occluded.)
65
Further References
• Henry Fuchs, Jack Goldfeather, Jeff Hultquist, Susan Spach, John
Austin, Frederick Brooks, Jr., John Eyles and John Pou... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53d96abf747a3c82fd3497d2fea540f5_MIT6_837F12_Lec21.pdf |
, eyey, eyez)
z axis → +
image plane
72
What if the pz = eyez?
When w’ = 0, point projects to infinity
(homogenization is division by w’)
(eyex, eyey, eyez)
???
z axis → +
image plane
73
A Solution: Clipping
"clip" geometry to
view frustum, discard
outside parts
(eyex, eyey, eyez)
z=near
z axis → + ... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53d96abf747a3c82fd3497d2fea540f5_MIT6_837F12_Lec21.pdf |
hierarchically when scene has lots of objects!
• Early rejection (different from clipping)
See e.g. Optimized view
frustum culling
algorithms for bounding
boxes, Ulf Assarsson
and Tomas Möller,
journal of graphics
tools, 2000.
© Oscar Meruvia-Pastor, Daniel Rypl. All rights reserved. This content is excluded f... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53d96abf747a3c82fd3497d2fea540f5_MIT6_837F12_Lec21.pdf |
y’, 1)
3D triangle
84
Homogeneous Rasterization Recap
• Rasterizes with plane tests instead of edge tests
• Removes the need for clipping!
2D pixel
(x’, y’, 1)
3D triangle
85
Homogeneous Rasterization Recap
• Rasterizes with plane tests instead of edge tests
• Removes the need for clipping!
2D pixel
(x’... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53d96abf747a3c82fd3497d2fea540f5_MIT6_837F12_Lec21.pdf |
with closest object
91
Visibility
• In ray casting, use intersection with closest t
• Now we have swapped the loops (pixel, object)
• What do we do?
92
Z buffer
• In addition to frame buffer (R, G, B)
• Store distance to camera (z-buffer)
• Pixel is updated only if newz is closer
than z-buffer value
93
... | https://ocw.mit.edu/courses/6-837-computer-graphics-fall-2012/53d96abf747a3c82fd3497d2fea540f5_MIT6_837F12_Lec21.pdf |
6.863J Natural Language Processing
Lecture 4: From finite state
machines to part-of-speech tagging
Instructor: Robert C. Berwick
The Menu Bar
• Administrivia:
• Schedule alert: Lab1 due next Monday (Feb
24)
• Lab 2, handed out Feb 24; due the Weds
after this – March 5
• Agenda:
• Kimmo – its use and abuse
•... | https://ocw.mit.edu/courses/6-863j-natural-language-and-the-computer-representation-of-knowledge-spring-2003/53fd409787f433f1a014a1ad40fe50ff_lecture4bw_03.pdf |
the two
lexicons, but we know they’re identical
• Principle AWP
• We will see this again and again
• Usually means we haven’t carved
(factored) the knowledge at the right
‘joints’
• Solution? Usually more powerful
machinery ‘overlay’ representations
Not all long distance effects are a
barrier…
• Phenomena: ... | https://ocw.mit.edu/courses/6-863j-natural-language-and-the-computer-representation-of-knowledge-spring-2003/53fd409787f433f1a014a1ad40fe50ff_lecture4bw_03.pdf |
recognition could be done in det
poly time (P) then so could 3-SAT
�
�
�
�
�
�
The reduction
arbitrary 3-SAT problem
y
(
x
(
)
y
z
instance, e.g.,
)
qp
x q z
(
)
Fast
(polytime)
transformation
(fixed)
Lexicon, L
Fst’s, 1
per variable
word˛
L if Sat instance satisfiable
If
Then
we could solv... | https://ocw.mit.edu/courses/6-863j-natural-language-and-the-computer-representation-of-knowledge-spring-2003/53fd409787f433f1a014a1ad40fe50ff_lecture4bw_03.pdf |
escribable words
(for an fst)
• Can we even do all natural languages?
• Example: Bambarra (African language in Mali)
• Words in form Noun+o+Noun, as in
wuluowulo =‘whichever dog’
• Also have repeated endings (like anti-anti…)
wulu+nyini+la =‘dog searcher’
wulunyinina+ nyini+la =‘one who searches
for dog search... | https://ocw.mit.edu/courses/6-863j-natural-language-and-the-computer-representation-of-knowledge-spring-2003/53fd409787f433f1a014a1ad40fe50ff_lecture4bw_03.pdf |
or o.w. processed)
corpora
What is part of speech tagging &
why?
Input: the lead paint is unsafe
Output: the/Det lead/N paint/N is/V unsafe/Adj
Or: BOS the lyric beauties of Schubert ‘s Trout
Quintet : its elemental rhythms and infectious
melodies : make it a source of pure pleasure for
almost all music listen... | https://ocw.mit.edu/courses/6-863j-natural-language-and-the-computer-representation-of-knowledge-spring-2003/53fd409787f433f1a014a1ad40fe50ff_lecture4bw_03.pdf |
challenging:
I know that
I know that block
I know that blocks the sun
• new words (OOV= out of vocabulary); words can
be whole phrases (“I can’t believe it’s not butter”)
What are tags?
• Bridge from words to parsing – but not
quite the morphemic details that Kimmo
provides (but see next slide)
• Idea is more... | https://ocw.mit.edu/courses/6-863j-natural-language-and-the-computer-representation-of-knowledge-spring-2003/53fd409787f433f1a014a1ad40fe50ff_lecture4bw_03.pdf |
approaches will the guts of Lab 2
(lots of others: decision trees, …)
Example tagsets
• 87 tags - Brown corpus
• Three most commonly used:
1. Small: 45 Tags - Penn treebank (Medium
size: 61 tags, British national corpus
2. Large: 146 tags
Big question: have we thrown out the right
info? Impoverished? How?
Br... | https://ocw.mit.edu/courses/6-863j-natural-language-and-the-computer-representation-of-knowledge-spring-2003/53fd409787f433f1a014a1ad40fe50ff_lecture4bw_03.pdf |
?
correct tags
Verb Det Noun Prep Noun Prep Det Noun
cortege of autos through the dunes
Noun Prep Noun Prep Det Noun
Adj Det
PN
Bill directed a
PN
Verb Verb
some possible tags for
each word (maybe more)
Noun Verb
Adj
Prep
…?
Each unknown tag is constrained by its word
and by the tags to its immediate lef... | https://ocw.mit.edu/courses/6-863j-natural-language-and-the-computer-representation-of-knowledge-spring-2003/53fd409787f433f1a014a1ad40fe50ff_lecture4bw_03.pdf |
one
more twist – why? What is Y?)
The plan modeled as composition (x-
product) of finite-state machines
a : a / 0 . 7
a : C / 0 . 1
9
.
0
/
D
:
a
*
b:b/0.3
b:C/0.8
b:D/0.2
a : C / 0 . 0 7
3
6
.
0
/
D
:
a
=
b:C/0.24
b:D/0.06
p(X)
*
p(Y | X)
=
p(X,Y)
Note p(x,y) sums to 1.
Cross-product construction for ... | https://ocw.mit.edu/courses/6-863j-natural-language-and-the-computer-representation-of-knowledge-spring-2003/53fd409787f433f1a014a1ad40fe50ff_lecture4bw_03.pdf |
.2
Stop
*
…
Noun:cortege/0.000001
Noun:autos/0.001
Noun:Bill/0.002
Det:a/0.6
Det:the/0.4
*
Adj :cool/0.003
Adj :directed/0.0005
Adj :cortege/0.000001
…
the
cool
directed
autos
=
transducer: scores candidate tag seqs
on their joint probability with obs words;
we should pick best path
p(X)
*
p(Y | ... | https://ocw.mit.edu/courses/6-863j-natural-language-and-the-computer-representation-of-knowledge-spring-2003/53fd409787f433f1a014a1ad40fe50ff_lecture4bw_03.pdf |
the
words
• What is the most likely tag sequence?
• Use a finite-state automaton, that can
emit the observed words
• FSA has limited memory
• AKA this Noisy channel model is a “Hidden
Markov Model”
Put the punchline before the joke
Bill directed a cortege of autos through the dunes
Recover tags
Punchline – ... | https://ocw.mit.edu/courses/6-863j-natural-language-and-the-computer-representation-of-knowledge-spring-2003/53fd409787f433f1a014a1ad40fe50ff_lecture4bw_03.pdf |
h” is common after “t” (20%)
• If you know the previous 2 letters: 3-grams
• “h” is really common after “ ” “t”
etc. …
In our case
• Most likely word? Most likely tag t given a word
w? = P(tag|word)
• Task of predicting the next word
• Woody Allen:
“I have a gub”
In general: predict the Nth word (tag) from the... | https://ocw.mit.edu/courses/6-863j-natural-language-and-the-computer-representation-of-knowledge-spring-2003/53fd409787f433f1a014a1ad40fe50ff_lecture4bw_03.pdf |
of thing, and vas these conwuning clann com to one language;
all Lah, which for the greath othey die.
5-gram
[Gen 3:1] In the called up history of its opposition of
bourgeOIS AND Adam to rest, that the existing of heaven; and
land the bourgeoiS ANger anything but concealed, the land
whethere had doth know ther: ... | https://ocw.mit.edu/courses/6-863j-natural-language-and-the-computer-representation-of-knowledge-spring-2003/53fd409787f433f1a014a1ad40fe50ff_lecture4bw_03.pdf |
take two
• We approximate p(tag| all previous tags)
Instead of
p(rabbit|Just then the white…) we use:
P(rabbit|white)
• This is a Markov assumption where past
memory is limited to immediately previous
state – just 1 state corresponding to the
previous word or tag
Smoothing
• We don’t see many of the words in E... | https://ocw.mit.edu/courses/6-863j-natural-language-and-the-computer-representation-of-knowledge-spring-2003/53fd409787f433f1a014a1ad40fe50ff_lecture4bw_03.pdf |
wins | weather’s clear) = 0.9
What’s this mean?
p(Paul Revere wins | weather’s clear) = 0.9
• Past performance?
• Revere’s won 90% of races with clear weather
• Hypothetical performance?
• If he ran the race in many parallel universes …
• Subjective strength of belief?
• Would pay up to 90 cents for chance to w... | https://ocw.mit.edu/courses/6-863j-natural-language-and-the-computer-representation-of-knowledge-spring-2003/53fd409787f433f1a014a1ad40fe50ff_lecture4bw_03.pdf |
it’s May 17
of bar ?
Backing off: simplifying the right-
hand side…
p(Paul Revere wins | weather’s clear,
ground is dry, jockey getting over sprain, Epitaph
also in race, Epitaph was recently bought by Gonzalez,
race is on May 17, … )
not exactly what we want but at least we can get a
reasonable estimate of it!
... | https://ocw.mit.edu/courses/6-863j-natural-language-and-the-computer-representation-of-knowledge-spring-2003/53fd409787f433f1a014a1ad40fe50ff_lecture4bw_03.pdf |
observed words
=
transducer: scores candidate tag seqs
b:C/0.24
on their joint probability with obs words;
best path
pick best path
“straight line”
0 . 0
: C /
7
a
p(X)
*
p(Y | X)
*
p(y | Y)
=
p(X, y)
First-order Markov (bigram)
model as fsa
Start
Det
Adj
Verb
Prep
Noun
Stop
Add in transition pro... | https://ocw.mit.edu/courses/6-863j-natural-language-and-the-computer-representation-of-knowledge-spring-2003/53fd409787f433f1a014a1ad40fe50ff_lecture4bw_03.pdf |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.