{"action":"created","comment":{"url":"https://api.github.com/repos/is0280fp/generative_models/pulls/comments/184963671","pull_request_review_id":116259305,"id":184963671,"diff_hunk":"@@ -0,0 +1,87 @@\n+# -*- coding: utf-8 -*-\n+\"\"\"\n+Created on Mon Apr 23 12:30:17 2018\n+\n+@author: yume\n+\"\"\"\n+\n+import numpy as np\n+import matplotlib.pyplot as plt\n+from generate_clustering_data import generate_clustering_data\n+\n+\n+def distance_data(x, y):\n+    each_dis = np.linalg.norm(x - y, axis=1)\n+    return each_dis\n+\n+\n+def decide_cluster(each_dis, min_dis):\n+    for i in np.arange(len(each_dis)):\n+        if each_dis[i] == min_dis[i]:\n+            return i\n+\n+\n+def centroid(x):","path":"k_means.py","position":24,"original_position":24,"commit_id":"142e36cd1d4eadd5922c31fb399ee2f11a018a54","original_commit_id":"142e36cd1d4eadd5922c31fb399ee2f11a018a54","user":{"login":"ronekko","id":142082,"avatar_url":"https://avatars1.githubusercontent.com/u/142082?v=4","gravatar_id":"","url":"https://api.github.com/users/ronekko","html_url":"https://github.com/ronekko","followers_url":"https://api.github.com/users/ronekko/followers","following_url":"https://api.github.com/users/ronekko/following{/other_user}","gists_url":"https://api.github.com/users/ronekko/gists{/gist_id}","starred_url":"https://api.github.com/users/ronekko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronekko/subscriptions","organizations_url":"https://api.github.com/users/ronekko/orgs","repos_url":"https://api.github.com/users/ronekko/repos","events_url":"https://api.github.com/users/ronekko/events{/privacy}","received_events_url":"https://api.github.com/users/ronekko/received_events","type":"User","site_admin":false},"body":"この関数はもはや不要です．（中身が十分シンプルなので，関数にしないほうがプログラムがシンプルになる）","created_at":"2018-04-30T11:34:35Z","updated_at":"2018-04-30T11:34:35Z","html_url":"https://github.com/is0280fp/generative_models/pull/9#discussion_r184963671","pull_request_url":"https://api.github.com/repos/is0280fp/generative_models/pulls/9","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/is0280fp/generative_models/pulls/comments/184963671"},"html":{"href":"https://github.com/is0280fp/generative_models/pull/9#discussion_r184963671"},"pull_request":{"href":"https://api.github.com/repos/is0280fp/generative_models/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/is0280fp/generative_models/pulls/9","id":183947185,"html_url":"https://github.com/is0280fp/generative_models/pull/9","diff_url":"https://github.com/is0280fp/generative_models/pull/9.diff","patch_url":"https://github.com/is0280fp/generative_models/pull/9.patch","issue_url":"https://api.github.com/repos/is0280fp/generative_models/issues/9","number":9,"state":"open","locked":false,"title":"K means method","user":{"login":"is0280fp","id":12329235,"avatar_url":"https://avatars3.githubusercontent.com/u/12329235?v=4","gravatar_id":"","url":"https://api.github.com/users/is0280fp","html_url":"https://github.com/is0280fp","followers_url":"https://api.github.com/users/is0280fp/followers","following_url":"https://api.github.com/users/is0280fp/following{/other_user}","gists_url":"https://api.github.com/users/is0280fp/gists{/gist_id}","starred_url":"https://api.github.com/users/is0280fp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/is0280fp/subscriptions","organizations_url":"https://api.github.com/users/is0280fp/orgs","repos_url":"https://api.github.com/users/is0280fp/repos","events_url":"https://api.github.com/users/is0280fp/events{/privacy}","received_events_url":"https://api.github.com/users/is0280fp/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-04-25T07:35:19Z","updated_at":"2018-04-30T11:34:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ce211e4791945024e059144d773c81d17db080f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/is0280fp/generative_models/pulls/9/commits","review_comments_url":"https://api.github.com/repos/is0280fp/generative_models/pulls/9/comments","review_comment_url":"https://api.github.com/repos/is0280fp/generative_models/pulls/comments{/number}","comments_url":"https://api.github.com/repos/is0280fp/generative_models/issues/9/comments","statuses_url":"https://api.github.com/repos/is0280fp/generative_models/statuses/142e36cd1d4eadd5922c31fb399ee2f11a018a54","head":{"label":"is0280fp:K_means_method","ref":"K_means_method","sha":"142e36cd1d4eadd5922c31fb399ee2f11a018a54","user":{"login":"is0280fp","id":12329235,"avatar_url":"https://avatars3.githubusercontent.com/u/12329235?v=4","gravatar_id":"","url":"https://api.github.com/users/is0280fp","html_url":"https://github.com/is0280fp","followers_url":"https://api.github.com/users/is0280fp/followers","following_url":"https://api.github.com/users/is0280fp/following{/other_user}","gists_url":"https://api.github.com/users/is0280fp/gists{/gist_id}","starred_url":"https://api.github.com/users/is0280fp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/is0280fp/subscriptions","organizations_url":"https://api.github.com/users/is0280fp/orgs","repos_url":"https://api.github.com/users/is0280fp/repos","events_url":"https://api.github.com/users/is0280fp/events{/privacy}","received_events_url":"https://api.github.com/users/is0280fp/received_events","type":"User","site_admin":false},"repo":{"id":129375114,"name":"generative_models","full_name":"is0280fp/generative_models","owner":{"login":"is0280fp","id":12329235,"avatar_url":"https://avatars3.githubusercontent.com/u/12329235?v=4","gravatar_id":"","url":"https://api.github.com/users/is0280fp","html_url":"https://github.com/is0280fp","followers_url":"https://api.github.com/users/is0280fp/followers","following_url":"https://api.github.com/users/is0280fp/following{/other_user}","gists_url":"https://api.github.com/users/is0280fp/gists{/gist_id}","starred_url":"https://api.github.com/users/is0280fp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/is0280fp/subscriptions","organizations_url":"https://api.github.com/users/is0280fp/orgs","repos_url":"https://api.github.com/users/is0280fp/repos","events_url":"https://api.github.com/users/is0280fp/events{/privacy}","received_events_url":"https://api.github.com/users/is0280fp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/is0280fp/generative_models","description":null,"fork":false,"url":"https://api.github.com/repos/is0280fp/generative_models","forks_url":"https://api.github.com/repos/is0280fp/generative_models/forks","keys_url":"https://api.github.com/repos/is0280fp/generative_models/keys{/key_id}","collaborators_url":"https://api.github.com/repos/is0280fp/generative_models/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/is0280fp/generative_models/teams","hooks_url":"https://api.github.com/repos/is0280fp/generative_models/hooks","issue_events_url":"https://api.github.com/repos/is0280fp/generative_models/issues/events{/number}","events_url":"https://api.github.com/repos/is0280fp/generative_models/events","assignees_url":"https://api.github.com/repos/is0280fp/generative_models/assignees{/user}","branches_url":"https://api.github.com/repos/is0280fp/generative_models/branches{/branch}","tags_url":"https://api.github.com/repos/is0280fp/generative_models/tags","blobs_url":"https://api.github.com/repos/is0280fp/generative_models/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/is0280fp/generative_models/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/is0280fp/generative_models/git/refs{/sha}","trees_url":"https://api.github.com/repos/is0280fp/generative_models/git/trees{/sha}","statuses_url":"https://api.github.com/repos/is0280fp/generative_models/statuses/{sha}","languages_url":"https://api.github.com/repos/is0280fp/generative_models/languages","stargazers_url":"https://api.github.com/repos/is0280fp/generative_models/stargazers","contributors_url":"https://api.github.com/repos/is0280fp/generative_models/contributors","subscribers_url":"https://api.github.com/repos/is0280fp/generative_models/subscribers","subscription_url":"https://api.github.com/repos/is0280fp/generative_models/subscription","commits_url":"https://api.github.com/repos/is0280fp/generative_models/commits{/sha}","git_commits_url":"https://api.github.com/repos/is0280fp/generative_models/git/commits{/sha}","comments_url":"https://api.github.com/repos/is0280fp/generative_models/comments{/number}","issue_comment_url":"https://api.github.com/repos/is0280fp/generative_models/issues/comments{/number}","contents_url":"https://api.github.com/repos/is0280fp/generative_models/contents/{+path}","compare_url":"https://api.github.com/repos/is0280fp/generative_models/compare/{base}...{head}","merges_url":"https://api.github.com/repos/is0280fp/generative_models/merges","archive_url":"https://api.github.com/repos/is0280fp/generative_models/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/is0280fp/generative_models/downloads","issues_url":"https://api.github.com/repos/is0280fp/generative_models/issues{/number}","pulls_url":"https://api.github.com/repos/is0280fp/generative_models/pulls{/number}","milestones_url":"https://api.github.com/repos/is0280fp/generative_models/milestones{/number}","notifications_url":"https://api.github.com/repos/is0280fp/generative_models/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/is0280fp/generative_models/labels{/name}","releases_url":"https://api.github.com/repos/is0280fp/generative_models/releases{/id}","deployments_url":"https://api.github.com/repos/is0280fp/generative_models/deployments","created_at":"2018-04-13T08:48:13Z","updated_at":"2018-04-20T14:05:21Z","pushed_at":"2018-04-27T16:37:03Z","git_url":"git://github.com/is0280fp/generative_models.git","ssh_url":"git@github.com:is0280fp/generative_models.git","clone_url":"https://github.com/is0280fp/generative_models.git","svn_url":"https://github.com/is0280fp/generative_models","homepage":null,"size":30,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"is0280fp:master","ref":"master","sha":"1e552c44a0b104559afa1333f766d9c0716478cb","user":{"login":"is0280fp","id":12329235,"avatar_url":"https://avatars3.githubusercontent.com/u/12329235?v=4","gravatar_id":"","url":"https://api.github.com/users/is0280fp","html_url":"https://github.com/is0280fp","followers_url":"https://api.github.com/users/is0280fp/followers","following_url":"https://api.github.com/users/is0280fp/following{/other_user}","gists_url":"https://api.github.com/users/is0280fp/gists{/gist_id}","starred_url":"https://api.github.com/users/is0280fp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/is0280fp/subscriptions","organizations_url":"https://api.github.com/users/is0280fp/orgs","repos_url":"https://api.github.com/users/is0280fp/repos","events_url":"https://api.github.com/users/is0280fp/events{/privacy}","received_events_url":"https://api.github.com/users/is0280fp/received_events","type":"User","site_admin":false},"repo":{"id":129375114,"name":"generative_models","full_name":"is0280fp/generative_models","owner":{"login":"is0280fp","id":12329235,"avatar_url":"https://avatars3.githubusercontent.com/u/12329235?v=4","gravatar_id":"","url":"https://api.github.com/users/is0280fp","html_url":"https://github.com/is0280fp","followers_url":"https://api.github.com/users/is0280fp/followers","following_url":"https://api.github.com/users/is0280fp/following{/other_user}","gists_url":"https://api.github.com/users/is0280fp/gists{/gist_id}","starred_url":"https://api.github.com/users/is0280fp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/is0280fp/subscriptions","organizations_url":"https://api.github.com/users/is0280fp/orgs","repos_url":"https://api.github.com/users/is0280fp/repos","events_url":"https://api.github.com/users/is0280fp/events{/privacy}","received_events_url":"https://api.github.com/users/is0280fp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/is0280fp/generative_models","description":null,"fork":false,"url":"https://api.github.com/repos/is0280fp/generative_models","forks_url":"https://api.github.com/repos/is0280fp/generative_models/forks","keys_url":"https://api.github.com/repos/is0280fp/generative_models/keys{/key_id}","collaborators_url":"https://api.github.com/repos/is0280fp/generative_models/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/is0280fp/generative_models/teams","hooks_url":"https://api.github.com/repos/is0280fp/generative_models/hooks","issue_events_url":"https://api.github.com/repos/is0280fp/generative_models/issues/events{/number}","events_url":"https://api.github.com/repos/is0280fp/generative_models/events","assignees_url":"https://api.github.com/repos/is0280fp/generative_models/assignees{/user}","branches_url":"https://api.github.com/repos/is0280fp/generative_models/branches{/branch}","tags_url":"https://api.github.com/repos/is0280fp/generative_models/tags","blobs_url":"https://api.github.com/repos/is0280fp/generative_models/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/is0280fp/generative_models/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/is0280fp/generative_models/git/refs{/sha}","trees_url":"https://api.github.com/repos/is0280fp/generative_models/git/trees{/sha}","statuses_url":"https://api.github.com/repos/is0280fp/generative_models/statuses/{sha}","languages_url":"https://api.github.com/repos/is0280fp/generative_models/languages","stargazers_url":"https://api.github.com/repos/is0280fp/generative_models/stargazers","contributors_url":"https://api.github.com/repos/is0280fp/generative_models/contributors","subscribers_url":"https://api.github.com/repos/is0280fp/generative_models/subscribers","subscription_url":"https://api.github.com/repos/is0280fp/generative_models/subscription","commits_url":"https://api.github.com/repos/is0280fp/generative_models/commits{/sha}","git_commits_url":"https://api.github.com/repos/is0280fp/generative_models/git/commits{/sha}","comments_url":"https://api.github.com/repos/is0280fp/generative_models/comments{/number}","issue_comment_url":"https://api.github.com/repos/is0280fp/generative_models/issues/comments{/number}","contents_url":"https://api.github.com/repos/is0280fp/generative_models/contents/{+path}","compare_url":"https://api.github.com/repos/is0280fp/generative_models/compare/{base}...{head}","merges_url":"https://api.github.com/repos/is0280fp/generative_models/merges","archive_url":"https://api.github.com/repos/is0280fp/generative_models/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/is0280fp/generative_models/downloads","issues_url":"https://api.github.com/repos/is0280fp/generative_models/issues{/number}","pulls_url":"https://api.github.com/repos/is0280fp/generative_models/pulls{/number}","milestones_url":"https://api.github.com/repos/is0280fp/generative_models/milestones{/number}","notifications_url":"https://api.github.com/repos/is0280fp/generative_models/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/is0280fp/generative_models/labels{/name}","releases_url":"https://api.github.com/repos/is0280fp/generative_models/releases{/id}","deployments_url":"https://api.github.com/repos/is0280fp/generative_models/deployments","created_at":"2018-04-13T08:48:13Z","updated_at":"2018-04-20T14:05:21Z","pushed_at":"2018-04-27T16:37:03Z","git_url":"git://github.com/is0280fp/generative_models.git","ssh_url":"git@github.com:is0280fp/generative_models.git","clone_url":"https://github.com/is0280fp/generative_models.git","svn_url":"https://github.com/is0280fp/generative_models","homepage":null,"size":30,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/is0280fp/generative_models/pulls/9"},"html":{"href":"https://github.com/is0280fp/generative_models/pull/9"},"issue":{"href":"https://api.github.com/repos/is0280fp/generative_models/issues/9"},"comments":{"href":"https://api.github.com/repos/is0280fp/generative_models/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/is0280fp/generative_models/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/is0280fp/generative_models/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/is0280fp/generative_models/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/is0280fp/generative_models/statuses/142e36cd1d4eadd5922c31fb399ee2f11a018a54"}},"author_association":"OWNER"}}
{"actor":{"display_login":"ronekko"}}