cleverly.ValidationReport#
- class cleverly.ValidationReport(items: tuple[AssessmentItem, ...], backend: str | None = None)[source]#
Collect results from the inexpensive validation battery.
- Parameters:
- items
tupleofAssessmentItem Validation checks and their statuses.
- backend
strorNone Dataframe backend used by
to_frame()whendatais omitted.
- items
See also
DiagnosticReportThe combined run, which may retarget or refit.
cleverly.estimators.TMLEResultCarries the artifacts this battery reads.
cleverly.validation.score_checkOne of the checks the battery runs.
Notes
The default battery reads stored artifacts. It does not refit nuisance models.
Examples
>>> from sklearn.linear_model import LinearRegression, LogisticRegression >>> from cleverly import ATE, CausalStudy, PointTreatment >>> from cleverly.datasets import make_linear_ate >>> frame, _ = make_linear_ate(n=200, seed=0) >>> study = CausalStudy( ... frame, ... design=PointTreatment( ... outcome="Y", treatment="A", adjustment=("W1", "W2", "W3", "W4") ... ), ... ) >>> result = study.identify(ATE()).estimate( ... outcome_learner=LinearRegression(), ... treatment_learner=LogisticRegression(max_iter=1000), ... cross_fit=False, ... random_state=0, ... ) >>> report = result.validate() >>> len(report.items) > 0 True
Methods#
Attributes#
- ValidationReport.passed#
Return whether every required check passed.