Naive Bayes model in R on a sparse matrix

I have a very large sparse matrix (encoded using sparse.model.matrix (~. - 1, data = train), and I would like to train the Naive Bayes model on it.

Is there a package in R that will allow me to do this? I checked e1071 and klar, but both of them do not seem to accept sparse matrix as input.

Are there any other packages besides glmnet that accept a sparse matrix, or is this my only choice?

+4
source share
1 answer

It seems that there is no R-implementation of Naive Bayes that supports sparse matrices.

+1
source

Source: https://habr.com/ru/post/1487382/


All Articles