cleverly.learners.DensityDiagnostics#
- class cleverly.learners.DensityDiagnostics(n_bins: int, edges: ndarray[tuple[Any, ...], dtype[float64]], min_density: float, integrated: tuple[float, float], learner: tuple[SuperLearnerDiagnostics, ...] = ())[source]#
What the density fit looked like, for the report and for the positivity check.
- Parameters:
- n_bins
int Bins actually used, after duplicate quantiles were dropped.
- edges
ndarray The bin boundaries.
- min_density
float Smallest \(\hat g(A_i \mid W_i)\) over the sample. The denominator of every clever covariate, so the number a positivity problem shows up in first.
- integrated
tupleoffloat (min, max)of \(\int \hat g(a \mid W_i)\,da\) over rows. Both should be one to machine precision; anything else is a bug in the hazard product, not a modelling matter.- learner
tupleofSuperLearnerDiagnostics Per-fold Super Learner diagnostics, empty when the learner is not an ensemble.
- n_bins
Methods#
Attributes#
- DensityDiagnostics.learner: tuple[SuperLearnerDiagnostics, ...] = ()#