-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Quiz: MapReduce for k-means
- Loading branch information
Showing
9 changed files
with
1,885 additions
and
12 deletions.
There are no files selected for viewing
1,607 changes: 1,607 additions & 0 deletions
1,607
...eval/assigment/week3/.ipynb_checkpoints/2_kmeans-with-text-data_graphlab-checkpoint.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
117 changes: 117 additions & 0 deletions
117
...nd_retrieval/lecture/week3/.ipynb_checkpoints/quiz-MapReduce for k-means-checkpoint.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# MapReduce for k-means" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Question 1\n", | ||
"\n", | ||
"<img src=\"images/Screen Shot 2016-07-08 at 1.58.04 PM.png\">\n", | ||
"\n", | ||
"*Screenshot taken from [Coursera](https://www.coursera.org/learn/ml-clustering-and-retrieval/exam/dlBVz/mapreduce-for-k-means)*\n", | ||
"\n", | ||
"<!--TEASER_END-->" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Question 2\n", | ||
"\n", | ||
"<img src=\"images/Screen Shot 2016-07-08 at 1.56.48 PM.png\">\n", | ||
"\n", | ||
"*Screenshot taken from [Coursera](https://www.coursera.org/learn/ml-clustering-and-retrieval/exam/dlBVz/mapreduce-for-k-means)*\n", | ||
"\n", | ||
"<!--TEASER_END-->" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Question 3\n", | ||
"\n", | ||
"<img src=\"images/Screen Shot 2016-07-08 at 1.51.16 PM.png\">\n", | ||
"\n", | ||
"*Screenshot taken from [Coursera](https://www.coursera.org/learn/ml-clustering-and-retrieval/exam/dlBVz/mapreduce-for-k-means)*\n", | ||
"\n", | ||
"<!--TEASER_END-->" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Question 4\n", | ||
"\n", | ||
"<img src=\"images/Screen Shot 2016-07-08 at 1.51.20 PM.png\">\n", | ||
"\n", | ||
"*Screenshot taken from [Coursera](https://www.coursera.org/learn/ml-clustering-and-retrieval/exam/dlBVz/mapreduce-for-k-means)*\n", | ||
"\n", | ||
"<!--TEASER_END-->" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Question 5\n", | ||
"\n", | ||
"<img src=\"images/Screen Shot 2016-07-08 at 1.51.24 PM.png\">\n", | ||
"\n", | ||
"*Screenshot taken from [Coursera](https://www.coursera.org/learn/ml-clustering-and-retrieval/exam/dlBVz/mapreduce-for-k-means)*\n", | ||
"\n", | ||
"<!--TEASER_END-->" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"**Answer**\n", | ||
"- https://www.coursera.org/learn/ml-clustering-and-retrieval/discussions/weeks/3/threads/5ls_g0IIEeaJZA6Ew5-W7Q\n", | ||
"- For each of the operations, check to see which ones would fail the commutative-associative test.\n", | ||
"- https://www.mathsisfun.com/associative-commutative-distributive.html\n", | ||
"- For example, say $OP(x1, x2) = 2 * x1 + 3 * x2$\n", | ||
" - So $OP(2,3) = 4 + 9 = 13$\n", | ||
" - $OP(3,2) = 6 + 6 = 12$\n", | ||
" - Hence the above OP fails the commutative-associative test." | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 2", | ||
"language": "python", | ||
"name": "python2" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 2 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython2", | ||
"version": "2.7.11" | ||
}, | ||
"toc": { | ||
"toc_cell": false, | ||
"toc_number_sections": false, | ||
"toc_threshold": "8", | ||
"toc_window_display": false | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 0 | ||
} |
Binary file added
BIN
+16.9 KB
...ing_and_retrieval/lecture/week3/images/Screen Shot 2016-07-08 at 1.51.16 PM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+28.4 KB
...ing_and_retrieval/lecture/week3/images/Screen Shot 2016-07-08 at 1.51.20 PM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+39.1 KB
...ing_and_retrieval/lecture/week3/images/Screen Shot 2016-07-08 at 1.51.24 PM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.5 KB
...ing_and_retrieval/lecture/week3/images/Screen Shot 2016-07-08 at 1.56.48 PM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+46.8 KB
...ing_and_retrieval/lecture/week3/images/Screen Shot 2016-07-08 at 1.58.04 PM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
117 changes: 117 additions & 0 deletions
117
machine_learning/4_clustering_and_retrieval/lecture/week3/quiz-MapReduce for k-means.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# MapReduce for k-means" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Question 1\n", | ||
"\n", | ||
"<img src=\"images/Screen Shot 2016-07-08 at 1.58.04 PM.png\">\n", | ||
"\n", | ||
"*Screenshot taken from [Coursera](https://www.coursera.org/learn/ml-clustering-and-retrieval/exam/dlBVz/mapreduce-for-k-means)*\n", | ||
"\n", | ||
"<!--TEASER_END-->" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Question 2\n", | ||
"\n", | ||
"<img src=\"images/Screen Shot 2016-07-08 at 1.56.48 PM.png\">\n", | ||
"\n", | ||
"*Screenshot taken from [Coursera](https://www.coursera.org/learn/ml-clustering-and-retrieval/exam/dlBVz/mapreduce-for-k-means)*\n", | ||
"\n", | ||
"<!--TEASER_END-->" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Question 3\n", | ||
"\n", | ||
"<img src=\"images/Screen Shot 2016-07-08 at 1.51.16 PM.png\">\n", | ||
"\n", | ||
"*Screenshot taken from [Coursera](https://www.coursera.org/learn/ml-clustering-and-retrieval/exam/dlBVz/mapreduce-for-k-means)*\n", | ||
"\n", | ||
"<!--TEASER_END-->" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Question 4\n", | ||
"\n", | ||
"<img src=\"images/Screen Shot 2016-07-08 at 1.51.20 PM.png\">\n", | ||
"\n", | ||
"*Screenshot taken from [Coursera](https://www.coursera.org/learn/ml-clustering-and-retrieval/exam/dlBVz/mapreduce-for-k-means)*\n", | ||
"\n", | ||
"<!--TEASER_END-->" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Question 5\n", | ||
"\n", | ||
"<img src=\"images/Screen Shot 2016-07-08 at 1.51.24 PM.png\">\n", | ||
"\n", | ||
"*Screenshot taken from [Coursera](https://www.coursera.org/learn/ml-clustering-and-retrieval/exam/dlBVz/mapreduce-for-k-means)*\n", | ||
"\n", | ||
"<!--TEASER_END-->" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"**Answer**\n", | ||
"- https://www.coursera.org/learn/ml-clustering-and-retrieval/discussions/weeks/3/threads/5ls_g0IIEeaJZA6Ew5-W7Q\n", | ||
"- For each of the operations, check to see which ones would fail the commutative-associative test.\n", | ||
"- https://www.mathsisfun.com/associative-commutative-distributive.html\n", | ||
"- For example, say $OP(x1, x2) = 2 * x1 + 3 * x2$\n", | ||
" - So $OP(2,3) = 4 + 9 = 13$\n", | ||
" - $OP(3,2) = 6 + 6 = 12$\n", | ||
" - Hence the above OP fails the commutative-associative test." | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 2", | ||
"language": "python", | ||
"name": "python2" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 2 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython2", | ||
"version": "2.7.11" | ||
}, | ||
"toc": { | ||
"toc_cell": false, | ||
"toc_number_sections": false, | ||
"toc_threshold": "8", | ||
"toc_window_display": false | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 0 | ||
} |