{"action":"created","issue":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7992","repository_url":"https://api.github.com/repos/scikit-learn/scikit-learn","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7992/labels{/name}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7992/comments","events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7992/events","html_url":"https://github.com/scikit-learn/scikit-learn/pull/7992","id":193801186,"number":7992,"title":"[WIP] Fix perplexity method by adding _unnormalized_transform method, Issue #7954","user":{"login":"garyForeman","id":7796694,"avatar_url":"https://avatars.githubusercontent.com/u/7796694?v=3","gravatar_id":"","url":"https://api.github.com/users/garyForeman","html_url":"https://github.com/garyForeman","followers_url":"https://api.github.com/users/garyForeman/followers","following_url":"https://api.github.com/users/garyForeman/following{/other_user}","gists_url":"https://api.github.com/users/garyForeman/gists{/gist_id}","starred_url":"https://api.github.com/users/garyForeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garyForeman/subscriptions","organizations_url":"https://api.github.com/users/garyForeman/orgs","repos_url":"https://api.github.com/users/garyForeman/repos","events_url":"https://api.github.com/users/garyForeman/events{/privacy}","received_events_url":"https://api.github.com/users/garyForeman/received_events","type":"User","site_admin":false},"labels":[{"id":12995755,"url":"https://api.github.com/repos/scikit-learn/scikit-learn/labels/Bug","name":"Bug","color":"e10c02","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/milestones/21","html_url":"https://github.com/scikit-learn/scikit-learn/milestone/21","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/milestones/21/labels","id":1970916,"number":21,"title":"0.19","description":"","creator":{"login":"amueller","id":449558,"avatar_url":"https://avatars.githubusercontent.com/u/449558?v=3","gravatar_id":"","url":"https://api.github.com/users/amueller","html_url":"https://github.com/amueller","followers_url":"https://api.github.com/users/amueller/followers","following_url":"https://api.github.com/users/amueller/following{/other_user}","gists_url":"https://api.github.com/users/amueller/gists{/gist_id}","starred_url":"https://api.github.com/users/amueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amueller/subscriptions","organizations_url":"https://api.github.com/users/amueller/orgs","repos_url":"https://api.github.com/users/amueller/repos","events_url":"https://api.github.com/users/amueller/events{/privacy}","received_events_url":"https://api.github.com/users/amueller/received_events","type":"User","site_admin":false},"open_issues":185,"closed_issues":44,"state":"open","created_at":"2016-08-29T22:34:33Z","updated_at":"2016-12-07T22:33:07Z","due_on":"2017-04-01T00:00:00Z","closed_at":null},"comments":9,"created_at":"2016-12-06T15:26:44Z","updated_at":"2016-12-09T13:58:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7992","html_url":"https://github.com/scikit-learn/scikit-learn/pull/7992","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/7992.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/7992.patch"},"body":"<!--\r\nThanks for contributing a pull request! Please ensure you have taken a look at\r\nthe contribution guidelines: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md#Contributing-Pull-Requests\r\n-->\r\n#### Reference Issue\r\n<!-- Example: Fixes #1234 -->\r\nFixes #7954 \r\n\r\n#### What does this implement/fix? Explain your changes.\r\nThis fixes the broken perplexity method of the LatentDirichletAllocation class. This method was broken in the 0.18 release when the default behavior of the transform method switched to returning normalized document topic distributions. However, the perplexity calculation uses likelihoods rather than probabilities.\r\n\r\nTo fix the issue, I have added an optional argument, normalize, to the transform method. The default is set to True such that if the argument is not specified, the behavior of the transform method remains unchanged from the version 0.18 release. When the transform method is called from the perplexity method, normalize=False is passed so that the likelihoods rather than the probabilities are returned.\r\n\r\n#### Any other comments?\r\nWhile I believe the fix proposed here is the most elegant, I would understand if we didn't want to add an additional argument to the transform method. If this is the case, I am happy to pivot the implementation to use a \"private\" class attribute that stores the normalization information.\r\n\r\n<!--\r\nPlease be aware that we are a loose team of volunteers so patience is\r\nnecessary; assistance handling other issues is very welcome. We value\r\nall user contributions, no matter how minor they are. If we are slow to\r\nreview, either the pull request needs some benchmarking, tinkering,\r\nconvincing, etc. or more likely the reviewers are simply busy. In either\r\ncase, we ask for your understanding during the review process.\r\nFor more information, see our FAQ on this topic:\r\nhttp://scikit-learn.org/dev/faq.html#why-is-my-pull-request-not-getting-any-attention.\r\n\r\nThanks for contributing!\r\n-->\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/comments/266019787","html_url":"https://github.com/scikit-learn/scikit-learn/pull/7992#issuecomment-266019787","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7992","id":266019787,"user":{"login":"garyForeman","id":7796694,"avatar_url":"https://avatars.githubusercontent.com/u/7796694?v=3","gravatar_id":"","url":"https://api.github.com/users/garyForeman","html_url":"https://github.com/garyForeman","followers_url":"https://api.github.com/users/garyForeman/followers","following_url":"https://api.github.com/users/garyForeman/following{/other_user}","gists_url":"https://api.github.com/users/garyForeman/gists{/gist_id}","starred_url":"https://api.github.com/users/garyForeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garyForeman/subscriptions","organizations_url":"https://api.github.com/users/garyForeman/orgs","repos_url":"https://api.github.com/users/garyForeman/repos","events_url":"https://api.github.com/users/garyForeman/events{/privacy}","received_events_url":"https://api.github.com/users/garyForeman/received_events","type":"User","site_admin":false},"created_at":"2016-12-09T13:58:17Z","updated_at":"2016-12-09T13:58:17Z","body":"Sounds good, I'll get to it in the next day or so."}}
{"actor":{"display_login":"garyForeman"}}