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 when predicting data with NAs #2

Open
pecanka opened this issue Oct 4, 2022 · 0 comments
Open

Error when predicting data with NAs #2

pecanka opened this issue Oct 4, 2022 · 0 comments

Comments

@pecanka
Copy link

pecanka commented Oct 4, 2022

When using the predict method on a wsvm object with newdata that has NA values in some columns the call produces an error. The problem happens when assigning names to ret2:

m = WeightSVM::wsvm(cyl~., weight=1:nrow(mtcars), data=mtcars)
mtcars2 = mtcars
mtcars2$mpg[1] = NA
predict(m, newdata=mtcars2)

Error in names(ret2) <- rowns : 
  'names' attribute [32] must be the same length as the vector [31]
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