필터 지우기
필터 지우기

Problems with query points

조회 수: 21 (최근 30일)
Mark
Mark 2024년 9월 3일 13:10
댓글: Mark 2024년 9월 3일 14:08
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

답변 (1개)

Steven Lord
Steven Lord 2024년 9월 3일 13:43
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?
  댓글 수: 1
Mark
Mark 2024년 9월 3일 14:08
Hi Steven,
Thank you for your reply.
I'm not sure what the purpose of the query points is as I've seen no mention of it on the document page I linked, at least for the section I'm trying to do. (Side note, I'm just having problems with them anyway when it comes to classification and have asked a seperate question).
But as you suggested, I have tried to follow the examples that are provided as well as my own and in both instances ran into the same error at the same point. In my case, the tbl variable I am using is an 86x19 table consisting of purely numerical predictors.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by