cleverly.learners.SuperLearnerDiagnostics#
- class cleverly.learners.SuperLearnerDiagnostics(names: tuple[str, ...], cv_risk: ndarray[tuple[Any, ...], dtype[float64]], weights: ndarray[tuple[Any, ...], dtype[float64]], best: str, ensemble_cv_risk: float, loss: str, failed: tuple[str, ...] = ())[source]#
What the ensemble learned, for reporting and validation.
- Parameters:
- names
tupleofstr Candidate names, in the order the weights refer to.
- cv_risk
ndarray Cross-validated risk per candidate (mean squared error for a regression task, negative log-likelihood for a classification task).
- weights
ndarray Convex ensemble weights.
- best
str Name of the lowest-risk candidate – what the discrete Super Learner would have selected.
- ensemble_cv_risk
float Cross-validated risk of the weighted ensemble itself. Comparing it with
min(cv_risk)shows whether stacking bought anything.- loss
str Name of the loss the risks above were scored under.
- failed
tupleofstr Candidates dropped because fitting raised.
- names