Need help to find shapley value

Hello,
1- When i wrtie mdl = fitrkernel(tbl,'MPG','CategoricalPredictors',[2 5]);
Its give error
2- When i write explainer = shapley(mdl,tbl)
error: Unrecognized function or variable 'shapley'.
Pls guide me.

2 commentaires

Girijashankar Sahoo
Girijashankar Sahoo le 19 Mai 2021
might be these cammand function file not in tool and add in your matlab directory then run
Ali Asghar
Ali Asghar le 19 Mai 2021
Thanks for reply.
these are matlab example. how can i add it?

Connectez-vous pour commenter.

Réponses (1)

Drew
Drew le 5 Mai 2023

0 votes

The shapley command (https://www.mathworks.com/help/stats/shapley.html) was released in R2021a. The sidebar indicates you were using R2020a. So, you need to upgrade to a MATLAB version that is R2021a or higher to run the shapley command.

2 commentaires

Ali Asghar
Ali Asghar le 5 Mai 2023
Thanks for your answer. I did it few month back.
Drew
Drew le 5 Mai 2023
If this answers your question, it is recommended to accept the answer. I'm glad to hear that you upgraded your MATLAB already.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Get Started with MATLAB dans Centre d'aide et File Exchange

Produits

Version

R2020a

Tags

Commenté :

le 5 Mai 2023

Community Treasure Hunt

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

Start Hunting!

Translated by