Is there a way to save a trained Splink model (much like saving a trained Keras neural network)? #1282
-
Hello is there a way to save a trained Splink model with the weights fully trained? I.e. we can reload it for later use and NOT feed it training data in the future, but instead just use the saved model for inference? I know there's the function save_settings_to_json() but that just looks like it saves the settings file in json format. (i.e. you'd need to load the settings and retrain it on new data when reusing it) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
The save_settings_to_json() function actually does save the trained model weights. Now that you mention it, I can see why the method name is confusing - it doesn't just save the settings it also saves the trained weights. The following example shows how to load them back in: I believe there may also have been a recent change where you can also pass the path to the settings JSON when you instantiate the linker |
Beta Was this translation helpful? Give feedback.
The save_settings_to_json() function actually does save the trained model weights. Now that you mention it, I can see why the method name is confusing - it doesn't just save the settings it also saves the trained weights.
The following example shows how to load them back in:
https://moj-analytical-services.github.io/splink/demos/tutorials/05_Predicting_results.htm
I believe there may also have been a recent change where you can also pass the path to the settings JSON when you instantiate the linker