PredictionResult

Note

This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.

class PredictionResult(predictions: Series, probabilities: DataFrame | None, manifest: RunManifest)[source]

Bases: object

Outcome of predict_model(), entirely in memory.

predictions

The terminal model’s output per row (class labels for a classifier, values for a regressor, risk scores for a survival model), indexed by the table’s identifier columns.

Type:

pandas.core.series.Series

probabilities

Per-class probability frame when the terminal model is a classifier; None for regressors and survival models, which have no class-probability output.

Type:

pandas.core.frame.DataFrame | None

manifest

Record of what ran: the fitted pipeline’s composed spec, the provenance chain, and every row’s outcome.

Type:

habit.contracts.manifest.RunManifest

__init__(predictions: Series, probabilities: DataFrame | None, manifest: RunManifest) → None