dtm_train_tfidf 是 CSC 格式的稀疏矩阵 dgCMatrix
我正在使用应该接受稀疏矩阵的函数 LiblineaR。但是,当我使用稀疏矩阵 dtm_train_tfidf 时,会出现以下错误:
library(LiblineaR)
LiblineaR(data=dtm_train_tfidf,
target=train$setiment, type = 4, cost = 1, epsilon = 0.1,
+ svr_eps = NULL, bias = 1, cross = 0, verbose = FALSE,
+ findC = FALSE)
Error in t.default(data) : argument is not a matrix