{"action":"created","comment":{"url":"https://api.github.com/repos/jbrukh/bayesian/pulls/comments/76109089","id":76109089,"diff_hunk":"@@ -70,4 +76,41 @@ probs, likely, _ := classifier.ProbScores(\n                         []string{\"tall\", \"girl\"}\n                      )\n ```\n+\n+### Example 2 (TD-IDF)\n+To use the TD-IDF classifier, first you must create some classes\n+and train it AND you need to call ConvertTermsFreqToTFIDF() AFTER training\n+and before Classifying methods(LogScore,ProbSafeScore,ProbScore)\n+\n+```go\n+import . \"bayesian\"\n+\n+const (\n+    Good Class = \"Good\"\n+    Bad Class = \"Bad\"\n+)\n+\n+classifier := NewClassifierTFIDF(Good, Bad) //Extra constructor\n+goodStuff := []string{\"tall\", \"rich\", \"handsome\"}\n+badStuff  := []string{\"poor\", \"smelly\", \"ugly\"}\n+classifier.Learn(goodStuff, Good)\n+classifier.Learn(badStuff,  Bad)\n+\n+classifier.ConvertTermsFreqToTFIDF() //IMPORTANT !!","path":"README.md","position":52,"original_position":52,"commit_id":"2376d16b671379494cd51477bb6c02c4c6e464e6","original_commit_id":"2376d16b671379494cd51477bb6c02c4c6e464e6","user":{"login":"jbrukh","id":44650,"avatar_url":"https://avatars.githubusercontent.com/u/44650?v=3","gravatar_id":"","url":"https://api.github.com/users/jbrukh","html_url":"https://github.com/jbrukh","followers_url":"https://api.github.com/users/jbrukh/followers","following_url":"https://api.github.com/users/jbrukh/following{/other_user}","gists_url":"https://api.github.com/users/jbrukh/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrukh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrukh/subscriptions","organizations_url":"https://api.github.com/users/jbrukh/orgs","repos_url":"https://api.github.com/users/jbrukh/repos","events_url":"https://api.github.com/users/jbrukh/events{/privacy}","received_events_url":"https://api.github.com/users/jbrukh/received_events","type":"User","site_admin":false},"body":"Change call to `ConvertTermsFreqToTfIdf`. Add space after `//`.","created_at":"2016-08-24T18:10:20Z","updated_at":"2016-08-24T18:10:20Z","html_url":"https://github.com/jbrukh/bayesian/pull/14#discussion_r76109089","pull_request_url":"https://api.github.com/repos/jbrukh/bayesian/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/jbrukh/bayesian/pulls/comments/76109089"},"html":{"href":"https://github.com/jbrukh/bayesian/pull/14#discussion_r76109089"},"pull_request":{"href":"https://api.github.com/repos/jbrukh/bayesian/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/jbrukh/bayesian/pulls/14","id":77791150,"html_url":"https://github.com/jbrukh/bayesian/pull/14","diff_url":"https://github.com/jbrukh/bayesian/pull/14.diff","patch_url":"https://github.com/jbrukh/bayesian/pull/14.patch","issue_url":"https://api.github.com/repos/jbrukh/bayesian/issues/14","number":14,"state":"open","locked":false,"title":"Initial TD-IDF work","user":{"login":"rawoke083","id":5529508,"avatar_url":"https://avatars.githubusercontent.com/u/5529508?v=3","gravatar_id":"","url":"https://api.github.com/users/rawoke083","html_url":"https://github.com/rawoke083","followers_url":"https://api.github.com/users/rawoke083/followers","following_url":"https://api.github.com/users/rawoke083/following{/other_user}","gists_url":"https://api.github.com/users/rawoke083/gists{/gist_id}","starred_url":"https://api.github.com/users/rawoke083/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rawoke083/subscriptions","organizations_url":"https://api.github.com/users/rawoke083/orgs","repos_url":"https://api.github.com/users/rawoke083/repos","events_url":"https://api.github.com/users/rawoke083/events{/privacy}","received_events_url":"https://api.github.com/users/rawoke083/received_events","type":"User","site_admin":false},"body":"Added in TD-IDF support to use instead of plain word counts ! Works very well ! Lots of extra accuracy.\r\nSee updated README for usage.\r\n ","created_at":"2016-07-18T11:08:52Z","updated_at":"2016-08-24T18:10:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab2fec987dbc58066edff13e447cfa546d31f3f7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jbrukh/bayesian/pulls/14/commits","review_comments_url":"https://api.github.com/repos/jbrukh/bayesian/pulls/14/comments","review_comment_url":"https://api.github.com/repos/jbrukh/bayesian/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jbrukh/bayesian/issues/14/comments","statuses_url":"https://api.github.com/repos/jbrukh/bayesian/statuses/2376d16b671379494cd51477bb6c02c4c6e464e6","head":{"label":"rawoke083:master","ref":"master","sha":"2376d16b671379494cd51477bb6c02c4c6e464e6","user":{"login":"rawoke083","id":5529508,"avatar_url":"https://avatars.githubusercontent.com/u/5529508?v=3","gravatar_id":"","url":"https://api.github.com/users/rawoke083","html_url":"https://github.com/rawoke083","followers_url":"https://api.github.com/users/rawoke083/followers","following_url":"https://api.github.com/users/rawoke083/following{/other_user}","gists_url":"https://api.github.com/users/rawoke083/gists{/gist_id}","starred_url":"https://api.github.com/users/rawoke083/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rawoke083/subscriptions","organizations_url":"https://api.github.com/users/rawoke083/orgs","repos_url":"https://api.github.com/users/rawoke083/repos","events_url":"https://api.github.com/users/rawoke083/events{/privacy}","received_events_url":"https://api.github.com/users/rawoke083/received_events","type":"User","site_admin":false},"repo":{"id":63584436,"name":"bayesian","full_name":"rawoke083/bayesian","owner":{"login":"rawoke083","id":5529508,"avatar_url":"https://avatars.githubusercontent.com/u/5529508?v=3","gravatar_id":"","url":"https://api.github.com/users/rawoke083","html_url":"https://github.com/rawoke083","followers_url":"https://api.github.com/users/rawoke083/followers","following_url":"https://api.github.com/users/rawoke083/following{/other_user}","gists_url":"https://api.github.com/users/rawoke083/gists{/gist_id}","starred_url":"https://api.github.com/users/rawoke083/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rawoke083/subscriptions","organizations_url":"https://api.github.com/users/rawoke083/orgs","repos_url":"https://api.github.com/users/rawoke083/repos","events_url":"https://api.github.com/users/rawoke083/events{/privacy}","received_events_url":"https://api.github.com/users/rawoke083/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rawoke083/bayesian","description":"Naive Bayesian Classification for Golang.","fork":true,"url":"https://api.github.com/repos/rawoke083/bayesian","forks_url":"https://api.github.com/repos/rawoke083/bayesian/forks","keys_url":"https://api.github.com/repos/rawoke083/bayesian/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rawoke083/bayesian/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rawoke083/bayesian/teams","hooks_url":"https://api.github.com/repos/rawoke083/bayesian/hooks","issue_events_url":"https://api.github.com/repos/rawoke083/bayesian/issues/events{/number}","events_url":"https://api.github.com/repos/rawoke083/bayesian/events","assignees_url":"https://api.github.com/repos/rawoke083/bayesian/assignees{/user}","branches_url":"https://api.github.com/repos/rawoke083/bayesian/branches{/branch}","tags_url":"https://api.github.com/repos/rawoke083/bayesian/tags","blobs_url":"https://api.github.com/repos/rawoke083/bayesian/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rawoke083/bayesian/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rawoke083/bayesian/git/refs{/sha}","trees_url":"https://api.github.com/repos/rawoke083/bayesian/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rawoke083/bayesian/statuses/{sha}","languages_url":"https://api.github.com/repos/rawoke083/bayesian/languages","stargazers_url":"https://api.github.com/repos/rawoke083/bayesian/stargazers","contributors_url":"https://api.github.com/repos/rawoke083/bayesian/contributors","subscribers_url":"https://api.github.com/repos/rawoke083/bayesian/subscribers","subscription_url":"https://api.github.com/repos/rawoke083/bayesian/subscription","commits_url":"https://api.github.com/repos/rawoke083/bayesian/commits{/sha}","git_commits_url":"https://api.github.com/repos/rawoke083/bayesian/git/commits{/sha}","comments_url":"https://api.github.com/repos/rawoke083/bayesian/comments{/number}","issue_comment_url":"https://api.github.com/repos/rawoke083/bayesian/issues/comments{/number}","contents_url":"https://api.github.com/repos/rawoke083/bayesian/contents/{+path}","compare_url":"https://api.github.com/repos/rawoke083/bayesian/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rawoke083/bayesian/merges","archive_url":"https://api.github.com/repos/rawoke083/bayesian/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rawoke083/bayesian/downloads","issues_url":"https://api.github.com/repos/rawoke083/bayesian/issues{/number}","pulls_url":"https://api.github.com/repos/rawoke083/bayesian/pulls{/number}","milestones_url":"https://api.github.com/repos/rawoke083/bayesian/milestones{/number}","notifications_url":"https://api.github.com/repos/rawoke083/bayesian/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rawoke083/bayesian/labels{/name}","releases_url":"https://api.github.com/repos/rawoke083/bayesian/releases{/id}","deployments_url":"https://api.github.com/repos/rawoke083/bayesian/deployments","created_at":"2016-07-18T08:31:51Z","updated_at":"2016-07-18T08:31:52Z","pushed_at":"2016-08-24T17:43:13Z","git_url":"git://github.com/rawoke083/bayesian.git","ssh_url":"git@github.com:rawoke083/bayesian.git","clone_url":"https://github.com/rawoke083/bayesian.git","svn_url":"https://github.com/rawoke083/bayesian","homepage":"","size":49,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"jbrukh:master","ref":"master","sha":"a65fd1effddb7bd71c6bb6ca1876e045a7aeac6e","user":{"login":"jbrukh","id":44650,"avatar_url":"https://avatars.githubusercontent.com/u/44650?v=3","gravatar_id":"","url":"https://api.github.com/users/jbrukh","html_url":"https://github.com/jbrukh","followers_url":"https://api.github.com/users/jbrukh/followers","following_url":"https://api.github.com/users/jbrukh/following{/other_user}","gists_url":"https://api.github.com/users/jbrukh/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrukh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrukh/subscriptions","organizations_url":"https://api.github.com/users/jbrukh/orgs","repos_url":"https://api.github.com/users/jbrukh/repos","events_url":"https://api.github.com/users/jbrukh/events{/privacy}","received_events_url":"https://api.github.com/users/jbrukh/received_events","type":"User","site_admin":false},"repo":{"id":2833211,"name":"bayesian","full_name":"jbrukh/bayesian","owner":{"login":"jbrukh","id":44650,"avatar_url":"https://avatars.githubusercontent.com/u/44650?v=3","gravatar_id":"","url":"https://api.github.com/users/jbrukh","html_url":"https://github.com/jbrukh","followers_url":"https://api.github.com/users/jbrukh/followers","following_url":"https://api.github.com/users/jbrukh/following{/other_user}","gists_url":"https://api.github.com/users/jbrukh/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrukh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrukh/subscriptions","organizations_url":"https://api.github.com/users/jbrukh/orgs","repos_url":"https://api.github.com/users/jbrukh/repos","events_url":"https://api.github.com/users/jbrukh/events{/privacy}","received_events_url":"https://api.github.com/users/jbrukh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jbrukh/bayesian","description":"Naive Bayesian Classification for Golang.","fork":false,"url":"https://api.github.com/repos/jbrukh/bayesian","forks_url":"https://api.github.com/repos/jbrukh/bayesian/forks","keys_url":"https://api.github.com/repos/jbrukh/bayesian/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jbrukh/bayesian/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jbrukh/bayesian/teams","hooks_url":"https://api.github.com/repos/jbrukh/bayesian/hooks","issue_events_url":"https://api.github.com/repos/jbrukh/bayesian/issues/events{/number}","events_url":"https://api.github.com/repos/jbrukh/bayesian/events","assignees_url":"https://api.github.com/repos/jbrukh/bayesian/assignees{/user}","branches_url":"https://api.github.com/repos/jbrukh/bayesian/branches{/branch}","tags_url":"https://api.github.com/repos/jbrukh/bayesian/tags","blobs_url":"https://api.github.com/repos/jbrukh/bayesian/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jbrukh/bayesian/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jbrukh/bayesian/git/refs{/sha}","trees_url":"https://api.github.com/repos/jbrukh/bayesian/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jbrukh/bayesian/statuses/{sha}","languages_url":"https://api.github.com/repos/jbrukh/bayesian/languages","stargazers_url":"https://api.github.com/repos/jbrukh/bayesian/stargazers","contributors_url":"https://api.github.com/repos/jbrukh/bayesian/contributors","subscribers_url":"https://api.github.com/repos/jbrukh/bayesian/subscribers","subscription_url":"https://api.github.com/repos/jbrukh/bayesian/subscription","commits_url":"https://api.github.com/repos/jbrukh/bayesian/commits{/sha}","git_commits_url":"https://api.github.com/repos/jbrukh/bayesian/git/commits{/sha}","comments_url":"https://api.github.com/repos/jbrukh/bayesian/comments{/number}","issue_comment_url":"https://api.github.com/repos/jbrukh/bayesian/issues/comments{/number}","contents_url":"https://api.github.com/repos/jbrukh/bayesian/contents/{+path}","compare_url":"https://api.github.com/repos/jbrukh/bayesian/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jbrukh/bayesian/merges","archive_url":"https://api.github.com/repos/jbrukh/bayesian/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jbrukh/bayesian/downloads","issues_url":"https://api.github.com/repos/jbrukh/bayesian/issues{/number}","pulls_url":"https://api.github.com/repos/jbrukh/bayesian/pulls{/number}","milestones_url":"https://api.github.com/repos/jbrukh/bayesian/milestones{/number}","notifications_url":"https://api.github.com/repos/jbrukh/bayesian/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jbrukh/bayesian/labels{/name}","releases_url":"https://api.github.com/repos/jbrukh/bayesian/releases{/id}","deployments_url":"https://api.github.com/repos/jbrukh/bayesian/deployments","created_at":"2011-11-23T04:17:00Z","updated_at":"2016-08-18T10:30:18Z","pushed_at":"2016-08-24T17:43:14Z","git_url":"git://github.com/jbrukh/bayesian.git","ssh_url":"git@github.com:jbrukh/bayesian.git","clone_url":"https://github.com/jbrukh/bayesian.git","svn_url":"https://github.com/jbrukh/bayesian","homepage":"","size":46,"stargazers_count":353,"watchers_count":353,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":52,"mirror_url":null,"open_issues_count":3,"forks":52,"open_issues":3,"watchers":353,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jbrukh/bayesian/pulls/14"},"html":{"href":"https://github.com/jbrukh/bayesian/pull/14"},"issue":{"href":"https://api.github.com/repos/jbrukh/bayesian/issues/14"},"comments":{"href":"https://api.github.com/repos/jbrukh/bayesian/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/jbrukh/bayesian/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/jbrukh/bayesian/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jbrukh/bayesian/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/jbrukh/bayesian/statuses/2376d16b671379494cd51477bb6c02c4c6e464e6"}}}}
{"actor":{"display_login":"jbrukh"}}