cleverly.Provenance#
- class cleverly.Provenance(cleverly_version: str, python_version: str, platform: str, created_utc: str, n: int, n_covariates: int, n_clusters: int | None, data_fingerprint: str, fold_fingerprint: str, random_state: int | None = None, run_id: str | None = None, package_versions: dict[str, str] = <factory>, protocol_fingerprint: str | None = None)[source]#
Enough to tell whether two results came from the same place.
- Parameters:
- cleverly_version
str Version of this package that produced the fit.
- python_version
str Interpreter version.
- platform
str Operating system and machine the fit ran on.
- created_utc
str ISO timestamp of the fit.
- n
int Number of observations.
- n_covariates
int Number of adjustment covariates.
- n_clusters
intorNone Independent clusters, or
Nonefor independent rows.- data_fingerprint
str Digest of the outcome, treatment and covariates. Equal fingerprints mean equal inputs; different ones mean the data moved, which is usually the answer when two runs disagree.
- fold_fingerprint
str Digest of the realised fold assignment. Recorded separately from
random_statebecause folds are not recoverable from a seed alone – they also depend on row order, on the stratification variable, and on the scikit-learn version that generated them.Under
repeats=Rthis covers every draw, in fit order. A repeated fit is reproducible only if allRsplits are, so a digest of one of them would be stating a guarantee the fit does not make.- random_state
intorNone Seed the fit was given.
- run_id
strorNone Identifier the caller supplied.
- package_versions
dictofstrtostr Versions of the learner libraries used.
- protocol_fingerprint
strorNone Digest of the causal study protocol.
Nonemeans the fit carried no record.
- cleverly_version
Methods#
- classmethod Provenance.from_dict(payload: dict[str, Any]) Provenance[source]#
Construct an instance from a serialized mapping.
- Parameters:
- Returns:
ProvenanceThe record that mapping describes.