You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/sagemaker/clarify.py
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -94,6 +94,8 @@
94
94
{object: object},
95
95
)
96
96
],
97
+
# Arbitrary JSON object as baseline
98
+
{object: object},
97
99
),
98
100
SchemaOptional("num_clusters"): int,
99
101
SchemaOptional("use_logit"): bool,
@@ -1211,7 +1213,7 @@ class SHAPConfig(ExplainabilityConfig):
1211
1213
1212
1214
def__init__(
1213
1215
self,
1214
-
baseline: Optional[Union[str, List]] =None,
1216
+
baseline: Optional[Union[str, List, Dict]] =None,
1215
1217
num_samples: Optional[int] =None,
1216
1218
agg_method: Optional[str] =None,
1217
1219
use_logit: bool=False,
@@ -1224,7 +1226,7 @@ def __init__(
1224
1226
"""Initializes config for SHAP analysis.
1225
1227
1226
1228
Args:
1227
-
baseline (None or str or list): `Baseline dataset <https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-feature-attribute-shap-baselines.html>`_
1229
+
baseline (None or str or list or dict): `Baseline dataset <https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-feature-attribute-shap-baselines.html>`_
1228
1230
for the Kernel SHAP algorithm, accepted in the form of:
1229
1231
S3 object URI, a list of rows (with at least one element),
1230
1232
or None (for no input baseline). The baseline dataset must have the same format
0 commit comments