/
2013-02-15-mrjob.html
216 lines (164 loc) · 5.94 KB
/
2013-02-15-mrjob.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>2013-02-15-mrjob</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<meta name="title" content="2013-02-15-mrjob"/>
<meta name="generator" content="Org-mode"/>
<meta name="generated" content="2013-02-15 13:52:26 PST"/>
<meta name="author" content="Jim Blomo"/>
<meta name="description" content=""/>
<meta name="keywords" content=""/>
<link rel="stylesheet" type="text/css" href="production/common.css" />
<link rel="stylesheet" type="text/css" href="production/screen.css" media="screen" />
<link rel="stylesheet" type="text/css" href="production/projection.css" media="projection" />
<link rel="stylesheet" type="text/css" href="production/color-blue.css" media="projection" />
<link rel="stylesheet" type="text/css" href="production/presenter.css" media="presenter" />
<link href='http://fonts.googleapis.com/css?family=Lobster+Two:700|Yanone+Kaffeesatz:700|Open+Sans' rel='stylesheet' type='text/css'>
</head>
<body>
<div id="preamble">
</div>
<div id="content">
<h1 class="title">2013-02-15-mrjob</h1>
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#sec-1">1 Lab: mrjob</a>
<ul>
<li><a href="#sec-1-1">1.1 mrjob</a></li>
</ul>
</li>
<li><a href="#sec-2">2 Data</a>
<ul>
<li><a href="#sec-2-1">2.1 Agreement</a></li>
</ul>
</li>
<li><a href="#sec-3">3 Understand review_word_count.py</a></li>
<li><a href="#sec-4">4 Fill in unique_review.py</a></li>
<li><a href="#sec-5">5 Write user_similarity.py</a></li>
</ul>
</div>
</div>
<div id="outline-container-1" class="outline-2">
<h2 id="sec-1"><span class="section-number-2">1</span> Lab: mrjob <span class="tag"><span class="slide">slide</span></span></h2>
<div class="outline-text-2" id="text-1">
<ul>
<li>Understand <code>review_word_count.py</code>
</li>
<li>Find review with most unique words
<ul>
<li>Fill in <code>unique_review.py</code>
</li>
</ul>
</li>
<li>Find similar users
<ul>
<li>Write <code>user_similarity.py</code>
</li>
</ul>
</li>
</ul>
</div>
<div id="outline-container-1-1" class="outline-3">
<h3 id="sec-1-1"><span class="section-number-3">1.1</span> mrjob <span class="tag"><span class="notes">notes</span></span></h3>
<div class="outline-text-3" id="text-1-1">
<ul>
<li>Using the Yelp Academic Dataset
</li>
<li>In lecture, we covered the steps for most unique words
</li>
<li>Use Jaccard similarity for user_similarity
</li>
</ul>
</div>
</div>
</div>
<div id="outline-container-2" class="outline-2">
<h2 id="sec-2"><span class="section-number-2">2</span> Data <span class="tag"><span class="slide">slide</span></span></h2>
<div class="outline-text-2" id="text-2">
<ul>
<li>ischool: <code>~jblomo/yelp_academic_dataset.json</code>
</li>
<li>May copy or use in place
</li>
</ul>
</div>
<div id="outline-container-2-1" class="outline-3">
<h3 id="sec-2-1"><span class="section-number-3">2.1</span> Agreement <span class="tag"><span class="notes">notes</span></span></h3>
<div class="outline-text-3" id="text-2-1">
<ul>
<li>Data set only for use academic purposes
</li>
<li><a href="http://www.yelp.com/academic_dataset">Yelp Dataset</a>
</li>
</ul>
</div>
</div>
</div>
<div id="outline-container-3" class="outline-2">
<h2 id="sec-3"><span class="section-number-2">3</span> Understand review_word_count.py <span class="tag"><span class="slide">slide</span></span></h2>
<div class="outline-text-2" id="text-3">
<pre class="src src-bash">$ python review_word_count.py yelp_academic_dataset.json
no configs found; falling back on auto-configuration
creating tmp directory /tmp/review_word_count.jim.20130215.071901.095847
reading from file
> /home/jim/src/datamining290/code/venv/bin/python review_word_count.py --step-num=0 --mapper /tmp/review_word_count.jim.20130215.071901.095847/input_part-00000
writing to /tmp/review_word_count.jim.20130215.071901.095847/step-0-mapper_part-00000
Counters from step 1:
(no counters found)
...
Streaming final output from /tmp/review_word_count.jim.20130215.071901.095847/output
<span style="color: #8b2252;">"4"</span> 2
<span style="color: #8b2252;">"5"</span> 1
<span style="color: #8b2252;">"50"</span> 1
<span style="color: #8b2252;">"6"</span> 2
<span style="color: #8b2252;">"7"</span> 2
<span style="color: #8b2252;">"70s"</span> 1
<span style="color: #8b2252;">"9"</span> 2
<span style="color: #8b2252;">"a"</span> 46
<span style="color: #8b2252;">"abbey"</span> 4
<span style="color: #8b2252;">"able"</span> 1
<span style="color: #8b2252;">"about"</span> 4
</pre>
</div>
</div>
<div id="outline-container-4" class="outline-2">
<h2 id="sec-4"><span class="section-number-2">4</span> Fill in unique_review.py <span class="tag"><span class="slide">slide</span></span></h2>
<div class="outline-text-2" id="text-4">
<ul>
<li>Mutli-step map reduce
</li>
<li>Steps are explained in lecture
</li>
<li>Skeleton in code
</li>
</ul>
</div>
</div>
<div id="outline-container-5" class="outline-2">
<h2 id="sec-5"><span class="section-number-2">5</span> Write user_similarity.py <span class="tag"><span class="slide">slide</span></span></h2>
<div class="outline-text-2" id="text-5">
<ul>
<li>Find users >= 0.5 similarity
</li>
<li>User Similarity: Jaccard similarity of businesses reviewed
</li>
<li>{BizA, BizB, BizC} ~ {BizF, BizB, BizG}
</li>
</ul>
<script type="text/javascript" src="production/org-html-slideshow.js"></script>
</div>
</div>
</div>
<div id="postamble">
<p class="date">Date: 2013-02-15 13:52:26 PST</p>
<p class="author">Author: Jim Blomo</p>
<p class="creator">Org version 7.8.02 with Emacs version 23</p>
<a href="http://validator.w3.org/check?uri=referer">Validate XHTML 1.0</a>
</div>
</body>
</html>