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

Problem with report function - 'cannot xtfrm data frames' #122

Closed
wkedziora opened this issue Jan 2, 2024 · 1 comment
Closed

Problem with report function - 'cannot xtfrm data frames' #122

wkedziora opened this issue Jan 2, 2024 · 1 comment
Assignees
Labels
bug 💣 Bug to fix

Comments

@wkedziora
Copy link

I have recently tried to run code from https://medium.com/responsibleml/forester-predicting-house-prices-use-case-b537253b6142 about prices of accommodation in Lisbon. It runs smoothly up to this code:

library('DALEX')
ex <- forester::explain(models    = output_2$best_models[[1]],
                        test_data = output_2$test_data,
                        y         = output_2$y)

model_parts <- DALEX::model_parts(ex$xgboost_bayes)
plot(model_parts, max_vars = 5)

When afterwards i try this:
report(output_2)

I get this error:

processing file: report_regression.Rmd
  |...........................                                                                     |  29% [table]                             
Quitting from lines 42-57 [table] (report_regression.Rmd)
Error in `xtfrm.data.frame()`:
! cannot xtfrm data frames
Backtrace:
 1. score_rounded[order(score_rounded["rmse"]), ]
 3. base::order(score_rounded["rmse"])
 4. base::lapply(z, function(x) if (is.object(x)) as.vector(xtfrm(x)) else x)
 5. base (local) FUN(X[[i]], ...)
 8. base::xtfrm.data.frame(x)

I have updated R and all packages as well as tried those options:
#116

What might be the issue?

@kozaka93 kozaka93 added the bug 💣 Bug to fix label Jan 5, 2024
@HubertR21
Copy link
Collaborator

Hi, thank you for the issue, and I'm sorry for a long time reply time.

The error was due to the fact, that the order function changed the way it works in recent R versions, and it resulted in such bug. We've already improved it in recent update to version 1.4.2.

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

No branches or pull requests

3 participants