Qboost question
I have been using the Qboost demo template to solve some binary classification problems. I have a 2 questions:
1) Is there any way to check which items in my test dataset are being classified correctly and which aren't? It merely gives me a percent accuracy, I've been unsuccessful at my attempts to extract any lower-level data.
2) Is there any way to "save" the model that is created by the training dataset in order to readily classify future items that aren't currently in my testing dataset? That is, do I need to feed in the same training data every time I want to re-run the machine learning algorithm to classify a new point?
Comments
Hello,
This will all depend on the approach you take.
The code in demo would need to be modified.
There are several models in the demo file.
For QBoost in particular, the model is currently named clf3.
I believe the model can be saved by using Python's pickle module it:
https://docs.python.org/3/library/pickle.html
You would just need to dump() it and then load() it.
Here's an example:
As you can see, the model is inside of one of the function calls, so you would have to rewrite a bunch of this code and do some error handling around checking whether the file exists, etc.
This seems like the most simple way of saving a model.
There might be a way to just save the weights, etc, but this seemed like the easiest to start with.
For the other question, we should look at these two lines:
Please sign in to leave a comment.