{"action":"created","comment":{"url":"https://api.github.com/repos/fmfn/UnbalancedDataset/pulls/comments/67868077","id":67868077,"diff_hunk":"@@ -308,19 +308,19 @@ def _make_samples(self, X, y_type, nn_data, nn_num, n_samples,\n         X = check_array(X)\n \n         # A matrix to store the synthetic samples\n-        X_new = np.zeros((n_samples, X.shape[1]))\n+        X_new = np.zeros((int(n_samples), X.shape[1]))","path":"unbalanced_dataset/over_sampling/smote.py","position":5,"original_position":5,"commit_id":"dc1154c3ad1152aa650a7a6a81115b67afb313bb","original_commit_id":"dc1154c3ad1152aa650a7a6a81115b67afb313bb","user":{"login":"glemaitre","id":7454015,"avatar_url":"https://avatars.githubusercontent.com/u/7454015?v=3","gravatar_id":"","url":"https://api.github.com/users/glemaitre","html_url":"https://github.com/glemaitre","followers_url":"https://api.github.com/users/glemaitre/followers","following_url":"https://api.github.com/users/glemaitre/following{/other_user}","gists_url":"https://api.github.com/users/glemaitre/gists{/gist_id}","starred_url":"https://api.github.com/users/glemaitre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glemaitre/subscriptions","organizations_url":"https://api.github.com/users/glemaitre/orgs","repos_url":"https://api.github.com/users/glemaitre/repos","events_url":"https://api.github.com/users/glemaitre/events{/privacy}","received_events_url":"https://api.github.com/users/glemaitre/received_events","type":"User","site_admin":false},"body":"I am not a big fan of casting n_samples to int here. This is an argument that is provided by the user so let raise the warning. However, if you got a warning due to line 384 we have to do round there and cast at that point.","created_at":"2016-06-21T13:32:53Z","updated_at":"2016-06-21T13:32:53Z","html_url":"https://github.com/fmfn/UnbalancedDataset/pull/72#discussion_r67868077","pull_request_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/pulls/72","_links":{"self":{"href":"https://api.github.com/repos/fmfn/UnbalancedDataset/pulls/comments/67868077"},"html":{"href":"https://github.com/fmfn/UnbalancedDataset/pull/72#discussion_r67868077"},"pull_request":{"href":"https://api.github.com/repos/fmfn/UnbalancedDataset/pulls/72"}}},"pull_request":{"url":"https://api.github.com/repos/fmfn/UnbalancedDataset/pulls/72","id":74592085,"html_url":"https://github.com/fmfn/UnbalancedDataset/pull/72","diff_url":"https://github.com/fmfn/UnbalancedDataset/pull/72.diff","patch_url":"https://github.com/fmfn/UnbalancedDataset/pull/72.patch","issue_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/issues/72","number":72,"state":"open","locked":false,"title":"Added some type casting to remove warnings and a check for negative num_samples","user":{"login":"MartinHjelm","id":1571080,"avatar_url":"https://avatars.githubusercontent.com/u/1571080?v=3","gravatar_id":"","url":"https://api.github.com/users/MartinHjelm","html_url":"https://github.com/MartinHjelm","followers_url":"https://api.github.com/users/MartinHjelm/followers","following_url":"https://api.github.com/users/MartinHjelm/following{/other_user}","gists_url":"https://api.github.com/users/MartinHjelm/gists{/gist_id}","starred_url":"https://api.github.com/users/MartinHjelm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartinHjelm/subscriptions","organizations_url":"https://api.github.com/users/MartinHjelm/orgs","repos_url":"https://api.github.com/users/MartinHjelm/repos","events_url":"https://api.github.com/users/MartinHjelm/events{/privacy}","received_events_url":"https://api.github.com/users/MartinHjelm/received_events","type":"User","site_admin":false},"body":"* Did type casting for size variables for the smote upsampling.\r\n* If the ratio for upsampling is smaller than the class ratio the suggested number of samples is negative. Added a check that returns the original X,y if that happens.","created_at":"2016-06-21T11:07:04Z","updated_at":"2016-06-21T13:32:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"421ab54f21165f451a0530439fb61a4904a515de","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/pulls/72/commits","review_comments_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/pulls/72/comments","review_comment_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/issues/72/comments","statuses_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/statuses/dc1154c3ad1152aa650a7a6a81115b67afb313bb","head":{"label":"MartinHjelm:master","ref":"master","sha":"dc1154c3ad1152aa650a7a6a81115b67afb313bb","user":{"login":"MartinHjelm","id":1571080,"avatar_url":"https://avatars.githubusercontent.com/u/1571080?v=3","gravatar_id":"","url":"https://api.github.com/users/MartinHjelm","html_url":"https://github.com/MartinHjelm","followers_url":"https://api.github.com/users/MartinHjelm/followers","following_url":"https://api.github.com/users/MartinHjelm/following{/other_user}","gists_url":"https://api.github.com/users/MartinHjelm/gists{/gist_id}","starred_url":"https://api.github.com/users/MartinHjelm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartinHjelm/subscriptions","organizations_url":"https://api.github.com/users/MartinHjelm/orgs","repos_url":"https://api.github.com/users/MartinHjelm/repos","events_url":"https://api.github.com/users/MartinHjelm/events{/privacy}","received_events_url":"https://api.github.com/users/MartinHjelm/received_events","type":"User","site_admin":false},"repo":{"id":61618592,"name":"UnbalancedDataset","full_name":"MartinHjelm/UnbalancedDataset","owner":{"login":"MartinHjelm","id":1571080,"avatar_url":"https://avatars.githubusercontent.com/u/1571080?v=3","gravatar_id":"","url":"https://api.github.com/users/MartinHjelm","html_url":"https://github.com/MartinHjelm","followers_url":"https://api.github.com/users/MartinHjelm/followers","following_url":"https://api.github.com/users/MartinHjelm/following{/other_user}","gists_url":"https://api.github.com/users/MartinHjelm/gists{/gist_id}","starred_url":"https://api.github.com/users/MartinHjelm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartinHjelm/subscriptions","organizations_url":"https://api.github.com/users/MartinHjelm/orgs","repos_url":"https://api.github.com/users/MartinHjelm/repos","events_url":"https://api.github.com/users/MartinHjelm/events{/privacy}","received_events_url":"https://api.github.com/users/MartinHjelm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MartinHjelm/UnbalancedDataset","description":"Python module to perform under sampling and over sampling with various techniques.","fork":true,"url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset","forks_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/forks","keys_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/teams","hooks_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/hooks","issue_events_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/issues/events{/number}","events_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/events","assignees_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/assignees{/user}","branches_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/branches{/branch}","tags_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/tags","blobs_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/git/refs{/sha}","trees_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/statuses/{sha}","languages_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/languages","stargazers_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/stargazers","contributors_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/contributors","subscribers_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/subscribers","subscription_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/subscription","commits_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/commits{/sha}","git_commits_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/git/commits{/sha}","comments_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/comments{/number}","issue_comment_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/issues/comments{/number}","contents_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/contents/{+path}","compare_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/merges","archive_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/downloads","issues_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/issues{/number}","pulls_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/pulls{/number}","milestones_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/milestones{/number}","notifications_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/labels{/name}","releases_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/releases{/id}","deployments_url":"https://api.github.com/repos/MartinHjelm/UnbalancedDataset/deployments","created_at":"2016-06-21T09:00:10Z","updated_at":"2016-06-21T09:00:12Z","pushed_at":"2016-06-21T09:06:52Z","git_url":"git://github.com/MartinHjelm/UnbalancedDataset.git","ssh_url":"git@github.com:MartinHjelm/UnbalancedDataset.git","clone_url":"https://github.com/MartinHjelm/UnbalancedDataset.git","svn_url":"https://github.com/MartinHjelm/UnbalancedDataset","homepage":null,"size":17723,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fmfn:master","ref":"master","sha":"bd25c8b664d2e79b97d61b29b3c980cc7f4536b2","user":{"login":"fmfn","id":7664252,"avatar_url":"https://avatars.githubusercontent.com/u/7664252?v=3","gravatar_id":"","url":"https://api.github.com/users/fmfn","html_url":"https://github.com/fmfn","followers_url":"https://api.github.com/users/fmfn/followers","following_url":"https://api.github.com/users/fmfn/following{/other_user}","gists_url":"https://api.github.com/users/fmfn/gists{/gist_id}","starred_url":"https://api.github.com/users/fmfn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fmfn/subscriptions","organizations_url":"https://api.github.com/users/fmfn/orgs","repos_url":"https://api.github.com/users/fmfn/repos","events_url":"https://api.github.com/users/fmfn/events{/privacy}","received_events_url":"https://api.github.com/users/fmfn/received_events","type":"User","site_admin":false},"repo":{"id":23011147,"name":"UnbalancedDataset","full_name":"fmfn/UnbalancedDataset","owner":{"login":"fmfn","id":7664252,"avatar_url":"https://avatars.githubusercontent.com/u/7664252?v=3","gravatar_id":"","url":"https://api.github.com/users/fmfn","html_url":"https://github.com/fmfn","followers_url":"https://api.github.com/users/fmfn/followers","following_url":"https://api.github.com/users/fmfn/following{/other_user}","gists_url":"https://api.github.com/users/fmfn/gists{/gist_id}","starred_url":"https://api.github.com/users/fmfn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fmfn/subscriptions","organizations_url":"https://api.github.com/users/fmfn/orgs","repos_url":"https://api.github.com/users/fmfn/repos","events_url":"https://api.github.com/users/fmfn/events{/privacy}","received_events_url":"https://api.github.com/users/fmfn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fmfn/UnbalancedDataset","description":"Python module to perform under sampling and over sampling with various techniques.","fork":false,"url":"https://api.github.com/repos/fmfn/UnbalancedDataset","forks_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/forks","keys_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/teams","hooks_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/hooks","issue_events_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/issues/events{/number}","events_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/events","assignees_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/assignees{/user}","branches_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/branches{/branch}","tags_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/tags","blobs_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/git/refs{/sha}","trees_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/statuses/{sha}","languages_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/languages","stargazers_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/stargazers","contributors_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/contributors","subscribers_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/subscribers","subscription_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/subscription","commits_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/commits{/sha}","git_commits_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/git/commits{/sha}","comments_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/comments{/number}","issue_comment_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/issues/comments{/number}","contents_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/contents/{+path}","compare_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/merges","archive_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/downloads","issues_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/issues{/number}","pulls_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/pulls{/number}","milestones_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/milestones{/number}","notifications_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/labels{/name}","releases_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/releases{/id}","deployments_url":"https://api.github.com/repos/fmfn/UnbalancedDataset/deployments","created_at":"2014-08-16T05:08:26Z","updated_at":"2016-06-20T22:48:51Z","pushed_at":"2016-06-21T11:07:04Z","git_url":"git://github.com/fmfn/UnbalancedDataset.git","ssh_url":"git@github.com:fmfn/UnbalancedDataset.git","clone_url":"https://github.com/fmfn/UnbalancedDataset.git","svn_url":"https://github.com/fmfn/UnbalancedDataset","homepage":null,"size":17764,"stargazers_count":313,"watchers_count":313,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":113,"mirror_url":null,"open_issues_count":10,"forks":113,"open_issues":10,"watchers":313,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fmfn/UnbalancedDataset/pulls/72"},"html":{"href":"https://github.com/fmfn/UnbalancedDataset/pull/72"},"issue":{"href":"https://api.github.com/repos/fmfn/UnbalancedDataset/issues/72"},"comments":{"href":"https://api.github.com/repos/fmfn/UnbalancedDataset/issues/72/comments"},"review_comments":{"href":"https://api.github.com/repos/fmfn/UnbalancedDataset/pulls/72/comments"},"review_comment":{"href":"https://api.github.com/repos/fmfn/UnbalancedDataset/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fmfn/UnbalancedDataset/pulls/72/commits"},"statuses":{"href":"https://api.github.com/repos/fmfn/UnbalancedDataset/statuses/dc1154c3ad1152aa650a7a6a81115b67afb313bb"}}}}
{"actor":{"display_login":"glemaitre"}}