dump module¶
The dump module defines the dump() function.
-
surprise.dump.dump(file_name, predictions, trainset=None, algo=None)[source]¶ Dump a list of
predictionsfor future analysis, using Pickle.If needed, the
trainsetobject and the algorithm can also be dumped. What is dumped is a dictionnary with keys'predictions,'trainset', and'algo'.The dumped algorithm won’t be a proper
algorithmobject but simply a dictionnary with the algorithm attributes as keys-values (technically, thealgo.__dict__attribute).See User Guide for usage.
Parameters: - file_name (str) – The name (with full path) specifying where to dump the predictions.
- predictions (list of
Prediction) – The predictions to dump. - trainset (
Trainset, optional) – The trainset to dump. - algo (
Algorithm, optional) – algorithm to dump.