gpt4 book ai didi

R DocumentTermMatrix控件列表不起作用,静默忽略未知参数

转载 作者:行者123 更新时间:2023-12-04 04:53:32 25 4
gpt4 key购买 nike

我有两个以下DTM:

dtm <- DocumentTermMatrix(t)

dtmImproved <- DocumentTermMatrix(t,
control=list(minWordLength = 4, minDocFreq=5))

实现此功能时,我看到两个相等的DTM-,如果我打开 dtmImproved,则会有带有3个符号的单词。为什么 minWordLength参数不起作用?谢谢!
> dtm
A document-term matrix (591 documents, 10533 terms)

Non-/sparse entries: 43058/6181945
Sparsity : 99%
Maximal term length: 135
Weighting : term frequency (tf)
> dtmImproved
A document-term matrix (591 documents, 10533 terms)

Non-/sparse entries: 43058/6181945
Sparsity : 99%
Maximal term length: 135
Weighting : term frequency (tf)

最佳答案

dtmImproved <- DocumentTermMatrix(t, control=list(wordLengths=c(4, 15), 
bounds = list(global = c(5,Inf))))

这样就解决了问题!缺乏适当的文档确实使我生气(:

关于R DocumentTermMatrix控件列表不起作用,静默忽略未知参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13366897/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com