aggregate_node_attributions ¶
aggregate_node_attributions(
attributions: DataArray,
labels: object | None = None,
*,
method: str = _DEFAULT_METHOD,
**method_kwargs: object
) -> xr.Dataset
Reduce mapped node attributions with a registered method.
map_node_attributions names a tensor; this call folds
it according to method. The dispatcher looks up the
name, applies the method's status warnings, calls the
registered function, and stores the method name, the
parameters actually used, and the kpnn2 version on
the result. Adding a method does not change this
function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
DataArray
|
Output of |
required |
|
1-d array or pandas.Series
|
Forwarded to the method. Some methods require it. |
None
|
|
str
|
Registered method name. Default
|
_DEFAULT_METHOD
|
|
object
|
Forwarded to the method. |
{}
|
Returns:
| Type | Description |
|---|---|
Dataset
|
The method's per-node result, with attributes
|
Raises:
| Type | Description |
|---|---|
Kpnn2Error
|
If |
Warns:
| Type | Description |
|---|---|
UserWarning
|
If |
FutureWarning
|
If |
See Also
map_node_attributions : Names the node axis of a layer tensor; call that first. list_aggregation_methods : Registry table (name, status, references, versions).
Notes
Captum is not imported here. Method formulas, required dims, and extra kwargs are documented on each method's reference page. The default method is not yet implemented.
Methods¶
Pass a name as method=. These functions are not imported
from kpnn2.
list_aggregation_methods
returns the same catalog in Python.
| Method | Status | Description |
|---|---|---|
rauter_mangano_2026 |
recommended | Not yet implemented. |