{"action":"created","issue":{"url":"https://api.github.com/repos/topsframework/tops-refactoring/issues/4","labels_url":"https://api.github.com/repos/topsframework/tops-refactoring/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/topsframework/tops-refactoring/issues/4/comments","events_url":"https://api.github.com/repos/topsframework/tops-refactoring/issues/4/events","html_url":"https://github.com/topsframework/tops-refactoring/issues/4","id":70954217,"number":4,"title":"Create Generator","user":{"login":"renatocf","id":1621752,"avatar_url":"https://avatars.githubusercontent.com/u/1621752?v=3","gravatar_id":"","url":"https://api.github.com/users/renatocf","html_url":"https://github.com/renatocf","followers_url":"https://api.github.com/users/renatocf/followers","following_url":"https://api.github.com/users/renatocf/following{/other_user}","gists_url":"https://api.github.com/users/renatocf/gists{/gist_id}","starred_url":"https://api.github.com/users/renatocf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renatocf/subscriptions","organizations_url":"https://api.github.com/users/renatocf/orgs","repos_url":"https://api.github.com/users/renatocf/repos","events_url":"https://api.github.com/users/renatocf/events{/privacy}","received_events_url":"https://api.github.com/users/renatocf/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/topsframework/tops-refactoring/labels/Discussion","name":"Discussion","color":"fbca04"},{"url":"https://api.github.com/repos/topsframework/tops-refactoring/labels/Refactoring","name":"Refactoring","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-04-25T19:07:05Z","updated_at":"2015-05-11T21:34:16Z","closed_at":null,"body":"Hey @igorbonadio,\r\n\r\nI was thinking about ToPS' design and our ideas of having an `Evaluator` (storage of data and interface for inference methods) and a `Trainer` (builder to create models bit by bit). In this way, methods `choose` still would be accessed by model classes. So, what do you think about creating a class `Generator`, which chooses a new sequence for a given model? I don't think it's as useful as evaluators and trainers, but it would be, at least, symmetric in all uses.\r\n\r\nA short example with this intermediate classes:\r\n```c++\r\nauto hmm = HiddenMarkovModel::trainer(training_set)->trainML(/* training arguments */);\r\n\r\nauto labeling = hmm->decodableEvaluator(sequence)->labeling(Labeling::bestPath);\r\n\r\nauto newSequence = hmm->generator()->choose(size, phase);\r\n```\r\n\r\nWhat do you think?"},"comment":{"url":"https://api.github.com/repos/topsframework/tops-refactoring/issues/comments/101054212","html_url":"https://github.com/topsframework/tops-refactoring/issues/4#issuecomment-101054212","issue_url":"https://api.github.com/repos/topsframework/tops-refactoring/issues/4","id":101054212,"user":{"login":"igorbonadio","id":28595,"avatar_url":"https://avatars.githubusercontent.com/u/28595?v=3","gravatar_id":"","url":"https://api.github.com/users/igorbonadio","html_url":"https://github.com/igorbonadio","followers_url":"https://api.github.com/users/igorbonadio/followers","following_url":"https://api.github.com/users/igorbonadio/following{/other_user}","gists_url":"https://api.github.com/users/igorbonadio/gists{/gist_id}","starred_url":"https://api.github.com/users/igorbonadio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igorbonadio/subscriptions","organizations_url":"https://api.github.com/users/igorbonadio/orgs","repos_url":"https://api.github.com/users/igorbonadio/repos","events_url":"https://api.github.com/users/igorbonadio/events{/privacy}","received_events_url":"https://api.github.com/users/igorbonadio/received_events","type":"User","site_admin":false},"created_at":"2015-05-11T21:34:16Z","updated_at":"2015-05-11T21:34:16Z","body":"1) pair\r\n\r\n```c++\r\nvirtual std::pair<Sequence, Sequence> choose(unsigned int size,\r\n                                             unsigned int phase = 0) const;\r\n```\r\n\r\nIn fact, `x` and `y` are an observation and a label sequence. But I think pair is a generic and good solution.\r\n\r\n2) I think a good name could be `chooseJointSequence`. What do you think?"}}