\n",
83 | " \n",
84 | " name | \n",
85 | " type | \n",
86 | " comment | \n",
87 | "
\n",
88 | " \n",
89 | " idx | \n",
90 | " bigint | \n",
91 | " | \n",
92 | "
\n",
93 | " \n",
94 | " product_id | \n",
95 | " string | \n",
96 | " | \n",
97 | "
\n",
98 | " \n",
99 | " num_reviews | \n",
100 | " int | \n",
101 | " | \n",
102 | "
\n",
103 | " \n",
104 | " price | \n",
105 | " string | \n",
106 | " | \n",
107 | "
\n",
108 | " \n",
109 | " simple_category | \n",
110 | " string | \n",
111 | " | \n",
112 | "
\n",
113 | " \n",
114 | " title | \n",
115 | " string | \n",
116 | " | \n",
117 | "
\n",
118 | " \n",
119 | " category_list_0 | \n",
120 | " string | \n",
121 | " | \n",
122 | "
\n",
123 | " \n",
124 | " category_list_1 | \n",
125 | " string | \n",
126 | " | \n",
127 | "
\n",
128 | " \n",
129 | " category_list_2 | \n",
130 | " string | \n",
131 | " | \n",
132 | "
\n",
133 | " \n",
134 | " category_list_3 | \n",
135 | " string | \n",
136 | " | \n",
137 | "
\n",
138 | " \n",
139 | " ... | \n",
140 | " ... | \n",
141 | " ... | \n",
142 | "
\n",
143 | "
\n",
144 | "[15 rows x 3 columns]
Note: Only the head of the SFrame is printed.
You can use print_rows(num_rows=m, num_columns=n) to print more rows and columns.\n",
145 | "
"
146 | ],
147 | "metadata": {},
148 | "output_type": "pyout",
149 | "prompt_number": 5,
150 | "text": [
151 | "Columns:\n",
152 | "\tname\tstr\n",
153 | "\ttype\tstr\n",
154 | "\tcomment\tstr\n",
155 | "\n",
156 | "Rows: 15\n",
157 | "\n",
158 | "Data:\n",
159 | "+-----------------+--------+---------+\n",
160 | "| name | type | comment |\n",
161 | "+-----------------+--------+---------+\n",
162 | "| idx | bigint | |\n",
163 | "| product_id | string | |\n",
164 | "| num_reviews | int | |\n",
165 | "| price | string | |\n",
166 | "| simple_category | string | |\n",
167 | "| title | string | |\n",
168 | "| category_list_0 | string | |\n",
169 | "| category_list_1 | string | |\n",
170 | "| category_list_2 | string | |\n",
171 | "| category_list_3 | string | |\n",
172 | "| ... | ... | ... |\n",
173 | "+-----------------+--------+---------+\n",
174 | "[15 rows x 3 columns]\n",
175 | "Note: Only the head of the SFrame is printed.\n",
176 | "You can use print_rows(num_rows=m, num_columns=n) to print more rows and columns."
177 | ]
178 | }
179 | ],
180 | "prompt_number": 5
181 | },
182 | {
183 | "cell_type": "markdown",
184 | "metadata": {},
185 | "source": [
186 | "Cool! Now let's stream some data into an SFrame."
187 | ]
188 | },
189 | {
190 | "cell_type": "code",
191 | "collapsed": false,
192 | "input": [
193 | "# run a simple SELECT to get titles for all products with more than 100 reviews\n",
194 | "titles_sf = gl.SFrame.from_odbc(db, \"SELECT title, num_reviews, simple_category FROM titles WHERE num_reviews > 25\")\n",
195 | "titles_sf"
196 | ],
197 | "language": "python",
198 | "metadata": {},
199 | "outputs": [
200 | {
201 | "html": [
202 | "\n",
203 | " \n",
204 | " title | \n",
205 | " num_reviews | \n",
206 | " simple_category | \n",
207 | "
\n",
208 | " \n",
209 | " reality | \n",
210 | " 166 | \n",
211 | " Music | \n",
212 | "
\n",
213 | " \n",
214 | " keeping heart on pine ridg ... | \n",
215 | " 26 | \n",
216 | " Books | \n",
217 | "
\n",
218 | " \n",
219 | " eric meyer on css: mastering the languag ... | \n",
220 | " 68 | \n",
221 | " Books | \n",
222 | "
\n",
223 | " \n",
224 | " pierrot le fou (1969) | \n",
225 | " 52 | \n",
226 | " Movies & TV | \n",
227 | "
\n",
228 | " \n",
229 | " the life of john wesley hardin as written by ... | \n",
230 | " 27 | \n",
231 | " Books | \n",
232 | "
\n",
233 | " \n",
234 | " snakes on a train (unrated director's ... | \n",
235 | " 26 | \n",
236 | " Movies & TV | \n",
237 | "
\n",
238 | " \n",
239 | " t2 : infiltra | \n",
240 | " 35 | \n",
241 | " Books | \n",
242 | "
\n",
243 | " \n",
244 | " drop dead fred [region 2] (1991) ... | \n",
245 | " 161 | \n",
246 | " Movies & TV | \n",
247 | "
\n",
248 | " \n",
249 | " loser goes first: my thirty-something year ... | \n",
250 | " 32 | \n",
251 | " Books | \n",
252 | "
\n",
253 | " \n",
254 | " irresistible (banning sisters trilogy) ... | \n",
255 | " 29 | \n",
256 | " Books | \n",
257 | "
\n",
258 | " \n",
259 | " ... | \n",
260 | " ... | \n",
261 | " ... | \n",
262 | "
\n",
263 | "
\n",
264 | "[71639 rows x 3 columns]
Note: Only the head of the SFrame is printed.
You can use print_rows(num_rows=m, num_columns=n) to print more rows and columns.\n",
265 | "
"
266 | ],
267 | "metadata": {},
268 | "output_type": "pyout",
269 | "prompt_number": 14,
270 | "text": [
271 | "Columns:\n",
272 | "\ttitle\tstr\n",
273 | "\tnum_reviews\tint\n",
274 | "\tsimple_category\tstr\n",
275 | "\n",
276 | "Rows: 71639\n",
277 | "\n",
278 | "Data:\n",
279 | "+-------------------------------+-------------+-----------------+\n",
280 | "| title | num_reviews | simple_category |\n",
281 | "+-------------------------------+-------------+-----------------+\n",
282 | "| reality | 166 | Music |\n",
283 | "| keeping heart on pine ridg | 26 | Books |\n",
284 | "| eric meyer on css: masteri... | 68 | Books |\n",
285 | "| pierrot le fou (1969) | 52 | Movies & TV |\n",
286 | "| the life of john wesley ha... | 27 | Books |\n",
287 | "| snakes on a train (unrated... | 26 | Movies & TV |\n",
288 | "| t2 : infiltra | 35 | Books |\n",
289 | "| drop dead fred [region 2] ... | 161 | Movies & TV |\n",
290 | "| loser goes first: my thirt... | 32 | Books |\n",
291 | "| irresistible (banning sist... | 29 | Books |\n",
292 | "| ... | ... | ... |\n",
293 | "+-------------------------------+-------------+-----------------+\n",
294 | "[71639 rows x 3 columns]\n",
295 | "Note: Only the head of the SFrame is printed.\n",
296 | "You can use print_rows(num_rows=m, num_columns=n) to print more rows and columns."
297 | ]
298 | }
299 | ],
300 | "prompt_number": 14
301 | },
302 | {
303 | "cell_type": "markdown",
304 | "metadata": {},
305 | "source": [
306 | "We can use GraphLab Canvas to visualize the data."
307 | ]
308 | },
309 | {
310 | "cell_type": "code",
311 | "collapsed": false,
312 | "input": [
313 | "titles_sf.show()"
314 | ],
315 | "language": "python",
316 | "metadata": {},
317 | "outputs": [
318 | {
319 | "output_type": "stream",
320 | "stream": "stdout",
321 | "text": [
322 | "Canvas is accessible via web browser at the URL: http://localhost:63103/index.html\n"
323 | ]
324 | }
325 | ],
326 | "prompt_number": 15
327 | },
328 | {
329 | "cell_type": "markdown",
330 | "metadata": {},
331 | "source": [
332 | "And now that we have our data in an SFrame, we're ready to start training predictive models, and deploying them to production!"
333 | ]
334 | }
335 | ],
336 | "metadata": {}
337 | }
338 | ]
339 | }
--------------------------------------------------------------------------------
/strata-nyc-2015/README.md:
--------------------------------------------------------------------------------
1 | # Strata + Hadoop World, New York City, 2015
2 |
3 | This directory contains demo notebooks used for **Machine Learning 101**, an all-day tutorial at [Strata + Hadoop World, New York City, 2015](http://strataconf.com/big-data-conference-ny-2015/public/schedule/detail/43217).
4 | The course is designed to introduce machine learning via real applications like
5 | - building a recommender
6 | - image analysis using deep learning.
7 |
8 | Along the way, we also cover feature engineering and deploying machine learning models as a predictive service. .
9 |
10 | ## Setup Instructions
11 |
12 | You can browse the notebooks using Github iPython notebook viewer. Note that some images may not be rendered correctly If you'd like to run it, follow these steps to set up your machine.
13 |
14 | - [Download](https://turi.com/download/) GraphLab Create and then follow instructions to [install](https://turi.com/download/install.html).
15 | - Download and unzip the datasets [[831MB]](https://static.turi.com/datasets/ml101_datasets_stratanyc_2015.zip)
16 |
17 | ## Handy references
18 |
19 | - [GraphLab Create User Guide](https://turi.com/learn/userguide)
20 | - [GraphLab Forum](http://forum.turi.com/categories/graphlab-create)
21 |
--------------------------------------------------------------------------------
/strata-nyc-2015/deep-learning/images/AA1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/turi-code/tutorials/74273496f96fa11f67136210a736dce62e635e12/strata-nyc-2015/deep-learning/images/AA1.png
--------------------------------------------------------------------------------
/strata-nyc-2015/deep-learning/images/alexnet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/turi-code/tutorials/74273496f96fa11f67136210a736dce62e635e12/strata-nyc-2015/deep-learning/images/alexnet.png
--------------------------------------------------------------------------------
/strata-nyc-2015/deep-learning/images/cifar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/turi-code/tutorials/74273496f96fa11f67136210a736dce62e635e12/strata-nyc-2015/deep-learning/images/cifar.png
--------------------------------------------------------------------------------
/strata-nyc-2015/deep-learning/images/evaluate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/turi-code/tutorials/74273496f96fa11f67136210a736dce62e635e12/strata-nyc-2015/deep-learning/images/evaluate.png
--------------------------------------------------------------------------------
/strata-nyc-2015/deep-learning/images/extract_features.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/turi-code/tutorials/74273496f96fa11f67136210a736dce62e635e12/strata-nyc-2015/deep-learning/images/extract_features.png
--------------------------------------------------------------------------------
/strata-nyc-2015/deep-learning/images/improve.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/turi-code/tutorials/74273496f96fa11f67136210a736dce62e635e12/strata-nyc-2015/deep-learning/images/improve.png
--------------------------------------------------------------------------------
/strata-nyc-2015/deep-learning/images/linear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/turi-code/tutorials/74273496f96fa11f67136210a736dce62e635e12/strata-nyc-2015/deep-learning/images/linear.png
--------------------------------------------------------------------------------
/strata-nyc-2015/deep-learning/images/load.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/turi-code/tutorials/74273496f96fa11f67136210a736dce62e635e12/strata-nyc-2015/deep-learning/images/load.png
--------------------------------------------------------------------------------
/strata-nyc-2015/deep-learning/images/quadratic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/turi-code/tutorials/74273496f96fa11f67136210a736dce62e635e12/strata-nyc-2015/deep-learning/images/quadratic.png
--------------------------------------------------------------------------------
/strata-nyc-2015/deep-learning/images/spiral.1-2.2-2-2-2-2-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/turi-code/tutorials/74273496f96fa11f67136210a736dce62e635e12/strata-nyc-2015/deep-learning/images/spiral.1-2.2-2-2-2-2-2.jpg
--------------------------------------------------------------------------------
/strata-nyc-2015/deep-learning/images/train.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/turi-code/tutorials/74273496f96fa11f67136210a736dce62e635e12/strata-nyc-2015/deep-learning/images/train.png
--------------------------------------------------------------------------------
/strata-nyc-2015/deep-learning/images/workflow1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/turi-code/tutorials/74273496f96fa11f67136210a736dce62e635e12/strata-nyc-2015/deep-learning/images/workflow1.png
--------------------------------------------------------------------------------
/strata-nyc-2015/deep-learning/images/workflow2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/turi-code/tutorials/74273496f96fa11f67136210a736dce62e635e12/strata-nyc-2015/deep-learning/images/workflow2.png
--------------------------------------------------------------------------------
/strata-nyc-2015/deep-learning/images/workflow3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/turi-code/tutorials/74273496f96fa11f67136210a736dce62e635e12/strata-nyc-2015/deep-learning/images/workflow3.png
--------------------------------------------------------------------------------
/strata-nyc-2015/deep-learning/images/workflow4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/turi-code/tutorials/74273496f96fa11f67136210a736dce62e635e12/strata-nyc-2015/deep-learning/images/workflow4.png
--------------------------------------------------------------------------------
/strata-nyc-2015/deployment/images/left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/turi-code/tutorials/74273496f96fa11f67136210a736dce62e635e12/strata-nyc-2015/deployment/images/left.png
--------------------------------------------------------------------------------
/strata-nyc-2015/deployment/images/middle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/turi-code/tutorials/74273496f96fa11f67136210a736dce62e635e12/strata-nyc-2015/deployment/images/middle.png
--------------------------------------------------------------------------------
/strata-nyc-2015/deployment/images/predictive_services_overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/turi-code/tutorials/74273496f96fa11f67136210a736dce62e635e12/strata-nyc-2015/deployment/images/predictive_services_overview.png
--------------------------------------------------------------------------------
/strata-nyc-2015/deployment/images/right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/turi-code/tutorials/74273496f96fa11f67136210a736dce62e635e12/strata-nyc-2015/deployment/images/right.png
--------------------------------------------------------------------------------
/strata-nyc-2015/deployment/scikit_deployment.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "Introduction to ML Deployment\n",
8 | "==================\n",
9 | "\n",
10 | "Deploying models created using python in a Turi Predictive Service is very easy. This notebook walks you through the step-by-step process. \n",
11 | "\n",
12 | "