paddlets.utils.utils
- check_model_fitted(model: Trainable, msg: Optional[str] = None)[source]
check if model has fitted, Raise Exception if not fitted
- Parameters
model (Trainable) – model instance.
msg (str) – str, default=None The default error message is, “This %(name)s instance is not fitted yet. Call ‘fit’ with appropriate arguments before using this estimator.” For custom messages if “%(name)s” is present in the message string, it is substituted for the estimator name. Eg. : “Estimator, %(name)s, must be fitted before sparsifying”.
- Returns
None
- Raises
ValueError –