{"action":"created","comment":{"url":"https://api.github.com/repos/improbable-research/keanu/pulls/comments/187201176","pull_request_review_id":118934507,"id":187201176,"diff_hunk":"@@ -0,0 +1,165 @@\n+package io.improbable.keanu.vertices.dbl.probabilistic;\n+\n+import org.apache.commons.math3.distribution.TDistribution;\n+import org.apache.commons.math3.stat.descriptive.SummaryStatistics;\n+import org.junit.Assert;\n+import org.junit.Before;\n+import org.junit.Test;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+import static java.lang.Math.*;\n+import java.util.ArrayList;\n+import java.util.List;\n+import java.util.Random;\n+\n+import static junit.framework.TestCase.assertEquals;\n+\n+public class StudentTVertexTest {\n+\t\n+\tprivate static final double DELTA = 0.0001;\n+\t\n+\tprivate static int POS_V = 0;\n+\tprivate static int POS_MEAN = 1;\n+\tprivate static int POS_SD = 2; // standard deviation\n+\tprivate static final double[] TEST_VALUES = new double[]{\n+\t\t\t1.0, 2.0, 3.0\n+\t};\n+\t\n+\tprivate final Logger log = LoggerFactory.getLogger(StudentTVertexTest.class);\n+\t\n+\tprivate Random random;\n+\tprivate double mu = 0.;\n+\tprivate double sigma = 1.;\n+\t\n+\t@Before\n+\tpublic void setup() {\n+\t\trandom = new Random(1);\n+\t}\n+\t\n+\t@Test\n+\tpublic void sampleTest() {\n+\t\tint N = 10000000;","path":"keanu-project/src/test/java/io/improbable/keanu/vertices/dbl/probabilistic/StudentTVertexTest.java","position":null,"original_position":42,"commit_id":"21b13dda2eca3c125a218b606073bb28629c0b20","original_commit_id":"c270162c1978193def6306f6059b1421e7546c72","user":{"login":"kydreth","id":709905,"avatar_url":"https://avatars2.githubusercontent.com/u/709905?v=4","gravatar_id":"","url":"https://api.github.com/users/kydreth","html_url":"https://github.com/kydreth","followers_url":"https://api.github.com/users/kydreth/followers","following_url":"https://api.github.com/users/kydreth/following{/other_user}","gists_url":"https://api.github.com/users/kydreth/gists{/gist_id}","starred_url":"https://api.github.com/users/kydreth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kydreth/subscriptions","organizations_url":"https://api.github.com/users/kydreth/orgs","repos_url":"https://api.github.com/users/kydreth/repos","events_url":"https://api.github.com/users/kydreth/events{/privacy}","received_events_url":"https://api.github.com/users/kydreth/received_events","type":"User","site_admin":false},"body":"I don't think the apache one doesn't, ours did. I tried 100k, 1 mil, 10 mil. There was a huge variance with the std deviation.","created_at":"2018-05-09T23:08:05Z","updated_at":"2018-05-09T23:08:05Z","html_url":"https://github.com/improbable-research/keanu/pull/55#discussion_r187201176","pull_request_url":"https://api.github.com/repos/improbable-research/keanu/pulls/55","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/improbable-research/keanu/pulls/comments/187201176"},"html":{"href":"https://github.com/improbable-research/keanu/pull/55#discussion_r187201176"},"pull_request":{"href":"https://api.github.com/repos/improbable-research/keanu/pulls/55"}},"in_reply_to_id":186889237},"pull_request":{"url":"https://api.github.com/repos/improbable-research/keanu/pulls/55","id":186398398,"html_url":"https://github.com/improbable-research/keanu/pull/55","diff_url":"https://github.com/improbable-research/keanu/pull/55.diff","patch_url":"https://github.com/improbable-research/keanu/pull/55.patch","issue_url":"https://api.github.com/repos/improbable-research/keanu/issues/55","number":55,"state":"open","locked":false,"title":"StudentT","user":{"login":"kydreth","id":709905,"avatar_url":"https://avatars2.githubusercontent.com/u/709905?v=4","gravatar_id":"","url":"https://api.github.com/users/kydreth","html_url":"https://github.com/kydreth","followers_url":"https://api.github.com/users/kydreth/followers","following_url":"https://api.github.com/users/kydreth/following{/other_user}","gists_url":"https://api.github.com/users/kydreth/gists{/gist_id}","starred_url":"https://api.github.com/users/kydreth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kydreth/subscriptions","organizations_url":"https://api.github.com/users/kydreth/orgs","repos_url":"https://api.github.com/users/kydreth/repos","events_url":"https://api.github.com/users/kydreth/events{/privacy}","received_events_url":"https://api.github.com/users/kydreth/received_events","type":"User","site_admin":false},"body":"StudentT Distribution\r\n\r\nAdding to the sampling mean/standard deviation need for a common function call. I had to use 10 million samples for accurate mean / standard deviation","created_at":"2018-05-07T16:23:22Z","updated_at":"2018-05-09T23:08:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d5265a9a5a70e022310ae7281e3a0de3e63afe6c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/improbable-research/keanu/pulls/55/commits","review_comments_url":"https://api.github.com/repos/improbable-research/keanu/pulls/55/comments","review_comment_url":"https://api.github.com/repos/improbable-research/keanu/pulls/comments{/number}","comments_url":"https://api.github.com/repos/improbable-research/keanu/issues/55/comments","statuses_url":"https://api.github.com/repos/improbable-research/keanu/statuses/21b13dda2eca3c125a218b606073bb28629c0b20","head":{"label":"kydreth:feature/studentT","ref":"feature/studentT","sha":"21b13dda2eca3c125a218b606073bb28629c0b20","user":{"login":"kydreth","id":709905,"avatar_url":"https://avatars2.githubusercontent.com/u/709905?v=4","gravatar_id":"","url":"https://api.github.com/users/kydreth","html_url":"https://github.com/kydreth","followers_url":"https://api.github.com/users/kydreth/followers","following_url":"https://api.github.com/users/kydreth/following{/other_user}","gists_url":"https://api.github.com/users/kydreth/gists{/gist_id}","starred_url":"https://api.github.com/users/kydreth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kydreth/subscriptions","organizations_url":"https://api.github.com/users/kydreth/orgs","repos_url":"https://api.github.com/users/kydreth/repos","events_url":"https://api.github.com/users/kydreth/events{/privacy}","received_events_url":"https://api.github.com/users/kydreth/received_events","type":"User","site_admin":false},"repo":{"id":129081188,"name":"keanu","full_name":"kydreth/keanu","owner":{"login":"kydreth","id":709905,"avatar_url":"https://avatars2.githubusercontent.com/u/709905?v=4","gravatar_id":"","url":"https://api.github.com/users/kydreth","html_url":"https://github.com/kydreth","followers_url":"https://api.github.com/users/kydreth/followers","following_url":"https://api.github.com/users/kydreth/following{/other_user}","gists_url":"https://api.github.com/users/kydreth/gists{/gist_id}","starred_url":"https://api.github.com/users/kydreth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kydreth/subscriptions","organizations_url":"https://api.github.com/users/kydreth/orgs","repos_url":"https://api.github.com/users/kydreth/repos","events_url":"https://api.github.com/users/kydreth/events{/privacy}","received_events_url":"https://api.github.com/users/kydreth/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kydreth/keanu","description":"A probabilistic approach from an Improbabilistic company","fork":true,"url":"https://api.github.com/repos/kydreth/keanu","forks_url":"https://api.github.com/repos/kydreth/keanu/forks","keys_url":"https://api.github.com/repos/kydreth/keanu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kydreth/keanu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kydreth/keanu/teams","hooks_url":"https://api.github.com/repos/kydreth/keanu/hooks","issue_events_url":"https://api.github.com/repos/kydreth/keanu/issues/events{/number}","events_url":"https://api.github.com/repos/kydreth/keanu/events","assignees_url":"https://api.github.com/repos/kydreth/keanu/assignees{/user}","branches_url":"https://api.github.com/repos/kydreth/keanu/branches{/branch}","tags_url":"https://api.github.com/repos/kydreth/keanu/tags","blobs_url":"https://api.github.com/repos/kydreth/keanu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kydreth/keanu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kydreth/keanu/git/refs{/sha}","trees_url":"https://api.github.com/repos/kydreth/keanu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kydreth/keanu/statuses/{sha}","languages_url":"https://api.github.com/repos/kydreth/keanu/languages","stargazers_url":"https://api.github.com/repos/kydreth/keanu/stargazers","contributors_url":"https://api.github.com/repos/kydreth/keanu/contributors","subscribers_url":"https://api.github.com/repos/kydreth/keanu/subscribers","subscription_url":"https://api.github.com/repos/kydreth/keanu/subscription","commits_url":"https://api.github.com/repos/kydreth/keanu/commits{/sha}","git_commits_url":"https://api.github.com/repos/kydreth/keanu/git/commits{/sha}","comments_url":"https://api.github.com/repos/kydreth/keanu/comments{/number}","issue_comment_url":"https://api.github.com/repos/kydreth/keanu/issues/comments{/number}","contents_url":"https://api.github.com/repos/kydreth/keanu/contents/{+path}","compare_url":"https://api.github.com/repos/kydreth/keanu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kydreth/keanu/merges","archive_url":"https://api.github.com/repos/kydreth/keanu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kydreth/keanu/downloads","issues_url":"https://api.github.com/repos/kydreth/keanu/issues{/number}","pulls_url":"https://api.github.com/repos/kydreth/keanu/pulls{/number}","milestones_url":"https://api.github.com/repos/kydreth/keanu/milestones{/number}","notifications_url":"https://api.github.com/repos/kydreth/keanu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kydreth/keanu/labels{/name}","releases_url":"https://api.github.com/repos/kydreth/keanu/releases{/id}","deployments_url":"https://api.github.com/repos/kydreth/keanu/deployments","created_at":"2018-04-11T11:10:00Z","updated_at":"2018-04-20T12:43:54Z","pushed_at":"2018-05-09T23:07:37Z","git_url":"git://github.com/kydreth/keanu.git","ssh_url":"git@github.com:kydreth/keanu.git","clone_url":"https://github.com/kydreth/keanu.git","svn_url":"https://github.com/kydreth/keanu","homepage":"","size":586,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"improbable-research:develop","ref":"develop","sha":"d81263dc9e0d0dae73e798aaa536810e5e319509","user":{"login":"improbable-research","id":37903994,"avatar_url":"https://avatars1.githubusercontent.com/u/37903994?v=4","gravatar_id":"","url":"https://api.github.com/users/improbable-research","html_url":"https://github.com/improbable-research","followers_url":"https://api.github.com/users/improbable-research/followers","following_url":"https://api.github.com/users/improbable-research/following{/other_user}","gists_url":"https://api.github.com/users/improbable-research/gists{/gist_id}","starred_url":"https://api.github.com/users/improbable-research/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/improbable-research/subscriptions","organizations_url":"https://api.github.com/users/improbable-research/orgs","repos_url":"https://api.github.com/users/improbable-research/repos","events_url":"https://api.github.com/users/improbable-research/events{/privacy}","received_events_url":"https://api.github.com/users/improbable-research/received_events","type":"Organization","site_admin":false},"repo":{"id":128393918,"name":"keanu","full_name":"improbable-research/keanu","owner":{"login":"improbable-research","id":37903994,"avatar_url":"https://avatars1.githubusercontent.com/u/37903994?v=4","gravatar_id":"","url":"https://api.github.com/users/improbable-research","html_url":"https://github.com/improbable-research","followers_url":"https://api.github.com/users/improbable-research/followers","following_url":"https://api.github.com/users/improbable-research/following{/other_user}","gists_url":"https://api.github.com/users/improbable-research/gists{/gist_id}","starred_url":"https://api.github.com/users/improbable-research/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/improbable-research/subscriptions","organizations_url":"https://api.github.com/users/improbable-research/orgs","repos_url":"https://api.github.com/users/improbable-research/repos","events_url":"https://api.github.com/users/improbable-research/events{/privacy}","received_events_url":"https://api.github.com/users/improbable-research/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/improbable-research/keanu","description":"A probabilistic approach from an Improbabilistic company","fork":false,"url":"https://api.github.com/repos/improbable-research/keanu","forks_url":"https://api.github.com/repos/improbable-research/keanu/forks","keys_url":"https://api.github.com/repos/improbable-research/keanu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/improbable-research/keanu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/improbable-research/keanu/teams","hooks_url":"https://api.github.com/repos/improbable-research/keanu/hooks","issue_events_url":"https://api.github.com/repos/improbable-research/keanu/issues/events{/number}","events_url":"https://api.github.com/repos/improbable-research/keanu/events","assignees_url":"https://api.github.com/repos/improbable-research/keanu/assignees{/user}","branches_url":"https://api.github.com/repos/improbable-research/keanu/branches{/branch}","tags_url":"https://api.github.com/repos/improbable-research/keanu/tags","blobs_url":"https://api.github.com/repos/improbable-research/keanu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/improbable-research/keanu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/improbable-research/keanu/git/refs{/sha}","trees_url":"https://api.github.com/repos/improbable-research/keanu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/improbable-research/keanu/statuses/{sha}","languages_url":"https://api.github.com/repos/improbable-research/keanu/languages","stargazers_url":"https://api.github.com/repos/improbable-research/keanu/stargazers","contributors_url":"https://api.github.com/repos/improbable-research/keanu/contributors","subscribers_url":"https://api.github.com/repos/improbable-research/keanu/subscribers","subscription_url":"https://api.github.com/repos/improbable-research/keanu/subscription","commits_url":"https://api.github.com/repos/improbable-research/keanu/commits{/sha}","git_commits_url":"https://api.github.com/repos/improbable-research/keanu/git/commits{/sha}","comments_url":"https://api.github.com/repos/improbable-research/keanu/comments{/number}","issue_comment_url":"https://api.github.com/repos/improbable-research/keanu/issues/comments{/number}","contents_url":"https://api.github.com/repos/improbable-research/keanu/contents/{+path}","compare_url":"https://api.github.com/repos/improbable-research/keanu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/improbable-research/keanu/merges","archive_url":"https://api.github.com/repos/improbable-research/keanu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/improbable-research/keanu/downloads","issues_url":"https://api.github.com/repos/improbable-research/keanu/issues{/number}","pulls_url":"https://api.github.com/repos/improbable-research/keanu/pulls{/number}","milestones_url":"https://api.github.com/repos/improbable-research/keanu/milestones{/number}","notifications_url":"https://api.github.com/repos/improbable-research/keanu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/improbable-research/keanu/labels{/name}","releases_url":"https://api.github.com/repos/improbable-research/keanu/releases{/id}","deployments_url":"https://api.github.com/repos/improbable-research/keanu/deployments","created_at":"2018-04-06T12:48:36Z","updated_at":"2018-05-09T17:03:09Z","pushed_at":"2018-05-09T23:07:38Z","git_url":"git://github.com/improbable-research/keanu.git","ssh_url":"git@github.com:improbable-research/keanu.git","clone_url":"https://github.com/improbable-research/keanu.git","svn_url":"https://github.com/improbable-research/keanu","homepage":"","size":875,"stargazers_count":16,"watchers_count":16,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":9,"open_issues":3,"watchers":16,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/improbable-research/keanu/pulls/55"},"html":{"href":"https://github.com/improbable-research/keanu/pull/55"},"issue":{"href":"https://api.github.com/repos/improbable-research/keanu/issues/55"},"comments":{"href":"https://api.github.com/repos/improbable-research/keanu/issues/55/comments"},"review_comments":{"href":"https://api.github.com/repos/improbable-research/keanu/pulls/55/comments"},"review_comment":{"href":"https://api.github.com/repos/improbable-research/keanu/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/improbable-research/keanu/pulls/55/commits"},"statuses":{"href":"https://api.github.com/repos/improbable-research/keanu/statuses/21b13dda2eca3c125a218b606073bb28629c0b20"}},"author_association":"NONE"}}
{"actor":{"display_login":"kydreth"}}