naive ba yes
TRANSCRIPT
-
8/12/2019 Naive Ba Yes
1/74
Text Classific
and Nave Ba
!"# !%&' () !,-%&&./0%1(
-
8/12/2019 Naive Ba Yes
2/74
3%2 456%)&'7
!" $%&" "'()*
-
8/12/2019 Naive Ba Yes
3/74
3%2 456%)&'7
+%, -.,$/ -%&0% 1/2/.(3&"$ '('/."
89:9;:< %2(27=(5& #&&%7& +67 +( 0(2>.20# ?#@ A(6'+( 6%1)7 BCD ,(2&1+51(2< 4%7E F%G.&(2E H%=.-+(2C
I5+"(6&".J () 8K () +"# -#L#6& .2 G.&J5+#
8MNO< &(->#G P7 F(&+#--#6 %2G Q%--%0# 5&.2R
S%7#&.%2 =#+"(G&
4%=#& F%G.&(2 I-#*%2G#6 H%=.-+(2
-
8/12/2019 Naive Ba Yes
4/74
3%2 456%)&'7
4(3/ ,. 5/)(3/ (6$%,.*
8C
S7 8MKT J6#+;G%7 U.#+2%= @%& G.>.G#G .2+( +"6##
52G#6 V6#20" 0(-(2.%- 65-#C !"# &(5+"#62 6#R.(2 #=P
D%.R(2 %2G +"# F#'(2R G#-+% @%& +"# 0(-(27 () ,(0"
+"# 0#2+6%- %6#% @.+" .+& .=J#6.%- 0%J.+%- %+ H5# @%& +
J6(+#0+(6%+# () I22%=X
KC
,-%6% 2#>#6 )%.-#G +( P# %&+(2.&"#G P7 +"# #*+6%(6G.2
() "#6 (@2 2%=#C D"# )(52G .+ "%6G +( +65&+ "#6-) +
=#607 () )%+#E @".0" "%G =%2%R#G (>#6 +"# 7#%6& +(
"#6 R6#%+#&+ &"%=# .2+( (2# () "#6 R6#%+#&+ %&+&X
DC I6R%=(2E FC Y(JJ#-E 4C V.2#E IC ZC D".=(2.E K[[OC \]#2G#6E ]#26#E %2G Q6.12R D+7-# .2 V(6=%- Q6.L#2 !#*+&E^ !#*+OK8_O`N
-
8/12/2019 Naive Ba Yes
5/74
3%2 456%)&'7
7,"&89/ ,. :/;(89/ ),9&/ ./9&/-*
52P#-.#>%P-7 G.&%JJ(.212R
V5-- () a%27 0"%6%0+#6& %2G 6.0"-7 %JJ-.#G &%16#E %
R6#%+ J-(+ +@.&+&
+".& .& +"# R6#%+#&+ &06#@P%-- 0(=#G7 #>#6 /-=#G
b+ @%& J%+"#10C !"# @(6&+ J%6+ %P(5+ .+ @%& +"# P&0#2#&C
T
-
8/12/2019 Naive Ba Yes
6/74
3%2 456%)&'7
+%($ &" $%/ "6
-
8/12/2019 Naive Ba Yes
7/74
-
8/12/2019 Naive Ba Yes
8/74
3%2 456%)&'7
B/C$ @3(""&D0(8,:E 2/D:&8,:
!"#$%< % G(05=#2+ &
% /*#G + () 0-%&& ( hi)8E )KEXE )*j
+$%#$%< % J6#G.0+#G 0-%&& )!(
-
8/12/2019 Naive Ba Yes
9/74
3%2 456%)&'7
@3(""&D0(8,: 4/$%,2"E
?(:2F0,2/2 .63/"
Z5-#& P%G (2 0(=P.2%1(2& () @(6G& (6 (+"#6 )#%+5
&J%=< P-%0';-.&+;%GG6#&& kZ l\G(--%6&^ I?3\"%># P##2 -#0
I0056%07 0%2 P# ".R"
b) 65-#& 0%6#)5--7 6#/2#G P7 #*J#6+
S5+ P5.-G.2R %2G =%.2+%.2.2R +"# 65-#& .& #*J#2&.>#
-
8/12/2019 Naive Ba Yes
10/74
3 4 ) '
3 &D 8 % 2
-
8/12/2019 Naive Ba Yes
11/74
3%2 456%)&'7
@3(""&D0(8,: 4/$%,2"E
>6'/.9&"/2 4(0%&:/ G/(.:&:;
I27 '.2G () 0-%&&./#6
?%n># S%7#&
g(R.&10 6#R6#&&.(2
D5JJ(6+;>#0+(6 =%0".2#&
';?#%6#&+ ?#.R"P(6&
X
-
8/12/2019 Naive Ba Yes
12/74
-
8/12/2019 Naive Ba Yes
13/74
Text Classific
and Nave Ba
?%n># S%7#&
3%2 456%)&'7
-
8/12/2019 Naive Ba Yes
14/74
3%2 456%)&'7
H(I9/ J(A/" !:$6&8,:
D.=J-# l\2%n>#^m 0-%&&./0%1(2 =#+"(G P%G (S%7#& 65-#
Z#-.#& (2 >#67 &.=J-# 6#J6#+%1(2 () G(05=
S%R () @(6G&
3%2 456%)&'7
-
8/12/2019 Naive Ba Yes
15/74
3%2 456%)&'7
B%/
-
8/12/2019 Naive Ba Yes
16/74
3%2 456%)&'7
B%/
-
8/12/2019 Naive Ba Yes
17/74
% 45 % & 7
B%/
-
8/12/2019 Naive Ba Yes
18/74
7
B%/
-
8/12/2019 Naive Ba Yes
19/74
Garbage
Collection
MachineLearning NLP
parsertag
trainingtranslationlanguage...
learningtraining
algorithmshrinkagenetwork...
garbagecollection
memoryoptimizationregion...
Test
document
parser
language
label
translation
J(; ,5 -,.2" 5,. 2,06)/:$ 03(""&D0
d
-
8/12/2019 Naive Ba Yes
20/74
Text Classific
and Nave Ba
?%n># S%7#&
-
8/12/2019 Naive Ba Yes
21/74
Text Classific
and Nave Ba
V(6=%-.a.2R ?%n># S%7#
,-%&&./#6
3%2 456%)&'7
J K L 3 M 3& 2 N
-
8/12/2019 Naive Ba Yes
22/74
J(A/"K L63/ M''3&/2 $, N,06)/:$"
@3(""/"
P(c | d) =P
(d
|c)P
(c)
P(d)
o
V(6 % G(05=#2+ &%2G % 0-%&& )
3%2 456%)&'7
-
8/12/2019 Naive Ba Yes
23/74
H(I9/ J(A/" @3(""&D/. O!P
cMAP
= argmaxc!C
P(c | d)
= argmaxc!C
P(d| c)P(c)
P(d)
= argmaxc!C
P(d| c)P(c)
MAP is mposteriorilikely clas
Bay
Drde
-
8/12/2019 Naive Ba Yes
24/74
-
8/12/2019 Naive Ba Yes
25/74
3%2 456%)&'7
4 38 & 3 H I J ! 2 2
-
8/12/2019 Naive Ba Yes
26/74
4638:,)&(3 H(I9/ J(A/" !:2/'/:2
M""6)'8,:"
P(x1, x
2,, x
n
| c)
J(; ,5 +,.2" (""6)'8,:< I&&5=# J(&.1(2 G
=%L#6
@,:2&8,:(3 !:2/'/:2/:0/< I&&5=# +"# )#%+5J6(P%P.-.1#& 5l67p)8m %6# .2G#J#2G#2+ R.>#2 +"
P(x1,, x
n| c) = P(x
1| c)P(x
2| c)P(x
3| c)...
3%2 456%)&'7
-
8/12/2019 Naive Ba Yes
27/74
4638:,)&(3 H(I9/ J(A/" @3(""&D/.
cMAP = argmaxc!C
P(x1,x2,
,xn| c)P(c)
cNB =
argmaxc!C P(cj) P(x | c)x!X"
3%2 456%)&'7
M''3A&:; 4638:,)&(3 H(&9/ J(A/"
-
8/12/2019 Naive Ba Yes
28/74
M''3A&:; 4638:,)&(3 H(&9/ J(A/"
@3(""&D/." $, B/C$ @3(""&D0(8,:
cNB = argmaxcj!C
P(cj) P(xi| cji!positions"
positions "%-- @(6G J(&.1(2& .2 +#&+ G(05=#
-
8/12/2019 Naive Ba Yes
29/74
Text Classific
and Nave Ba
V(6=%-.a.2R ?%n># S%7#
,-%&&./#6
-
8/12/2019 Naive Ba Yes
30/74
Text Classific
and Nave Ba
?%n># S%7#g#%62.2R
3%2 456%)&'7
-
8/12/2019 Naive Ba Yes
31/74
G/(.:&:; $%/ 4638:,)&(3 H(I9/ J(A/
V.6&+ %L#=J+< =%*.=5= -.'#-."((G #&1 &.=J-7 5 +"# )6#r5#20.#& .2 +"# G%+%
P(wi| cj)=count(wi,cj)
count(w,cj)
w!V
"
P(cj) =doccount(C = cj)
Ndoc
3%2 456%)&'7
-
8/12/2019 Naive Ba Yes
32/74
,6#%+# =#R%;G(05=#2+ )(6 +(J.08P7 0(20%+#2%12R +".& +(J.0
B )6#r5#207 () 9.2 =#R%;G(05=#2+
7(.()/$/. /"8)(8,:
)6%01(2 () 1=#& @(6G 97
%=(2R %-- @(6G& .2 G(05=#2P(wi| cj) =
count(wi,cj)
count(w,cj)
w!V
"
3%2 456%)&'7
-
8/12/2019 Naive Ba Yes
33/74
7.,# #2 2( +6%.2.2R G(05=#2+& @.+" +"!"#$"%&' %2G 0-%&&./#G .2 +"# +(J.0 ',"&89/l$()*+
s#6( J6(P%P.-.1#& 0%22(+ P# 0(2G.1(2#G %@%7E 2( =+"# (+"#6 #>.G#20#t
P("fantastic" positive) = count("fantastic", positive)
count(w, positive
w!V
" ) = 0
cMAP
= argmaxc
P(c) P(xi| c)
i!
-
8/12/2019 Naive Ba Yes
34/74
3%2 456%)&'7
-
8/12/2019 Naive Ba Yes
35/74
4638:,)&(3 H(I9/ J(A/"E G/(.:&:;
,%-05-%+# 5l)8m+#6=&
V(6 #%0" )8 .2 (G(
&:);8"%-- G(0& @.+" 0-%&& h)8
P(wk | cj)!n+!
P(cj)!| docsj |
| total # documents|
,%-05-%+# 5l96%8"&.2R-# G(0 0(2+%
V(6#%0" @(6G 9
-
8/12/2019 Naive Ba Yes
36/74
Text Classific
and Nave Ba
?%n># S%7#g#%62.2R
-
8/12/2019 Naive Ba Yes
37/74
Text Classific
and Nave Ba
?%n># S%7#Z#-%1(2&".J
g%2R5%R# F(G
3%2 456%)&'7
-
8/12/2019 Naive Ba Yes
38/74
T/:/.(89/ 4,2/3 5,. 4638:,)&(3 H(I9
O:
c=China
X1=Shanghai X2=and X3=Shenzhen X4=issue X5
3%2 456%)&'7
-
8/12/2019 Naive Ba Yes
39/74
H(I9/ J(A/" (:2 G(:;6(;/ 4,2/3&:
?%n># P%7#& 0-%&&./#6& 0%2 5 %27 &(6+ () )#%+
BZgE #=%.- %GG6#&&E G.01(2%6.#&E 2#+@(6' )#%+56#&
S5+ .)E %& .2 +"# J6#>.(5& &-.G#&
Q# 5 ,:3A@(6G )#%+56#&
@# 5 (33() +"# @(6G& .2 +"# +#*+ l2(+ % &5P+m
!"#2
?%n># P%7#& "%& %2 .=J(6+%2+ &.=.-%6.+7 +( -%2R5%R
=(G#-.2RCOM
3%2 456%)&'7
-
8/12/2019 Naive Ba Yes
40/74
U(0% 03("" V ( 6:&;.() 3(:;6(;/ ),
I&&.R2.2R #%0" @(6G< vl@(6G p 0m
I&&.R2.2R #%0" +#20#< vl&p0mh#vl@(6Gp0m
[C8 b
[C8 -(>#
[C[8 +".&
[C[T )52
[C8 /-=
b -(># +".& )52 /
[C8 [C8 C[T [C[8 [
,-%&:;
vl& p J(&m h
3%2 456%)&'7
-
8/12/2019 Naive Ba Yes
41/74
H(I9/ J(A/" (" ( G(:;6(;/ 4,2/3
Q".0" 0-%&& %&&.R2& +"# ".R"#6 J6(P%P.-.+7 +( &d
[C8 b
[C8 -(>#
[C[8 +".&
[C[T )52
[C8 /-=
F(G#- J(& F(G#- 2#R
-(># +".& b
[C8 [C[8 [C8[C[[8 [C[8 [CK
vl&pJ(&m w vl&
[CK b
[C[[8 -(>#
[C[8 +".&
[C[[T )52
[C8 /-=
-
8/12/2019 Naive Ba Yes
42/74
Text Classific
and Nave Ba
?%n># S%7#Z#-%1(2&".J
g%2R5%R# F(G
-
8/12/2019 Naive Ba Yes
43/74
Text Classific
and Nave Ba
F5-12(=.%- ?S%7#&< I Q(
c*%=J-#
3%2 456%)&'7 N,0 +,.2"
!6%.2.2R 8 ,".2# S#.e.2R ,".2#P( )
N
-
8/12/2019 Naive Ba Yes
44/74
@%,,"&:; ( 03(""E
vl0pGTm
vlepGTm 8f` x lKfMy [C[[
!6%.2.2R 8 ,".2# S#.e.2R ,".2#
K ,".2# ,".2# D"%2R"%.
O ,".2# F%0%(
` !('7( 4%J%2 ,".2#
!#&+ T ,".2# ,".2# ,".2# !('7( 4%
``
@,:2&8,:(3 7.,
-
8/12/2019 Naive Ba Yes
45/74
H(I9/ J(A/" &: >'() 1&3$/.&:;
DJ%=I&&%&&.2 V#%+56#&.1#&{
"LJ
-
8/12/2019 Naive Ba Yes
46/74
>6))(.AE H(&9/ J(A/" &" H,$ >, H(
U#67 V%&+E -(@ &+(6%R# 6#r5.6#=#2+&
Z(P5&+ +( b66#-#>%2+ V#%+56#&b66#-#>%2+ V#%+56#& 0%20#- #%0" (+"#6 @.+"(5+ %}#012R 6#&5-+&
U#67 R((G .2 G(=%.2& @.+" =%27 #r5%--7 .=J(6+%2+ )#%+
3#0.&.(2 !6##& &5}#6 )6(=EC@F->"%@G:".2 &50" 0%& _ #&J#0.%--7 .) -
kJ1=%- .) +"# .2G#J#2G#20# %&&5=J1(2& "(-G< b) %&&5=#.2G#J#2G#20# .& 0(66#0+E +"#2 .+ .& +"# S%7#& kJ1=%- ,-%&&./#6 )(6
I R((G G#J#2G%P-# P%-.2# )(6 +#*+ 0-%&&./0%1(2
J6$ -/ -&33 "// ,$%/. 03(""&D/." $%($ ;&9/
-
8/12/2019 Naive Ba Yes
47/74
-
8/12/2019 Naive Ba Yes
48/74
Text Classific
and Nave Ba
v6#0.&.(2E Z#0%+"# V =#%&5
3%2 456%)&'7
-
8/12/2019 Naive Ba Yes
49/74
B%/ XF
-
8/12/2019 Naive Ba Yes
50/74
7./0&"&,: (:2 ./0(33
7./0&"&,:< ~ () -#0+#G .+#=& +"%+ %6# 0(66#0+
L/0(33< ~ () 0(66#0+ .+#=& +"%+ %6# -#0+#G
0(66#0+ 2(+ 0(66#0+
-#0+#G +J )J
2(+ -#0+#G )2 +2
-
8/12/2019 Naive Ba Yes
51/74
-
8/12/2019 Naive Ba Yes
52/74
Text Classific
and Nave Ba
v6#0.&.(2E Z#0%
+"# V =#%&5
-
8/12/2019 Naive Ba Yes
53/74
Text Classific
and Nave Ba
!#*+ ,-%&&./0%c>%-5%1(
3%2 456%)&'7
4,./ B%(: B-, @3(""/"E
-
8/12/2019 Naive Ba Yes
54/74
T`
>/$" ,5 %-5# 0-%&&./0%1(2
I G(05=#2+ 0%2 P#-(2R +( [E 8E (6 w8 0-%&&C
V(6 #%0" 0-%&& 0,
S5.-G % 0-%&&./#6 0+( G.&12R5.&" 0)6(= %-- (+"#6 0-%&& 0q
].>#2 +#&+ G(0 GE
c>%-5%+# .+ )(6 =#=P#6&".J .2 #%0" 0-%&& 5&.2R #%0" 0
GP#-(2R& +( %270-%&& )(6 @".0"0 6#+562& +65#
3%2 456%)&'7
4,./ B%(: B-, @3(""/"E
-
8/12/2019 Naive Ba Yes
55/74
TT
>/$" ,5
-
8/12/2019 Naive Ba Yes
56/74
TN
F(&+ l(>#6m5G G%+% +E K8ET9: G(0& l#%0" M[ +7J#&E K[
MN[O +6%.2.2RE OKMM +#&+ %610-#& lF(GIJ+#fg#@.& &J-.+m 88: 0%+#R(6.#&
I2 %610-# 0%2 P# .2 =(6# +"%2 (2# 0%+#R(67
g#%62 88: P.2%67 0%+#R(67 G.&1201(2&
I>#6%R# G(05=#2+ l@.+" %+ -#%&+ (2# 0%+#R(67m "%& 8CK k2-7 %P(5+ 8[ (5+ () 88: 0%+#R(6.#& %6# -%6R#
Common categories(#train, #test)
@3(""&0 L/6$/."FXSYZ[ N($( >/$
Earn (2877, 1087)Acquisitions (1650, 179) Money-fx (538, 179) Grain (433, 149)
Crude (389 189)
Trade (369,11 Interest (347, Ship (197, 89) Wheat (212, 7
Corn (182 56) 3%2 456%)&'7
L/6$/." B/C$ @($/;,.&\(8,: 2($( "/
O P 2
-
8/12/2019 Naive Ba Yes
57/74
T9
OL/6$/."FXSYZ[P 2,06)/:$
2-MAR-1987 16:51:43.42
livestockhog
AMERICAN PORK CONGRESS KICKS OFF TOMORROW
CHICAGO, March 2 - The American Pork Congress ki
March 3, in Indianapolis with 160 of the nations pork producers from 44 member states determinin
on a number of issues, according to the National Pork Producers Council, NPPC.
Delegates to the three day Congress will be considering 26 resolutions concerning various issue
direction of farm policy and the tax law as it applies to the agriculture sector. The delegates will al
endorse concepts of a national PRV (pseudorabies virus) control and eradication program, the NPP
A large trade show, in conjunction with the congress, will feature the latest in technology in all a
the NPPC added. Reuter
3%2 456%)&'7
@,:56"&,: )($.&C 0
-
8/12/2019 Naive Ba Yes
58/74
@,:56"&,: )($.&C 0
V(6 #%0" J%.6 () 0-%&& 08E0Kw "(@ =%27 G(05=#
@#6# .20(66#0+-7 %&&.R2#G +( 0Kd
0OEK< M[ @"#%+ G(05=#2+& .20(66#0+-7 %&&.R2#G +( J(5-+67
T:
N,0" &: $/"$ "/$ M""&;:/2]^
M""&;:/2',63$.A
M""&;:/2-%/($
M""&;:/20,_//
M""&;:/2&:$/./"$
B.6/ ]^ MT 8 8O [ 8
B.6/ ',63$.A [ 8 [ [ [ B.6/ -%/($ 8[ M[ [ 8 [
B.6/ 0,_// [ [ [ O` O
B.6/ &:$/./"$ ; 8 K 8O KN
B.6/ $.(2/ [ [ K 8` T
3%2 456%)&'7
7/. 03("" /9(36(8,: )/("6./"
-
8/12/2019 Naive Ba Yes
59/74
TM
7/. 03("" /9(36(8,: )/("6./"
L/0(33#6%R#G J6#0.&.(2< l[CT z [CMmfK h [C9
F.06(%>#6%R#G J6#0.&.(2< 8[[f8K[ h C:O
F.06(%>#6%R#G &0(6# .& G(=.2%+#G P7 &0(6# (2 0(==
3%2 456%)&'7
N/9/3,')/:$ B/"$ >/$" (:2 @.,""F9
-
8/12/2019 Naive Ba Yes
62/74
N/9/3,')/:$ B/"$ >/$" (:2 @.,"" 9
F#+6.0< vfZfV8 (6 I0056%07
B2#2 +#&+ + %>(.G (>#6/2R l+52.2R +( +"# +#&+ +qm
=(6# 0(2>%1># #&1=%+# () J#6)(6=%20#
,6(&&;>%-.G%1(2 (>#6 =5-1J-# &J-.+& H%2G-# &%=J-.2R #66(6& )6(= G.}#6#2+ G%+%+&
v((- 6#&5-+& (>#6 #%0" &J-.+
,(=J5+# J((-#G G#> + J#6)(6=%20#
!6%.2.2R + 3#>#-(J=#2+ !#&+ D#+ !#&+ D#+
!
!6%.2.2R D#
3#> !#&+
!6%.2.2R D#
-
8/12/2019 Naive Ba Yes
63/74
Text Classific
and Nave Ba
!#*+ ,-%&&./0%c>%-5%1(
-
8/12/2019 Naive Ba Yes
64/74
Text Classific
and Nave Ba
!#*+ ,-%&&./0%
v6%010%- b&&
3%2 456%)&'7
The Real World
-
8/12/2019 Naive Ba Yes
65/74
NT
The Real World
]##E bq= P5.-G.2R % +#*+ 0-%&&./#6 )(6 6#%-E 2(@t
Q"%+ &"(5-G b G(d
3%2 456%)&'7
No training data?Manually written rules
-
8/12/2019 Naive Ba Yes
66/74
NN
Manually written rules
b) l@"#%+ (6 R6%.2m %2G 2(+ l@"(-# (6 P6#%Gm +"#2
,%+#R(6.a# %& R6%.2
?##G 0%6#)5- 06%.2R
H5=%2 +52.2R (2 G#>#-(J=#2+ G%+%
!.=#;0(2&5=.2R< K G%7& J#6 0-%&&
3%2 456%)&'7
Very little data?
-
8/12/2019 Naive Ba Yes
67/74
N9
Very little data?
B ?%n># S%7#&
?%n># S%7#& .& % \".R";P.%&^ %-R(6.+"= l?R %2G 4(6G%2
]#+ =(6# -%P#-#G G%+%
V.2G 0-#>#6 @%7& +( R#+ "5=%2& +( -%P#- G%+% )(6 7(
!67 =.;&5J#6>.G +6%.2.2R =#+"(G 52-%P#-#G G(05=#2+&E X
3%2 456%)&'7
A reasonable amount of data?
-
8/12/2019 Naive Ba Yes
68/74
N:
A reasonable amount of data?
v#6)#0+ )(6 %-- +"# 0-#>#6 0-%&&./#6&
DUF
Z#R5-%6.a#G g(R.&10 Z#R6#&&.(2
A(5 0%2 #>#2 5 5.2+#6J6#+%P-# G#0.&.(2
B& -.'# +( "%0'
F%2%R#=#2+ -.'#& r5.0' /*#&
3%2 456%)&'7
A huge amount of data?
-
8/12/2019 Naive Ba Yes
69/74
NM
A huge amount of data?
,%2 %0".#># ".R" %0056%07t
I+ % 0(&+% @B0K[[Km
T t Cl ifi
-
8/12/2019 Naive Ba Yes
74/74
Text Classific
and Nave Ba
!#*+ ,-%&&./0%
v6%010%- b&&