Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error on plot predict_parts duplicate row names #562

Closed
jamesburnsTTRS opened this issue Apr 6, 2024 · 2 comments
Closed

error on plot predict_parts duplicate row names #562

jamesburnsTTRS opened this issue Apr 6, 2024 · 2 comments

Comments

@jamesburnsTTRS
Copy link

explainer_2 <- explain_xgboost(clf, data = newmat, y=Weekly_SL_Agg$LN_SWP_Act)
Preparation of a new explainer is initiated
-> model label : xgb.Booster ( default )
-> data : 378 rows 49 cols
-> target variable : 378 values
-> predict function : yhat.xgb.Booster will be used ( default )
-> predicted values : No value for predict function target column. ( default )
-> model_info : package xgboost , ver. 1.7.6.1 , task regression ( default )
-> predicted values : numerical, min = zz.373191 , mean = kk.75155 , max = aa.02619
-> residual function : difference between y and yhat ( default )
-> residuals : numerical, min = -z.7959752 , mean = -b.000319823 , max = f.2809396
The model works
plot(predict_parts(explainer_2,newmat))
Error in .rowNamesDF<-(x, value = value) :
duplicate 'row.names' are not allowed
In addition: Warning message:
non-unique value when setting 'row.names': ‘xgb.Booster’

first variable is a predictor 1 week of Black Friday 0 elsewhere for 378 rows of weekly data
and I think that's what's driving this error or do you need to create x axis per variable

there are many variables with dupes per month since many are monthly figures. Do you need to create a separate x axis per variable vs a row id common for all?

@maksymiuks
Copy link
Member

maksymiuks commented Apr 6, 2024

Hi,

Could you please share some examples of dummy data an your model so we can reproduce the issue?

@jamesburnsTTRS
Copy link
Author

jamesburnsTTRS commented Apr 7, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants