clone_model#
- causalpy.checks.base.clone_model(model)[source]#
Create a fresh, unfitted copy of a model.
PyMC models cannot survive
copy.deepcopy(the class identity is lost), so we use their_clone()method instead. For all other model types we fall back tocopy.deepcopy.- Parameters:
model (
Any) – The model instance to clone. PyMC models must expose a_clone()method; everything else falls back tocopy.deepcopy().- Returns:
A fresh, unfitted copy of
model.- Return type:
Any