Shared Typing Helpers
The ocean.typing module collects the shared protocols and type aliases
used across the public explainers, tree parsing helpers, and internal backend
implementations. It is the reference page for supported ensemble types,
processed-array aliases, and the common explanation and explainer protocols.
Shared type aliases and protocols used throughout OCEAN.
-
class BaseExplainer(*args, **kwargs)[source]
Bases: Protocol
Protocol implemented by all public OCEAN explainers.
-
get_objective_value()[source]
-
get_distance()[source]
-
get_solving_status()[source]
-
get_anytime_solutions()[source]
-
explain(x, *, y, norm, return_callback=False, verbose=False, max_time=60, num_workers=None, random_seed=42, clean_up=True)[source]
-
cleanup()[source]
-
class BaseExplanation(*args, **kwargs)[source]
Bases: Protocol
Protocol implemented by explanation containers returned by explainers.
-
to_numpy()[source]
-
to_series()[source]
-
property x
-
property value
-
property query
-
class SKLearnTree(*args, **kwargs)[source]
Bases: Protocol
Protocol capturing the subset of the sklearn tree API OCEAN uses.
-
node_count
-
max_depth
-
feature
-
threshold
-
children_left
-
children_right
-
n_node_samples
-
value