Applied SHAP on the polynomial equation case with LSTM algorithm

Source: Deep Learning on Medium

Applied SHAP on the polynomial equation case with LSTM algorithm

keyword: Python, LSTM, SHAP, weights

Somewhere in Taiwan. All rights reserved.

This article demonstrates the Python SHAP package capability in explaining the LSTM model in a known model. You will learn how to participate in the SHAP package and its accuracy.

Suppose a given model with five input state, each state has own weight factor and sum up with a result y. It represents as below.

LSTM loss table. All rights reserved.

ddd

Real and Predict comparison chart. All rights reserved
SHAP explainer results versus the given weight factors. All rights reserved

The full working code is below.

<script src=”https://gist.github.com/Sakamoto-Kim/aae3e3fd96a819e57d58c02190db5311.js“></script>