gpt4 book ai didi

machine-learning - 为什么weka在WEKA上计算stringToWordVector的数字函数错误?

转载 作者:行者123 更新时间:2023-11-30 09:01:13 24 4
gpt4 key购买 nike

我想在 WEKA 应用程序上计算数据集的 stringToWordVector。我将wordsToKeep的参数更新为50。但它计算出78个单词。我想要 50 个字,但它计算出 78 个字。如何修正计算结果?

我的数据集:http://www.dt.fee.unicamp.br/~tiago/smsspamcollection - 链接1

最佳答案

-W 选项限制每个类保留的单词数,因此对于 2 个类,设置 -W 50 的限制为 100

来源:

public String wordsToKeepTipText() {
return "The number of words (per class if there is a class attribute "+
"assigned) to attempt to keep.";
}

此外,基于source ,这不是一个严格的约束,它只影响在哪里修剪排序的事件列表,这可以改变

// sort the array
sortArray(array);
if (array.length < m_WordsToKeep) {
// if there aren't enough words, set the threshold to
// minFreq
prune[z] = m_minTermFreq;
} else {
// otherwise set it to be at least minFreq
prune[z] = Math.max(m_minTermFreq,
array[array.length - m_WordsToKeep]);
}

关于machine-learning - 为什么weka在WEKA上计算stringToWordVector的数字函数错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34462687/

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