Allowed values are `None`, or one of the following values: ('int', 'count', 'binary', 'tf-idf').当我使用tf-idf运行它时,我得到这个错误 Error in match.arg(output_mode) :
'arg' should be one of “int”, “binary”, “
我正在尝试使用下面的函数计算词频反向文档频率,以获得归一化的权重。当行数为百行时,结果非常快,但当行数为数千行(仅两万行)时,几乎需要3到4分钟才能得到结果。有人能给我指出正确的方向来减少计算时间吗? mat = mat[,names] id=function(col){sum(!col==0)} tfidf = mat
for(word in names(idf)){tfidf[,word] <-