ParetoNBDModel.save#

ParetoNBDModel.save(fname)#

Save the model’s inference data to a file.

Parameters:
fnamestr

The name and path of the file to save the inference data with model parameters.

Returns:
None
Raises:
RuntimeError

If the model hasn’t been fit yet (no inference data available).

Examples

This method is meant to be overridden and implemented by subclasses. It should not be called directly on the base abstract class or its instances.

>>> class MyModel(ModelBuilder):
>>>     def __init__(self):
>>>         super().__init__()
>>> model = MyModel()
>>> model.fit(X,y)
>>> model.save('model_results.nc')  # This will call the overridden method in MyModel