I am doing some machine learning in Golang. I am now hitting a wall, my trained classifier takes almost half a minute to train and want to save that instance of the classifier so that I do not have to train in from scratch every time. How should someone go about doing this is Golang? FYI my classifier is a struct
When I do this type of stuff with python, it's very easy with pickle. Is there an equivalent?
Try gob or encoding/json to marshal your objects. After that, you can store the string to a file.
Here is an example to use json: