-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Saving and loading trained classifiers #43
Comments
Please also see Issue #46 which is related to this. |
Dear @anayurg, May I suggest just loading the whole TM directly? saving:
loading:
|
I've also corrected Thanks for finding this :) Reopen if this does not satisfy your requirements. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey there,
I'm playing around with the Tsetlin classifier and I'm having some trouble figuring out how to save a trained classifier so that it can be loaded later. Do you have a go-to method that you can recommend? I couldn't do it with pickle and joblib. So I tried pickling the clause banks and weight banks separately but that seems to work only if I pickle them before the classifier is used for any prediction which in my case is not an option.
I'm attaching a minimal example just in case but I imagine there must be another way to do it that I haven't figured out.
saving.py
loading.py
The error that I get when I first predict something and then save the clause and weight banks is the following:
Thanks for the help!
The text was updated successfully, but these errors were encountered: