{"action":"created","issue":{"url":"https://api.github.com/repos/markovmodel/PyEMMA/issues/1192","repository_url":"https://api.github.com/repos/markovmodel/PyEMMA","labels_url":"https://api.github.com/repos/markovmodel/PyEMMA/issues/1192/labels{/name}","comments_url":"https://api.github.com/repos/markovmodel/PyEMMA/issues/1192/comments","events_url":"https://api.github.com/repos/markovmodel/PyEMMA/issues/1192/events","html_url":"https://github.com/markovmodel/PyEMMA/issues/1192","id":278493176,"number":1192,"title":"score_k overwritten with score function - even with score_k = None","user":{"login":"RobertArbon","id":7603520,"avatar_url":"https://avatars0.githubusercontent.com/u/7603520?v=4","gravatar_id":"","url":"https://api.github.com/users/RobertArbon","html_url":"https://github.com/RobertArbon","followers_url":"https://api.github.com/users/RobertArbon/followers","following_url":"https://api.github.com/users/RobertArbon/following{/other_user}","gists_url":"https://api.github.com/users/RobertArbon/gists{/gist_id}","starred_url":"https://api.github.com/users/RobertArbon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobertArbon/subscriptions","organizations_url":"https://api.github.com/users/RobertArbon/orgs","repos_url":"https://api.github.com/users/RobertArbon/repos","events_url":"https://api.github.com/users/RobertArbon/events{/privacy}","received_events_url":"https://api.github.com/users/RobertArbon/received_events","type":"User","site_admin":false},"labels":[{"id":135514610,"url":"https://api.github.com/repos/markovmodel/PyEMMA/labels/bug","name":"bug","color":"fc2929","default":true},{"id":637661533,"url":"https://api.github.com/repos/markovmodel/PyEMMA/labels/msm","name":"msm","color":"c2e0c6","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-12-01T15:03:28Z","updated_at":"2017-12-02T14:03:31Z","closed_at":"2017-12-02T14:03:31Z","author_association":"CONTRIBUTOR","body":"As per the title:\r\n\r\n```\r\ndata = np.random.choice(np.arange(5), 50)\r\nmodel =  MaximumLikelihoodMSM(lag=5, score_method='vamp2', score_k=2)\r\nmodel.fit(data)\r\nprint('score_k = {}'.format(model.score_k))\r\nmodel.score(data)\r\nprint('score_k = {}'.format(model.score_k))\r\n```\r\n\r\ngives: \r\n\r\n```\r\nscore_k = 2\r\nscore_k = 5\r\n```\r\n\r\nHere's the problem in `maximum_likelihood_msm.py`\r\n\r\n```\r\ndef score(self, dtrajs, score_method=None, score_k=None):\r\n...\r\n        # reset estimator data if needed\r\n        if score_method is not None:\r\n            self.score_method = score_method\r\n        if self.score_k is not None:\r\n            self.score_k = score_k\r\n```\r\nshould be: \r\n\r\n```\r\ndef score(self, dtrajs, score_method=None, score_k=None):\r\n...\r\n        # reset estimator data if needed\r\n        if score_method is not None:\r\n            self.score_method = score_method\r\n        if score_k is not None:\r\n            self.score_k = score_k\r\n```\r\n\r\nAgain, I've corrected this in my own feature branch. Do you want a PR with test case?\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/markovmodel/PyEMMA/issues/comments/348694142","html_url":"https://github.com/markovmodel/PyEMMA/issues/1192#issuecomment-348694142","issue_url":"https://api.github.com/repos/markovmodel/PyEMMA/issues/1192","id":348694142,"user":{"login":"marscher","id":170287,"avatar_url":"https://avatars0.githubusercontent.com/u/170287?v=4","gravatar_id":"","url":"https://api.github.com/users/marscher","html_url":"https://github.com/marscher","followers_url":"https://api.github.com/users/marscher/followers","following_url":"https://api.github.com/users/marscher/following{/other_user}","gists_url":"https://api.github.com/users/marscher/gists{/gist_id}","starred_url":"https://api.github.com/users/marscher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marscher/subscriptions","organizations_url":"https://api.github.com/users/marscher/orgs","repos_url":"https://api.github.com/users/marscher/repos","events_url":"https://api.github.com/users/marscher/events{/privacy}","received_events_url":"https://api.github.com/users/marscher/received_events","type":"User","site_admin":false},"created_at":"2017-12-02T14:03:31Z","updated_at":"2017-12-02T14:03:31Z","author_association":"OWNER","body":"fixed by #1194 "}}
{"actor":{"display_login":"marscher"}}