{"action":"created","comment":{"url":"https://api.github.com/repos/DS-100/textbook/pulls/comments/201214749","pull_request_review_id":135670075,"id":201214749,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTIxNDc0OQ==","diff_hunk":"@@ -0,0 +1,312 @@\n+\n+\n+```python\n+# HIDDEN\n+import pandas as pd\n+import numpy as np\n+import matplotlib.pyplot as plt\n+import seaborn as sns\n+from sklearn.datasets import load_iris\n+from sklearn.model_selection import train_test_split\n+from sklearn.linear_model import LogisticRegression\n+from sklearn.metrics import confusion_matrix\n+\n+sns.set()\n+```\n+\n+\n+```python\n+# HIDDEN\n+markers = {'triangle':['^', sns.color_palette()[0]], \n+           'square':['s', sns.color_palette()[1]],\n+           'circle':['o', sns.color_palette()[2]]}\n+\n+def plot_binary(data, label):\n+    data_copy = data.copy()\n+    data_copy['$y$ == ' + label] = (data_copy['$y$'] == label).astype('category')\n+    \n+    sns.lmplot('$x_1$', '$x_2$', data=data_copy, hue='$y$ == ' + label, hue_order=[True, False], \n+               markers=[markers[label][0], 'x'], palette=[markers[label][1], 'gray'],\n+               fit_reg=False)\n+    plt.xlim(1.0, 4.0)\n+    plt.ylim(1.0, 4.0);\n+```\n+\n+### (outline)\n+\n+- What is multiclass classification\n+    - More than 2 labels that can be classified; versus a binary classification which is restricted to 2 labels\n+- A situation where multiclass classification might be used\n+    - Preferably come up with an example in lebron.csv, but might have to use a different data set\n+- OvO vs OvR\n+    - In logistic regression, multiclass classification comes down to a bunch of binary problems\n+    - OvO: Fit a binary classification problem to each pair of classes, then vote for class that wins the most \"head-to-head\" classifications\n+    - OvR/OvA: Fit a binary classification problem for each class versus the rest of the classes; result is class that has the highest probability\n+- Example walking through multiclass? sklearn's logistic regression supports OvR out of the box.\n+- Multilabel: More than one classification problem (e.g. a document can be positive/negative, religion/not religion, political/apolitical, etc.)\n+\n+## Multiclass Classification\n+\n+So far we have discussed binary classification, in which our classifier determines whether an observation is part of the positive class (e.g. an email is classified as spam) or the negative class (e.g. an email is not spam). However, many data science problems involve **multiclass classification**, in which we would like to classify observations as one of several different classes. For example, we may be interested in classifying emails into folders such as Family, Friends, Work, and Promotions. To solve these types of problems, we use a new method called **one-vs-rest (OvR) classification**.\n+\n+### One-Vs-Rest Classification\n+\n+In OvR classification (also known as one-vs-all, or OvA), we decompose a multiclass classification problem into several different binary classification problems. For example, we might observe training data as shown below:\n+\n+\n+```python\n+# HIDDEN\n+shapes = pd.DataFrame(\n+    [[1.3, 3.6, 'triangle'], [1.6, 3.2, 'triangle'], [1.8, 3.8, 'triangle'],\n+     [2.0, 1.2, 'square'], [2.2, 1.9, 'square'], [2.6, 1.4, 'square'],\n+     [3.2, 2.9, 'circle'], [3.5, 2.2, 'circle'], [3.9, 2.5, 'circle']],\n+    columns=['$x_1$', '$x_2$', '$y$']\n+)\n+```\n+\n+\n+```python\n+sns.lmplot('$x_1$', '$x_2$', data=shapes, hue='$y$', markers=['^', 's', 'o'], fit_reg=False)\n+plt.xlim(1.0, 4.0)\n+plt.ylim(1.0, 4.0);\n+```\n+\n+\n+![png](classification_multiclass_files/classification_multiclass_5_0.png)\n+\n+\n+Our goal is to build a multiclass classifier that labels observations as `triangle`, `square`, or `circle` given values for $x_1$ and $x_2$. First, we want to build a binary classifier that predicts observations as `triangle`/not `triangle`:\n+\n+\n+```python\n+plot_binary(shapes, 'triangle')\n+```\n+\n+\n+![png](classification_multiclass_files/classification_multiclass_7_0.png)\n+\n+\n+Similarly, we build binary classifiers for the remaining classes:\n+\n+\n+```python\n+plot_binary(shapes, 'square')\n+```\n+\n+\n+![png](classification_multiclass_files/classification_multiclass_9_0.png)\n+\n+\n+\n+```python\n+plot_binary(shapes, 'circle')\n+```\n+\n+\n+![png](classification_multiclass_files/classification_multiclass_10_0.png)\n+\n+\n+We know that the output of the sigmoid function in logistic regression is a probability value from 0 to 1. Then to solve our multiclass classification task, we find the probability of the positive class in each binary classifier and select the class that outputs the highest positive class probability. For example, if we have a new observation with the following values:\n+\n+$x_1$ | $x_2$\n+---   | ---\n+3.2   | 2.5\n+\n+Then our multiclass classifier would fit three binary classifiers to each of the labels of `triangle`, `square`, and `circle`. We extract the positive class probability of each of the three classifiers:\n+\n+\n+```python\n+# HIDDEN\n+lr_triangle = LogisticRegression(random_state=42)\n+lr_triangle.fit(shapes[['$x_1$', '$x_2$']], shapes['$y$'] == 'triangle')\n+proba_triangle = lr_triangle.predict_proba([[3.2, 2.5]])[0][1]\n+\n+lr_square = LogisticRegression(random_state=42)\n+lr_square.fit(shapes[['$x_1$', '$x_2$']], shapes['$y$'] == 'square')\n+proba_square = lr_square.predict_proba([[3.2, 2.5]])[0][1]\n+\n+lr_circle = LogisticRegression(random_state=42)\n+lr_circle.fit(shapes[['$x_1$', '$x_2$']], shapes['$y$'] == 'circle')\n+proba_circle = lr_circle.predict_proba([[3.2, 2.5]])[0][1]\n+\n+print('Triangle:', proba_triangle)\n+print('Square:', proba_square)\n+print('Circle:', proba_circle)\n+```\n+\n+    Triangle: 0.1457476378273223\n+    Square: 0.28507914730638007\n+    Circle: 0.49761172107185986\n+\n+\n+triangle | square   | circle\n+---      | ---      | ---\n+0.145748 | 0.285079 | 0.497612\n+\n+Since the positive class probability of `circle` is the greatest of the three, our multiclass classifier predicts that the observation is a `circle`.\n+\n+## Case Study: Iris dataset\n+\n+The [Iris dataset](https://archive.ics.uci.edu/ml/datasets/iris) is a famous dataset that is often used in data science to explore machine learning concepts. There are three classes, each representing a type of Iris plant:\n+- Iris-setosa (represented in the dataset by `0`)\n+- Iris-versicolour (`1`)\n+- Iris-virginica (`2`)\n+\n+There are four features available in the dataset:\n+- Sepal length (cm)\n+- Sepal width (cm)\n+- Petal length (cm)\n+- Petal width (cm)\n+\n+![](petal_sepal.png)\n+\n+We will create a multiclass classifier that predicts the type of Iris plant based on the four features above. First, we read in the data:\n+\n+\n+```python\n+iris = pd.read_csv('https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data',\n+                  header=None, names=['sepal_length', 'sepal_width', 'petal_length', 'petal_width', 'species'])\n+\n+iris.head()\n+```\n+\n+\n+\n+\n+<div>\n+<style scoped>\n+    .dataframe tbody tr th:only-of-type {\n+        vertical-align: middle;\n+    }\n+\n+    .dataframe tbody tr th {\n+        vertical-align: top;\n+    }\n+\n+    .dataframe thead th {\n+        text-align: right;\n+    }\n+</style>\n+<table border=\"1\" class=\"dataframe\">\n+  <thead>\n+    <tr style=\"text-align: right;\">\n+      <th></th>\n+      <th>sepal_length</th>\n+      <th>sepal_width</th>\n+      <th>petal_length</th>\n+      <th>petal_width</th>\n+      <th>species</th>\n+    </tr>\n+  </thead>\n+  <tbody>\n+    <tr>\n+      <th>0</th>\n+      <td>5.1</td>\n+      <td>3.5</td>\n+      <td>1.4</td>\n+      <td>0.2</td>\n+      <td>Iris-setosa</td>\n+    </tr>\n+    <tr>\n+      <th>1</th>\n+      <td>4.9</td>\n+      <td>3.0</td>\n+      <td>1.4</td>\n+      <td>0.2</td>\n+      <td>Iris-setosa</td>\n+    </tr>\n+    <tr>\n+      <th>2</th>\n+      <td>4.7</td>\n+      <td>3.2</td>\n+      <td>1.3</td>\n+      <td>0.2</td>\n+      <td>Iris-setosa</td>\n+    </tr>\n+    <tr>\n+      <th>3</th>\n+      <td>4.6</td>\n+      <td>3.1</td>\n+      <td>1.5</td>\n+      <td>0.2</td>\n+      <td>Iris-setosa</td>\n+    </tr>\n+    <tr>\n+      <th>4</th>\n+      <td>5.0</td>\n+      <td>3.6</td>\n+      <td>1.4</td>\n+      <td>0.2</td>\n+      <td>Iris-setosa</td>\n+    </tr>\n+  </tbody>\n+</table>\n+</div>\n+\n+\n+\n+\n+```python\n+X, y = iris.drop('species', axis=1), iris['species']\n+```\n+\n+\n+```python\n+# Alternatively, read in from sklearn.datasets\n+# from sklearn.datasets import load_iris\n+\n+# X, y = load_iris(return_X_y=True)\n+```\n+\n+\n+```python\n+X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.35, random_state=42)\n+```\n+\n+After dividing the dataset into train and test splits, we fit a multiclass classifier to our training data. By default, scikit-learn's `LogisticRegression` sets `multi_class='ovr'`:\n+\n+\n+```python\n+lr = LogisticRegression(random_state=42)\n+lr.fit(X_train, y_train)\n+```\n+\n+\n+\n+\n+    LogisticRegression(C=1.0, class_weight=None, dual=False, fit_intercept=True,\n+              intercept_scaling=1, max_iter=100, multi_class='ovr', n_jobs=1,\n+              penalty='l2', random_state=42, solver='liblinear', tol=0.0001,\n+              verbose=0, warm_start=False)\n+\n+\n+\n+We predict on the test data, and use a confusion matrix to evaluate the results:\n+\n+\n+```python\n+# to-do: add x-axis, y-axis labels to confusion matrix\n+y_pred = lr.predict(X_test)\n+confusion_matrix(y_test, y_pred)\n+```\n+\n+\n+\n+\n+    array([[19,  0,  0],\n+           [ 0, 15,  2],\n+           [ 0,  0, 17]])\n+\n+\n+\n+The confusion matrix shows that our classifier misclassified two `Iris-versicolour` observations as `Iris-virginica`. In the real world, certain misclassifications can be more common than others. Confusion matrices are valuable because they help us identify where our classifier struggles, and thus provides insight on what kind of features we may need to extract in order to improve the classifier.\n+\n+## Multilabel Classification\n+\n+Another type of classification problem is **multilabel classification**, in which each observation can have multiple labels. An example would be a document classification system: a document can be classified as having positive or negative sentiments, but it can also be distinguished between religious/nonreligious or political/apolitical. Multilabel problems can also be multiclass; we may want our document classification system to distinguish between a list of genres, as well as identify the language that the document is written in. ","path":"notebooks/ch17/classification_multiclass.md","position":306,"original_position":306,"commit_id":"18e42c5a77bf32471d912c7b414e30011ebc9cf4","original_commit_id":"18e42c5a77bf32471d912c7b414e30011ebc9cf4","user":{"login":"SamLau95","id":2468904,"node_id":"MDQ6VXNlcjI0Njg5MDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2468904?v=4","gravatar_id":"","url":"https://api.github.com/users/SamLau95","html_url":"https://github.com/SamLau95","followers_url":"https://api.github.com/users/SamLau95/followers","following_url":"https://api.github.com/users/SamLau95/following{/other_user}","gists_url":"https://api.github.com/users/SamLau95/gists{/gist_id}","starred_url":"https://api.github.com/users/SamLau95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamLau95/subscriptions","organizations_url":"https://api.github.com/users/SamLau95/orgs","repos_url":"https://api.github.com/users/SamLau95/repos","events_url":"https://api.github.com/users/SamLau95/events{/privacy}","received_events_url":"https://api.github.com/users/SamLau95/received_events","type":"User","site_admin":false},"body":"The second sentence might be better as:\r\n\r\n> Consider a system for classifying documents: a single document can have positive or negative sentiment, religious or nonreligious content, and liberal or conservative political leaning.","created_at":"2018-07-10T04:33:41Z","updated_at":"2018-07-10T04:36:42Z","html_url":"https://github.com/DS-100/textbook/pull/51#discussion_r201214749","pull_request_url":"https://api.github.com/repos/DS-100/textbook/pulls/51","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/DS-100/textbook/pulls/comments/201214749"},"html":{"href":"https://github.com/DS-100/textbook/pull/51#discussion_r201214749"},"pull_request":{"href":"https://api.github.com/repos/DS-100/textbook/pulls/51"}}},"pull_request":{"url":"https://api.github.com/repos/DS-100/textbook/pulls/51","id":198504377,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4NTA0Mzc3","html_url":"https://github.com/DS-100/textbook/pull/51","diff_url":"https://github.com/DS-100/textbook/pull/51.diff","patch_url":"https://github.com/DS-100/textbook/pull/51.patch","issue_url":"https://api.github.com/repos/DS-100/textbook/issues/51","number":51,"state":"open","locked":false,"title":"Multiclass Classification","user":{"login":"junseo-park","id":25359351,"node_id":"MDQ6VXNlcjI1MzU5MzUx","avatar_url":"https://avatars0.githubusercontent.com/u/25359351?v=4","gravatar_id":"","url":"https://api.github.com/users/junseo-park","html_url":"https://github.com/junseo-park","followers_url":"https://api.github.com/users/junseo-park/followers","following_url":"https://api.github.com/users/junseo-park/following{/other_user}","gists_url":"https://api.github.com/users/junseo-park/gists{/gist_id}","starred_url":"https://api.github.com/users/junseo-park/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junseo-park/subscriptions","organizations_url":"https://api.github.com/users/junseo-park/orgs","repos_url":"https://api.github.com/users/junseo-park/repos","events_url":"https://api.github.com/users/junseo-park/events{/privacy}","received_events_url":"https://api.github.com/users/junseo-park/received_events","type":"User","site_admin":false},"body":"I never made a PR, so @SamLau95 didn't have a way to leave comments on the Multiclass Classification outline. Outline available on the \"Add multiclass classification\" commit.","created_at":"2018-07-01T02:53:46Z","updated_at":"2018-07-10T04:36:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f4ee01901f0f40e262af2465842c2ec4e168950c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/DS-100/textbook/pulls/51/commits","review_comments_url":"https://api.github.com/repos/DS-100/textbook/pulls/51/comments","review_comment_url":"https://api.github.com/repos/DS-100/textbook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DS-100/textbook/issues/51/comments","statuses_url":"https://api.github.com/repos/DS-100/textbook/statuses/18e42c5a77bf32471d912c7b414e30011ebc9cf4","head":{"label":"DS-100:junseo-ch16-multiclass","ref":"junseo-ch16-multiclass","sha":"18e42c5a77bf32471d912c7b414e30011ebc9cf4","user":{"login":"DS-100","id":22970565,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyOTcwNTY1","avatar_url":"https://avatars3.githubusercontent.com/u/22970565?v=4","gravatar_id":"","url":"https://api.github.com/users/DS-100","html_url":"https://github.com/DS-100","followers_url":"https://api.github.com/users/DS-100/followers","following_url":"https://api.github.com/users/DS-100/following{/other_user}","gists_url":"https://api.github.com/users/DS-100/gists{/gist_id}","starred_url":"https://api.github.com/users/DS-100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DS-100/subscriptions","organizations_url":"https://api.github.com/users/DS-100/orgs","repos_url":"https://api.github.com/users/DS-100/repos","events_url":"https://api.github.com/users/DS-100/events{/privacy}","received_events_url":"https://api.github.com/users/DS-100/received_events","type":"Organization","site_admin":false},"repo":{"id":116552199,"node_id":"MDEwOlJlcG9zaXRvcnkxMTY1NTIxOTk=","name":"textbook","full_name":"DS-100/textbook","owner":{"login":"DS-100","id":22970565,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyOTcwNTY1","avatar_url":"https://avatars3.githubusercontent.com/u/22970565?v=4","gravatar_id":"","url":"https://api.github.com/users/DS-100","html_url":"https://github.com/DS-100","followers_url":"https://api.github.com/users/DS-100/followers","following_url":"https://api.github.com/users/DS-100/following{/other_user}","gists_url":"https://api.github.com/users/DS-100/gists{/gist_id}","starred_url":"https://api.github.com/users/DS-100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DS-100/subscriptions","organizations_url":"https://api.github.com/users/DS-100/orgs","repos_url":"https://api.github.com/users/DS-100/repos","events_url":"https://api.github.com/users/DS-100/events{/privacy}","received_events_url":"https://api.github.com/users/DS-100/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DS-100/textbook","description":"Textbook for DS100 at UC Berkeley","fork":false,"url":"https://api.github.com/repos/DS-100/textbook","forks_url":"https://api.github.com/repos/DS-100/textbook/forks","keys_url":"https://api.github.com/repos/DS-100/textbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DS-100/textbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DS-100/textbook/teams","hooks_url":"https://api.github.com/repos/DS-100/textbook/hooks","issue_events_url":"https://api.github.com/repos/DS-100/textbook/issues/events{/number}","events_url":"https://api.github.com/repos/DS-100/textbook/events","assignees_url":"https://api.github.com/repos/DS-100/textbook/assignees{/user}","branches_url":"https://api.github.com/repos/DS-100/textbook/branches{/branch}","tags_url":"https://api.github.com/repos/DS-100/textbook/tags","blobs_url":"https://api.github.com/repos/DS-100/textbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DS-100/textbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DS-100/textbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/DS-100/textbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DS-100/textbook/statuses/{sha}","languages_url":"https://api.github.com/repos/DS-100/textbook/languages","stargazers_url":"https://api.github.com/repos/DS-100/textbook/stargazers","contributors_url":"https://api.github.com/repos/DS-100/textbook/contributors","subscribers_url":"https://api.github.com/repos/DS-100/textbook/subscribers","subscription_url":"https://api.github.com/repos/DS-100/textbook/subscription","commits_url":"https://api.github.com/repos/DS-100/textbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/DS-100/textbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/DS-100/textbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/DS-100/textbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/DS-100/textbook/contents/{+path}","compare_url":"https://api.github.com/repos/DS-100/textbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DS-100/textbook/merges","archive_url":"https://api.github.com/repos/DS-100/textbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DS-100/textbook/downloads","issues_url":"https://api.github.com/repos/DS-100/textbook/issues{/number}","pulls_url":"https://api.github.com/repos/DS-100/textbook/pulls{/number}","milestones_url":"https://api.github.com/repos/DS-100/textbook/milestones{/number}","notifications_url":"https://api.github.com/repos/DS-100/textbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DS-100/textbook/labels{/name}","releases_url":"https://api.github.com/repos/DS-100/textbook/releases{/id}","deployments_url":"https://api.github.com/repos/DS-100/textbook/deployments","created_at":"2018-01-07T09:10:32Z","updated_at":"2018-07-03T14:36:07Z","pushed_at":"2018-07-10T04:09:27Z","git_url":"git://github.com/DS-100/textbook.git","ssh_url":"git@github.com:DS-100/textbook.git","clone_url":"https://github.com/DS-100/textbook.git","svn_url":"https://github.com/DS-100/textbook","homepage":"https://www.textbook.ds100.org/","size":49543,"stargazers_count":13,"watchers_count":13,"language":"Jupyter Notebook","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":13,"license":null,"forks":6,"open_issues":13,"watchers":13,"default_branch":"master"}},"base":{"label":"DS-100:master","ref":"master","sha":"386d31e627e7ed4941ed4b532b87a127c5567b9b","user":{"login":"DS-100","id":22970565,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyOTcwNTY1","avatar_url":"https://avatars3.githubusercontent.com/u/22970565?v=4","gravatar_id":"","url":"https://api.github.com/users/DS-100","html_url":"https://github.com/DS-100","followers_url":"https://api.github.com/users/DS-100/followers","following_url":"https://api.github.com/users/DS-100/following{/other_user}","gists_url":"https://api.github.com/users/DS-100/gists{/gist_id}","starred_url":"https://api.github.com/users/DS-100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DS-100/subscriptions","organizations_url":"https://api.github.com/users/DS-100/orgs","repos_url":"https://api.github.com/users/DS-100/repos","events_url":"https://api.github.com/users/DS-100/events{/privacy}","received_events_url":"https://api.github.com/users/DS-100/received_events","type":"Organization","site_admin":false},"repo":{"id":116552199,"node_id":"MDEwOlJlcG9zaXRvcnkxMTY1NTIxOTk=","name":"textbook","full_name":"DS-100/textbook","owner":{"login":"DS-100","id":22970565,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyOTcwNTY1","avatar_url":"https://avatars3.githubusercontent.com/u/22970565?v=4","gravatar_id":"","url":"https://api.github.com/users/DS-100","html_url":"https://github.com/DS-100","followers_url":"https://api.github.com/users/DS-100/followers","following_url":"https://api.github.com/users/DS-100/following{/other_user}","gists_url":"https://api.github.com/users/DS-100/gists{/gist_id}","starred_url":"https://api.github.com/users/DS-100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DS-100/subscriptions","organizations_url":"https://api.github.com/users/DS-100/orgs","repos_url":"https://api.github.com/users/DS-100/repos","events_url":"https://api.github.com/users/DS-100/events{/privacy}","received_events_url":"https://api.github.com/users/DS-100/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DS-100/textbook","description":"Textbook for DS100 at UC Berkeley","fork":false,"url":"https://api.github.com/repos/DS-100/textbook","forks_url":"https://api.github.com/repos/DS-100/textbook/forks","keys_url":"https://api.github.com/repos/DS-100/textbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DS-100/textbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DS-100/textbook/teams","hooks_url":"https://api.github.com/repos/DS-100/textbook/hooks","issue_events_url":"https://api.github.com/repos/DS-100/textbook/issues/events{/number}","events_url":"https://api.github.com/repos/DS-100/textbook/events","assignees_url":"https://api.github.com/repos/DS-100/textbook/assignees{/user}","branches_url":"https://api.github.com/repos/DS-100/textbook/branches{/branch}","tags_url":"https://api.github.com/repos/DS-100/textbook/tags","blobs_url":"https://api.github.com/repos/DS-100/textbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DS-100/textbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DS-100/textbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/DS-100/textbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DS-100/textbook/statuses/{sha}","languages_url":"https://api.github.com/repos/DS-100/textbook/languages","stargazers_url":"https://api.github.com/repos/DS-100/textbook/stargazers","contributors_url":"https://api.github.com/repos/DS-100/textbook/contributors","subscribers_url":"https://api.github.com/repos/DS-100/textbook/subscribers","subscription_url":"https://api.github.com/repos/DS-100/textbook/subscription","commits_url":"https://api.github.com/repos/DS-100/textbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/DS-100/textbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/DS-100/textbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/DS-100/textbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/DS-100/textbook/contents/{+path}","compare_url":"https://api.github.com/repos/DS-100/textbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DS-100/textbook/merges","archive_url":"https://api.github.com/repos/DS-100/textbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DS-100/textbook/downloads","issues_url":"https://api.github.com/repos/DS-100/textbook/issues{/number}","pulls_url":"https://api.github.com/repos/DS-100/textbook/pulls{/number}","milestones_url":"https://api.github.com/repos/DS-100/textbook/milestones{/number}","notifications_url":"https://api.github.com/repos/DS-100/textbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DS-100/textbook/labels{/name}","releases_url":"https://api.github.com/repos/DS-100/textbook/releases{/id}","deployments_url":"https://api.github.com/repos/DS-100/textbook/deployments","created_at":"2018-01-07T09:10:32Z","updated_at":"2018-07-03T14:36:07Z","pushed_at":"2018-07-10T04:09:27Z","git_url":"git://github.com/DS-100/textbook.git","ssh_url":"git@github.com:DS-100/textbook.git","clone_url":"https://github.com/DS-100/textbook.git","svn_url":"https://github.com/DS-100/textbook","homepage":"https://www.textbook.ds100.org/","size":49543,"stargazers_count":13,"watchers_count":13,"language":"Jupyter Notebook","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":13,"license":null,"forks":6,"open_issues":13,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DS-100/textbook/pulls/51"},"html":{"href":"https://github.com/DS-100/textbook/pull/51"},"issue":{"href":"https://api.github.com/repos/DS-100/textbook/issues/51"},"comments":{"href":"https://api.github.com/repos/DS-100/textbook/issues/51/comments"},"review_comments":{"href":"https://api.github.com/repos/DS-100/textbook/pulls/51/comments"},"review_comment":{"href":"https://api.github.com/repos/DS-100/textbook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DS-100/textbook/pulls/51/commits"},"statuses":{"href":"https://api.github.com/repos/DS-100/textbook/statuses/18e42c5a77bf32471d912c7b414e30011ebc9cf4"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"SamLau95"}}