SearchResult
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 SearchResult(spec: MLSpec, best_params: Mapping[str, Any], best_score: float, objective: str, trials: Tuple[Mapping[str, Any], ...], manifest: RunManifest, model: ModelResult | None = None)[source]
Bases:
objectOutcome of
search_hyperparameters(), entirely in memory.- spec
The TUNED modelling definition – the input spec with every searched parameter replaced by its winning value, in the same field layout it was declared in. This is the publishable artefact of a search: it fingerprints, serialises back to YAML and re-runs, so the tuning step never breaks the provenance chain the way a fitted-object-only result would.
- Type:
- best_params
Winning parameters, keyed exactly as the grid was (
"model__component__C"), so a caller can compare them against what it asked for without re-deriving the key syntax.- Type:
Mapping[str, Any]
- best_score
Cross-validated score of the winning candidate, in the objective metric’s OWN direction (higher is better for
auc, lower formae) – never scikit-learn’s internally negated form, which would silently flip the sign of a reported number.- Type:
- trials
One record per evaluated candidate:
params,mean_score,std_score(across the search folds) andrank. This is the tuning table a methods section reports.- Type:
Tuple[Mapping[str, Any], …]
- manifest
Record of what ran, fingerprinting the TUNED spec.