{"action":"created","issue":{"url":"https://api.github.com/repos/IDSIA/brainstorm/issues/92","labels_url":"https://api.github.com/repos/IDSIA/brainstorm/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/IDSIA/brainstorm/issues/92/comments","events_url":"https://api.github.com/repos/IDSIA/brainstorm/issues/92/events","html_url":"https://github.com/IDSIA/brainstorm/pull/92","id":115747614,"number":92,"title":"Implement StopAfterThresholdReached hook","user":{"login":"iver56","id":1470603,"avatar_url":"https://avatars.githubusercontent.com/u/1470603?v=3","gravatar_id":"","url":"https://api.github.com/users/iver56","html_url":"https://github.com/iver56","followers_url":"https://api.github.com/users/iver56/followers","following_url":"https://api.github.com/users/iver56/following{/other_user}","gists_url":"https://api.github.com/users/iver56/gists{/gist_id}","starred_url":"https://api.github.com/users/iver56/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iver56/subscriptions","organizations_url":"https://api.github.com/users/iver56/orgs","repos_url":"https://api.github.com/users/iver56/repos","events_url":"https://api.github.com/users/iver56/events{/privacy}","received_events_url":"https://api.github.com/users/iver56/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-08T17:37:04Z","updated_at":"2015-11-10T01:52:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/IDSIA/brainstorm/pulls/92","html_url":"https://github.com/IDSIA/brainstorm/pull/92","diff_url":"https://github.com/IDSIA/brainstorm/pull/92.diff","patch_url":"https://github.com/IDSIA/brainstorm/pull/92.patch"},"body":"This hook stops the training when a certain accuracy, for example 97 %, is reached. Since it might be useful for others, I thought I'd share it.\r\n\r\nExample usage:\r\n\r\n```python\r\ntrainer.add_hook(bs.hooks.StopAfterThresholdReached('validation.Accuracy',\r\n                                                    threshold=0.97,\r\n                                                    criterion='at_least'))\r\n```\r\n\r\nThis needs a test and some documentation. If there would be documentation and tests for the existing `EarlyStopper`, then I could write similar docs and tests for this hook."},"comment":{"url":"https://api.github.com/repos/IDSIA/brainstorm/issues/comments/155257678","html_url":"https://github.com/IDSIA/brainstorm/pull/92#issuecomment-155257678","issue_url":"https://api.github.com/repos/IDSIA/brainstorm/issues/92","id":155257678,"user":{"login":"landscape-bot","id":10010231,"avatar_url":"https://avatars.githubusercontent.com/u/10010231?v=3","gravatar_id":"","url":"https://api.github.com/users/landscape-bot","html_url":"https://github.com/landscape-bot","followers_url":"https://api.github.com/users/landscape-bot/followers","following_url":"https://api.github.com/users/landscape-bot/following{/other_user}","gists_url":"https://api.github.com/users/landscape-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/landscape-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/landscape-bot/subscriptions","organizations_url":"https://api.github.com/users/landscape-bot/orgs","repos_url":"https://api.github.com/users/landscape-bot/repos","events_url":"https://api.github.com/users/landscape-bot/events{/privacy}","received_events_url":"https://api.github.com/users/landscape-bot/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T01:52:09Z","updated_at":"2015-11-10T01:52:09Z","body":"[![Code Health](https://landscape.io/badge/250848/landscape.svg?style=flat)](https://landscape.io/diff/237517)\nRepository health decreased by 0.02% when pulling **[286a20b](https://github.com/iver56/brainstorm/commit/286a20bfeb48b02fa40fad24431fa46cbc5b63f0) on iver56:threshold-hook** into **[8ab60fa](https://github.com/IDSIA/brainstorm/commit/8ab60faad6369d5c998659af842f380b24dd02dd) on IDSIA:master**.\n\n * [1 new problem was found](https://landscape.io/diff/237517) (including 0 errors and 0 code smells).\n * No problems were fixed."}}