Stanford nlp 斯坦福NLP文本分类器、自定义特征和混淆矩阵
我从Java代码中使用了斯坦福NLP文本分类器(ColumnDataClassifier)。我有两个主要问题 1-)如何打印更详细的评估信息,如混淆矩阵 2-)我的代码已经完成了预处理并提取术语的数字特征(向量),例如二进制特征或TF-IDF值。如何使用这些特性来训练和测试分类器Stanford nlp 斯坦福NLP文本分类器、自定义特征和混淆矩阵,stanford-nlp,text-classification,Stanford Nlp,Text Classification,我从Java代码中使用了斯坦福NLP文本分类器(ColumnDataClassifier)。我有两个主要问题 1-)如何打印更详细的评估信息,如混淆矩阵 2-)我的代码已经完成了预处理并提取术语的数字特征(向量),例如二进制特征或TF-IDF值。如何使用这些特性来训练和测试分类器 我问了一个相关的问题ColumnDataClassifier没有在混淆矩阵中输出度量的选项。但是,如果查看中的代码,您可以看到TP、FP、TN、FN输出到stdin的位置。这个地方有你需要的原始值。它可以用于一个方法,
ColumnDataClassifier
没有在混淆矩阵中输出度量的选项。但是,如果查看中的代码,您可以看到TP、FP、TN、FN输出到stdin的位置。这个地方有你需要的原始值。它可以用于一个方法,该方法将这些信息聚合到一个混淆矩阵中,并在运行后输出,但您必须自己编写此代码ColumnDataClassifier
结合使用的示例。如果使用数字特征,请从中查看这些选项,这些选项允许您应用一些变换:
realValued boolean false Treat this column as real-valued and do not perform any transforms on the feature value. Value
logTransform boolean false Treat this column as real-valued and use the log of the value as the feature value. Log
logitTransform boolean false Treat this column as real-valued and use the logit of the value as the feature value. Logit
sqrtTransform boolean false Treat this column as real-valued and use the square root of the value as the feature value. Sqrt
这是一个很好的分类器资源:我不认为有任何直接的方法可以打印出混淆矩阵。这是本课程的javadoc:@StanfordNLPHelp谢谢。你能看看这个吗: