yobx.sklearn.ConvertOptions#

class yobx.sklearn.ConvertOptions(decision_leaf: bool | Set[str] = False, decision_path: bool | Set[str] = False)[source]#

Tunes the way every piece of a model is exported.

Parameters:
  • decision_leaf – (bool) — when True, an extra output tensor is appended containing the leaf node index (int64) for each input sample. Shapes follow the same convention as decision_path.

  • decision_path – (bool) — when True, an extra output tensor is appended containing the binary decision path string(s) for each input sample. For single trees the shape is (N, 1); for ensembles (N, n_estimators).

OPTIONS = ['decision_leaf', 'decision_path']#
has(option_name: str, piece: BaseEstimator) bool[source]#

Tells of options option_name applies on estimator piece.