How to compute the Shapley value of BP neural network

4 ビュー (過去 30 日間)
Yijun GUO
Yijun GUO 2021 年 7 月 21 日
回答済み: Drew 2024 年 8 月 14 日
Hello, I trained a BP nerual network using newff function, and wanted to obtain its Shapley value. But error occurs like this:
How can I deal with it?
  2 件のコメント
Dhruv G
Dhruv G 2021 年 7 月 21 日
Can you share your code?
Yijun GUO
Yijun GUO 2021 年 7 月 21 日
P = [2 3 1;3 4 5;1 3 4;4 6 7;2 7 3]';
T = [1 2 3 4 5];
net=newff(P,T,5,{'tansig' 'purelin'},'trainlm');
[net,tr]=train(net,P,T);
queryPoint = P(:,1);
explainer1 = shapley(net,P,'QueryPoint',queryPoint);

サインインしてコメントする。

回答 (1 件)

Drew
Drew 2024 年 8 月 14 日
The answer at https://www.mathworks.com/matlabcentral/answers/2127046-shapley-values-for-newff-model explains how to calculate Shapley values for a newff model.
If this answer helps you, please remember to accept the answer.

カテゴリ

Help Center および File ExchangeDeep Learning Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by