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,
@@ -1201,7 +1203,7 @@ class SHAPConfig(ExplainabilityConfig):
1201
1203
1202
1204
def__init__(
1203
1205
self,
1204
-
baseline: Optional[Union[str, List]] =None,
1206
+
baseline: Optional[Union[str, List, Dict]] =None,
1205
1207
num_samples: Optional[int] =None,
1206
1208
agg_method: Optional[str] =None,
1207
1209
use_logit: bool=False,
@@ -1214,7 +1216,7 @@ def __init__(
1214
1216
"""Initializes config for SHAP analysis.
1215
1217
1216
1218
Args:
1217
-
baseline (None or str or list): `Baseline dataset <https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-feature-attribute-shap-baselines.html>`_
1219
+
baseline (None or str or list or dict): `Baseline dataset <https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-feature-attribute-shap-baselines.html>`_
1218
1220
for the Kernel SHAP algorithm, accepted in the form of:
1219
1221
S3 object URI, a list of rows (with at least one element),
1220
1222
or None (for no input baseline). The baseline dataset must have the same format
0 commit comments