Handling Complex Input Structures for SHAP Value Generation in SageMaker DeepAR with Clarify

0

I am working with the SageMaker DeepAR model and facing challenges in generating SHAP values for multiple dynamic features, which are in the form of a 2D array. My model requires additional data such as start time, target values, etc., alongside these features.

To integrate this with SageMaker Clarify, I initially flattened my 2D array of dynamic features into a 1D array. However, I am now encountering two key issues:

Model Configuration for Clarify: I am unsure how to configure a complex JSON structure that would allow me to:

Send the necessary data (including start time, target, and dynamic features) to the model for predictions via the SageMaker Clarify-generated shadow endpoint. Enable Clarify to handle the more intricate structure of my input data, considering the need for additional data elements. Data Handling in Clarify: Given that Clarify seems optimized for handling arrays of single values, I am uncertain how to effectively restructure my flattened data back into its original form (or a suitable alternative structure) within the confines of Clarify. Specifically, I am considering the following options:

Can I restructure these elements back into arrays within the record template and content template in Clarify? Is it possible to pass a string value as a feature, and would this be a viable approach? Additionally, I am wondering if using features is the only way to pass data to the model in this context. Are there alternative methods for handling such complex input structures in Clarify, particularly for generating SHAP values with a model that requires additional contextual data?

Enrique
asked 5 months ago238 views
1 Answer
0

Hi, from your description, I think the new feature TimeSeries Explainability which we are about to launch will fix your problem.

AWS
answered 5 months ago
  • When will it be launched ?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions