{"action":"created","comment":{"url":"https://api.github.com/repos/numenta/nupic.fluent/pulls/comments/34928414","id":34928414,"diff_hunk":"@@ -49,13 +50,43 @@ def readCSV(csvFile, sampleIdx, numLabels):\n       labelIdx = range(sampleIdx + 1, sampleIdx + 1 + numLabels)\n \n       for line in reader:\n-        dataDict[line[sampleIdx]] = [line[i] for i in labelIdx if line[i]]\n+        dataDict[line[0]] = (line[sampleIdx], [line[i] for i in labelIdx if line[i]])\n     \n       return dataDict\n \n   except IOError as e:\n     print e\n \n+def readDir(dirPath, sampleIdx, numLabels, modify=False):\n+  \"\"\"\n+  Reads in data from a directory of CSV files; assumes the directory only\n+  contains CSV files.\n+  \n+  @param dirPath            (str)          Path to the directory.\n+  @param sampleIdx          (int)          Column number of the text samples.\n+  @param numLabels          (int)          Number of columns of category labels.\n+  @param modify             (bool)         Map the unix friendly category names\n+                                           to the actual names. 0 -> /, _ -> \" \"\n+  \n+  @return samplesDict       (defaultdict)  Keys are CSV names, values are\n+      OrderedDicts, where the keys/values are as specified in readCSV().\n+  \n+  @return randoSamplesDict  (defaultdict)  Copy of samplesDict, but the order of","path":"fluent/utils/csv_helper.py","position":37,"original_position":37,"commit_id":"294a4cf8707e8de62a344c9e35b47c4818986b13","original_commit_id":"294a4cf8707e8de62a344c9e35b47c4818986b13","user":{"login":"BoltzmannBrain","id":8323700,"avatar_url":"https://avatars.githubusercontent.com/u/8323700?v=3","gravatar_id":"","url":"https://api.github.com/users/BoltzmannBrain","html_url":"https://github.com/BoltzmannBrain","followers_url":"https://api.github.com/users/BoltzmannBrain/followers","following_url":"https://api.github.com/users/BoltzmannBrain/following{/other_user}","gists_url":"https://api.github.com/users/BoltzmannBrain/gists{/gist_id}","starred_url":"https://api.github.com/users/BoltzmannBrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BoltzmannBrain/subscriptions","organizations_url":"https://api.github.com/users/BoltzmannBrain/orgs","repos_url":"https://api.github.com/users/BoltzmannBrain/repos","events_url":"https://api.github.com/users/BoltzmannBrain/events{/privacy}","received_events_url":"https://api.github.com/users/BoltzmannBrain/received_events","type":"User","site_admin":false},"body":"delete","created_at":"2015-07-17T20:34:33Z","updated_at":"2015-07-17T20:34:33Z","html_url":"https://github.com/numenta/nupic.fluent/pull/116#discussion_r34928414","pull_request_url":"https://api.github.com/repos/numenta/nupic.fluent/pulls/116","_links":{"self":{"href":"https://api.github.com/repos/numenta/nupic.fluent/pulls/comments/34928414"},"html":{"href":"https://github.com/numenta/nupic.fluent/pull/116#discussion_r34928414"},"pull_request":{"href":"https://api.github.com/repos/numenta/nupic.fluent/pulls/116"}}},"pull_request":{"url":"https://api.github.com/repos/numenta/nupic.fluent/pulls/116","id":40194195,"html_url":"https://github.com/numenta/nupic.fluent/pull/116","diff_url":"https://github.com/numenta/nupic.fluent/pull/116.diff","patch_url":"https://github.com/numenta/nupic.fluent/pull/116.patch","issue_url":"https://api.github.com/repos/numenta/nupic.fluent/issues/116","number":116,"state":"open","locked":false,"title":"New runner to handle data from a directory","user":{"login":"akhilaananthram","id":5855832,"avatar_url":"https://avatars.githubusercontent.com/u/5855832?v=3","gravatar_id":"","url":"https://api.github.com/users/akhilaananthram","html_url":"https://github.com/akhilaananthram","followers_url":"https://api.github.com/users/akhilaananthram/followers","following_url":"https://api.github.com/users/akhilaananthram/following{/other_user}","gists_url":"https://api.github.com/users/akhilaananthram/gists{/gist_id}","starred_url":"https://api.github.com/users/akhilaananthram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akhilaananthram/subscriptions","organizations_url":"https://api.github.com/users/akhilaananthram/orgs","repos_url":"https://api.github.com/users/akhilaananthram/repos","events_url":"https://api.github.com/users/akhilaananthram/events{/privacy}","received_events_url":"https://api.github.com/users/akhilaananthram/received_events","type":"User","site_admin":false},"body":"MultiRunner expects the data to be in a directory. It reads the csv files in the directory and selects the same number of instances from each file to train on.  It uses the file name as the category label for training.  For testing, it either tests on a provided file or on the remaining instances.  It does not test on anything used for training.\r\n\r\nThere are also changes to readCSV to get the ID of a comment.  Because of this, there are changes to baseline_experiment so it will still work.\r\n\r\n@BoltzmannBrain ","created_at":"2015-07-17T01:56:39Z","updated_at":"2015-07-17T20:34:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e0f50dbc4ebee692145fb273c28b85d17bc6bc53","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/numenta/nupic.fluent/pulls/116/commits","review_comments_url":"https://api.github.com/repos/numenta/nupic.fluent/pulls/116/comments","review_comment_url":"https://api.github.com/repos/numenta/nupic.fluent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/numenta/nupic.fluent/issues/116/comments","statuses_url":"https://api.github.com/repos/numenta/nupic.fluent/statuses/294a4cf8707e8de62a344c9e35b47c4818986b13","head":{"label":"akhilaananthram:train_on_k","ref":"train_on_k","sha":"294a4cf8707e8de62a344c9e35b47c4818986b13","user":{"login":"akhilaananthram","id":5855832,"avatar_url":"https://avatars.githubusercontent.com/u/5855832?v=3","gravatar_id":"","url":"https://api.github.com/users/akhilaananthram","html_url":"https://github.com/akhilaananthram","followers_url":"https://api.github.com/users/akhilaananthram/followers","following_url":"https://api.github.com/users/akhilaananthram/following{/other_user}","gists_url":"https://api.github.com/users/akhilaananthram/gists{/gist_id}","starred_url":"https://api.github.com/users/akhilaananthram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akhilaananthram/subscriptions","organizations_url":"https://api.github.com/users/akhilaananthram/orgs","repos_url":"https://api.github.com/users/akhilaananthram/repos","events_url":"https://api.github.com/users/akhilaananthram/events{/privacy}","received_events_url":"https://api.github.com/users/akhilaananthram/received_events","type":"User","site_admin":false},"repo":{"id":37288881,"name":"nupic.fluent","full_name":"akhilaananthram/nupic.fluent","owner":{"login":"akhilaananthram","id":5855832,"avatar_url":"https://avatars.githubusercontent.com/u/5855832?v=3","gravatar_id":"","url":"https://api.github.com/users/akhilaananthram","html_url":"https://github.com/akhilaananthram","followers_url":"https://api.github.com/users/akhilaananthram/followers","following_url":"https://api.github.com/users/akhilaananthram/following{/other_user}","gists_url":"https://api.github.com/users/akhilaananthram/gists{/gist_id}","starred_url":"https://api.github.com/users/akhilaananthram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akhilaananthram/subscriptions","organizations_url":"https://api.github.com/users/akhilaananthram/orgs","repos_url":"https://api.github.com/users/akhilaananthram/repos","events_url":"https://api.github.com/users/akhilaananthram/events{/privacy}","received_events_url":"https://api.github.com/users/akhilaananthram/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/akhilaananthram/nupic.fluent","description":"A platform for building language / NLP-based applications using NuPIC and Cortical.io.","fork":true,"url":"https://api.github.com/repos/akhilaananthram/nupic.fluent","forks_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/forks","keys_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/teams","hooks_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/hooks","issue_events_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/issues/events{/number}","events_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/events","assignees_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/assignees{/user}","branches_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/branches{/branch}","tags_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/tags","blobs_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/git/refs{/sha}","trees_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/statuses/{sha}","languages_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/languages","stargazers_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/stargazers","contributors_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/contributors","subscribers_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/subscribers","subscription_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/subscription","commits_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/commits{/sha}","git_commits_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/git/commits{/sha}","comments_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/comments{/number}","issue_comment_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/issues/comments{/number}","contents_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/contents/{+path}","compare_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/merges","archive_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/downloads","issues_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/issues{/number}","pulls_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/pulls{/number}","milestones_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/milestones{/number}","notifications_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/labels{/name}","releases_url":"https://api.github.com/repos/akhilaananthram/nupic.fluent/releases{/id}","created_at":"2015-06-11T22:11:28Z","updated_at":"2015-06-11T22:11:28Z","pushed_at":"2015-07-17T01:45:42Z","git_url":"git://github.com/akhilaananthram/nupic.fluent.git","ssh_url":"git@github.com:akhilaananthram/nupic.fluent.git","clone_url":"https://github.com/akhilaananthram/nupic.fluent.git","svn_url":"https://github.com/akhilaananthram/nupic.fluent","homepage":"","size":3497,"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":"numenta:master","ref":"master","sha":"378d5a23a0cb41544a71f130a64769e315a099b6","user":{"login":"numenta","id":1039191,"avatar_url":"https://avatars.githubusercontent.com/u/1039191?v=3","gravatar_id":"","url":"https://api.github.com/users/numenta","html_url":"https://github.com/numenta","followers_url":"https://api.github.com/users/numenta/followers","following_url":"https://api.github.com/users/numenta/following{/other_user}","gists_url":"https://api.github.com/users/numenta/gists{/gist_id}","starred_url":"https://api.github.com/users/numenta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numenta/subscriptions","organizations_url":"https://api.github.com/users/numenta/orgs","repos_url":"https://api.github.com/users/numenta/repos","events_url":"https://api.github.com/users/numenta/events{/privacy}","received_events_url":"https://api.github.com/users/numenta/received_events","type":"Organization","site_admin":false},"repo":{"id":17183816,"name":"nupic.fluent","full_name":"numenta/nupic.fluent","owner":{"login":"numenta","id":1039191,"avatar_url":"https://avatars.githubusercontent.com/u/1039191?v=3","gravatar_id":"","url":"https://api.github.com/users/numenta","html_url":"https://github.com/numenta","followers_url":"https://api.github.com/users/numenta/followers","following_url":"https://api.github.com/users/numenta/following{/other_user}","gists_url":"https://api.github.com/users/numenta/gists{/gist_id}","starred_url":"https://api.github.com/users/numenta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numenta/subscriptions","organizations_url":"https://api.github.com/users/numenta/orgs","repos_url":"https://api.github.com/users/numenta/repos","events_url":"https://api.github.com/users/numenta/events{/privacy}","received_events_url":"https://api.github.com/users/numenta/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/numenta/nupic.fluent","description":"A platform for building language / NLP-based applications using NuPIC and Cortical.io.","fork":false,"url":"https://api.github.com/repos/numenta/nupic.fluent","forks_url":"https://api.github.com/repos/numenta/nupic.fluent/forks","keys_url":"https://api.github.com/repos/numenta/nupic.fluent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/numenta/nupic.fluent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/numenta/nupic.fluent/teams","hooks_url":"https://api.github.com/repos/numenta/nupic.fluent/hooks","issue_events_url":"https://api.github.com/repos/numenta/nupic.fluent/issues/events{/number}","events_url":"https://api.github.com/repos/numenta/nupic.fluent/events","assignees_url":"https://api.github.com/repos/numenta/nupic.fluent/assignees{/user}","branches_url":"https://api.github.com/repos/numenta/nupic.fluent/branches{/branch}","tags_url":"https://api.github.com/repos/numenta/nupic.fluent/tags","blobs_url":"https://api.github.com/repos/numenta/nupic.fluent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/numenta/nupic.fluent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/numenta/nupic.fluent/git/refs{/sha}","trees_url":"https://api.github.com/repos/numenta/nupic.fluent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/numenta/nupic.fluent/statuses/{sha}","languages_url":"https://api.github.com/repos/numenta/nupic.fluent/languages","stargazers_url":"https://api.github.com/repos/numenta/nupic.fluent/stargazers","contributors_url":"https://api.github.com/repos/numenta/nupic.fluent/contributors","subscribers_url":"https://api.github.com/repos/numenta/nupic.fluent/subscribers","subscription_url":"https://api.github.com/repos/numenta/nupic.fluent/subscription","commits_url":"https://api.github.com/repos/numenta/nupic.fluent/commits{/sha}","git_commits_url":"https://api.github.com/repos/numenta/nupic.fluent/git/commits{/sha}","comments_url":"https://api.github.com/repos/numenta/nupic.fluent/comments{/number}","issue_comment_url":"https://api.github.com/repos/numenta/nupic.fluent/issues/comments{/number}","contents_url":"https://api.github.com/repos/numenta/nupic.fluent/contents/{+path}","compare_url":"https://api.github.com/repos/numenta/nupic.fluent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/numenta/nupic.fluent/merges","archive_url":"https://api.github.com/repos/numenta/nupic.fluent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/numenta/nupic.fluent/downloads","issues_url":"https://api.github.com/repos/numenta/nupic.fluent/issues{/number}","pulls_url":"https://api.github.com/repos/numenta/nupic.fluent/pulls{/number}","milestones_url":"https://api.github.com/repos/numenta/nupic.fluent/milestones{/number}","notifications_url":"https://api.github.com/repos/numenta/nupic.fluent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/numenta/nupic.fluent/labels{/name}","releases_url":"https://api.github.com/repos/numenta/nupic.fluent/releases{/id}","created_at":"2014-02-25T18:41:17Z","updated_at":"2015-07-05T11:09:46Z","pushed_at":"2015-07-17T01:56:39Z","git_url":"git://github.com/numenta/nupic.fluent.git","ssh_url":"git@github.com:numenta/nupic.fluent.git","clone_url":"https://github.com/numenta/nupic.fluent.git","svn_url":"https://github.com/numenta/nupic.fluent","homepage":"","size":6344,"stargazers_count":21,"watchers_count":21,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":20,"forks":18,"open_issues":20,"watchers":21,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/numenta/nupic.fluent/pulls/116"},"html":{"href":"https://github.com/numenta/nupic.fluent/pull/116"},"issue":{"href":"https://api.github.com/repos/numenta/nupic.fluent/issues/116"},"comments":{"href":"https://api.github.com/repos/numenta/nupic.fluent/issues/116/comments"},"review_comments":{"href":"https://api.github.com/repos/numenta/nupic.fluent/pulls/116/comments"},"review_comment":{"href":"https://api.github.com/repos/numenta/nupic.fluent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/numenta/nupic.fluent/pulls/116/commits"},"statuses":{"href":"https://api.github.com/repos/numenta/nupic.fluent/statuses/294a4cf8707e8de62a344c9e35b47c4818986b13"}}}}