As an experiment, I want to use mljs/naive-bayes classifier in my Firefox add-on. Before the classifier can be useful, it has to be trained first. In my case, I'll be training it using an array of 20000 entries.
The entries come from a text file in the add-on's directory. I already have working code that reads the text file and trains the classifier using the data.
As much as possible though, training should not occur on the user side for performance reasons. How do I make it such that the add-on comes pre-packaged with a trained classifier?
I understand that mljs/naive-bayes has an export()
function which returns the classifier as a Javascript object. I have no idea what to do from there, though.