laresbernardo / lares

Analytics & Machine Learning R Sidekick
https://laresbernardo.github.io/lares/
233 stars 49 forks source link

mplot_full and mpolt_importance errors #7

Closed pangka closed 5 years ago

pangka commented 5 years ago

Thank you for the lares:h2o_automl fix. Worked through your blog examples. Dalex examples work fine. Two issues:

  1. lares::mplot_full(tag = results$score$tag, score = results$scores$score, subtitle = "Titanic dataset")

throws this error:" Error in grouped_df_impl(data, unname(vars), drop) : Column tag is unknown"

  1. lares::mplot_importance(var = results$importance$variable, imp = results$importance$percentage, subtitle = "Titanic dataset")

throws this error: "The variables and importance values vectors should be the same length. Currently, there are 6 variables and 0 importance values! Error in lares::mplot_importance(var = results$importance$variable, imp = results$importance$percentage, :"

laresbernardo commented 5 years ago

Yes @pangka, it is the same issue as before.. the object created when you ran the h2o_automl returns a list. The object you need is called results$scores_test$tag instead of results$scores$tag; the same for score.

On the second plot, you need results$importance$importance instead of results$importance$percentage. That is why the error message says that the length of the second value is 0.

It is working just fine for the library but the post is a bit old and some things have changed. I will edit the post so no one else have this same issue.

Post: https://datascienceplus.com/understanding-titanic-dataset-with-h2os-automl-dalex-and-lares-library/

Feel free to write back if needed!

pangka commented 5 years ago

Ahh, thank you. Works fine. Great graphs.

On Sun, Nov 11, 2018 at 7:22 AM laresbernardo notifications@github.com wrote:

Yes @pangka https://github.com/pangka, it is the same issue as before.. the object created when you ran the h2o_automl returns a list. The object you need is called results$scores_test$tag instead of results$scores$tag; the same for score. On the second plot, you need results$importance$importance instead of results$importance$percentage. That is why the error message says that the length of the second value is 0. It is working just fine for the library but the post is a bit old and some things have changed. I will edit the post so no one else have this same issue. Post: https://datascienceplus.com/understanding-titanic-dataset-with-h2os-automl-dalex-and-lares-library/

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/laresbernardo/lares/issues/7#issuecomment-437679211, or mute the thread https://github.com/notifications/unsubscribe-auth/Aq3OCMpanM1QVKUwBh5KNINi8kDvvMmiks5uuECzgaJpZM4YYgPI .

laresbernardo commented 5 years ago

Glad I could help @pangka Cheers!