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

Require finite/non-NA/non-NaN training/testing data #272

Open
martinju opened this issue Aug 25, 2021 · 0 comments
Open

Require finite/non-NA/non-NaN training/testing data #272

martinju opened this issue Aug 25, 2021 · 0 comments

Comments

@martinju
Copy link
Member

I believe all types of approaches (perhaps except approach=independence) requires data to be finite, non-NA and non-NaN. It therefore makes sense to check for this in the check_features function call. Maybe after this code?:

shapr/R/preprocess_data.R

Lines 260 to 269 in c7455a1

# Check if the features all have class "integer", "numeric" or "factor
if (!all(f_list_1$classes %in% c("integer", "numeric", "factor"))) {
invalid_class <- which(!(f_list_1$classes %in% c("integer", "numeric", "factor")))
stop(paste0(
"Feature(s) ", paste0(f_list_1$labels[invalid_class], collapse = ", "), " in ", name_1, " and ", name_2,
" is not of class integer, numeric or factor."
))
}

@martinju martinju changed the title Require finite training/testing data Require finite/non-NA/non-NaN training/testing data Aug 25, 2021
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

1 participant