{"action":"created","issue":{"url":"https://api.github.com/repos/tedgueniche/IPredict/issues/5","repository_url":"https://api.github.com/repos/tedgueniche/IPredict","labels_url":"https://api.github.com/repos/tedgueniche/IPredict/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/tedgueniche/IPredict/issues/5/comments","events_url":"https://api.github.com/repos/tedgueniche/IPredict/issues/5/events","html_url":"https://github.com/tedgueniche/IPredict/issues/5","id":164887348,"number":5,"title":"Ability to save a trained model as a .model file?","user":{"login":"VeenitShah","id":1811809,"avatar_url":"https://avatars.githubusercontent.com/u/1811809?v=3","gravatar_id":"","url":"https://api.github.com/users/VeenitShah","html_url":"https://github.com/VeenitShah","followers_url":"https://api.github.com/users/VeenitShah/followers","following_url":"https://api.github.com/users/VeenitShah/following{/other_user}","gists_url":"https://api.github.com/users/VeenitShah/gists{/gist_id}","starred_url":"https://api.github.com/users/VeenitShah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VeenitShah/subscriptions","organizations_url":"https://api.github.com/users/VeenitShah/orgs","repos_url":"https://api.github.com/users/VeenitShah/repos","events_url":"https://api.github.com/users/VeenitShah/events{/privacy}","received_events_url":"https://api.github.com/users/VeenitShah/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-11T17:09:21Z","updated_at":"2016-07-13T16:00:54Z","closed_at":null,"body":"Hi,\r\n\r\nI would like to know if it's possible to save a trained model as a `.model` file (or any such extension). I have really long sequences in my training set and every time I want to make a prediction, I do not want to retrain it just to make a single prediction.\r\n\r\nIf I can save the trained model, I would just have to read the trained model and make a prediction which would be really quick. \r\n\r\nAre there any other alternatives to this approach? Looking forward to your inputs. \r\n\r\n "},"comment":{"url":"https://api.github.com/repos/tedgueniche/IPredict/issues/comments/232402145","html_url":"https://github.com/tedgueniche/IPredict/issues/5#issuecomment-232402145","issue_url":"https://api.github.com/repos/tedgueniche/IPredict/issues/5","id":232402145,"user":{"login":"tedgueniche","id":791230,"avatar_url":"https://avatars.githubusercontent.com/u/791230?v=3","gravatar_id":"","url":"https://api.github.com/users/tedgueniche","html_url":"https://github.com/tedgueniche","followers_url":"https://api.github.com/users/tedgueniche/followers","following_url":"https://api.github.com/users/tedgueniche/following{/other_user}","gists_url":"https://api.github.com/users/tedgueniche/gists{/gist_id}","starred_url":"https://api.github.com/users/tedgueniche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tedgueniche/subscriptions","organizations_url":"https://api.github.com/users/tedgueniche/orgs","repos_url":"https://api.github.com/users/tedgueniche/repos","events_url":"https://api.github.com/users/tedgueniche/events{/privacy}","received_events_url":"https://api.github.com/users/tedgueniche/received_events","type":"User","site_admin":false},"created_at":"2016-07-13T16:00:54Z","updated_at":"2016-07-13T16:00:54Z","body":"Hi, \r\nLike PhilFV suggested, java serialization should work in your case. Have a look in the [SerializeController.java](https://github.com/tedgueniche/IPredict/blob/master/src/ca/ipredict/controllers/SerializePredictor.java). You should be able to train a predictor and save it to a file. Then in jpype, you should be able to call a method like SerializePredictor.load(...) to load your model back."}}
{"actor":{"display_login":"tedgueniche"}}