Problems with query points
6 次查看(过去 30 天)
显示 更早的评论
Hi,
I'm having problems with the codes for query points according to the tutorial based on:
I've followed both the tutorial and tried to implement it on my own data, but both instances I run into the exact same issue.
Following the step:
explainer = fit(explainer,tbl,UseParallel=true); % I have tried this both with and without the UseParallel bit
After attempting this, I receive the following error message:
Error using fit
Expected queryPoint to be a row vector.
Error in shapley/fit (line 424)
validateattributes(q, {'double','single','table'},{'row','nonempty'},'fit','queryPoint');
I'm really not sure what the issue is here as neither the tutorial data or my own work at this point. Any help will be greatly appreciated
0 个评论
回答(1 个)
Steven Lord
2024-9-3
According to the information you provided when you asked the question, you're using release R2023b. Looking at the documentation page for the fit method on shapley objects, I see that there was a change to the function in release R2024a that allows multiple query points. Are you trying to pass multiple query points into the function in an earlier release? I don't think that's going to work. To check this, try running the examples on the documentation page for the documentation installed with your release (or in the release R2023b documentation online) and see if it works with those examples.
If that doesn't explain the behavior you're seeing, what is the size and class of the tbl variable you're passing into the fit function as the second input?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!