ModelOriented / DALEX

moDel Agnostic Language for Exploration and eXplanation
https://dalex.drwhy.ai
GNU General Public License v3.0
1.38k stars 166 forks source link

Add additional checks #121

Closed WojciechKretowicz closed 4 years ago

WojciechKretowicz commented 5 years ago

In explain.R are some not described input errors. If you pass them to explain(), you will get the nondescriptive error:

pbiecek commented 5 years ago

Thanks. Good ideas. I am not sure about the second one (not data frame = tibble or data.table)?.

WojciechKretowicz commented 5 years ago

You can pass data as an object that do not have function nrow(). Then if you provided y you get the error from this if statement, because nrow(data) is NULL.

if (length(y) != nrow(data)) {
      verbose_cat("  -> target variable   :  length of 'y' is different than number of rows in 'data' (",color_codes$red_start,"WARNING",color_codes$red_end,") \n", verbose = verbose)
    }
maksymiuks commented 4 years ago

Check that were implemented

I decided not to implement that proposed check:

as it is not necessary for data to be data.frame. It can be matrix or tbl in some applications.

https://github.com/ModelOriented/DALEX/pull/140

pbiecek commented 4 years ago

Thanks