LibSVM 中的名义属性

发布于 2024-08-27 09:04:25 字数 235 浏览 3 评论 0原文

创建 libsvm 训练文件时,如何区分标称属性和数字属性?我正在尝试将某些名义属性编码为整数,但我想确保 libsvm 不会将它们误解为数值。不幸的是,libsvm 的站点似乎只有很少的文档。 Pentaho 的文档 似乎暗示 libsvm 做出了这种区分,但我仍然不清楚它是如何实现的制成。

When creating a libsvm training file, how do you differentiate between a nominal attribute verses a numeric attribute? I'm trying to encode certain nominal attributes as integers, but I want to ensure libsvm doesn't misinterpret them as numeric values. Unfortunately, libsvm's site seems to have very little documentation. Pentaho's docs seem to imply libsvm makes this distinction, but I'm still not clear how it's made.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

尾戒 2024-09-03 09:04:26

不要这样做 我正在尝试将某些名义属性编码为整数

相反,对每个标称属性的每个值使用单独的二进制特征。

SVM 的表述方式是,所有属性/特征都是数字,类标签是名义的。名义属性本质上是通过使用互斥的二进制特征来伪造的。

Don't do this I'm trying to encode certain nominal attributes as integers.

Rather, use a separate binary feature for each value of each nominal attribute.

The way SVMs are formulated, all attributes/features are numeric and class labels are nominal. Nominal attributes are essentially faked by using mutually exclusive binary features.

烟酉 2024-09-03 09:04:26

我认为你不能在 libsvm、weka 或 SVM-light 中做到这一点。您可以使用的一种方法是对名义属性使用决策树之类的东西,对数值属性使用 svm 或任何基于距离的分类器,然后组合结果。我希望它有帮助。

I think you cant do that in libsvm, weka or SVM-light. One approach that you could use is to use something like a decision tree for your nominal attributes and svm or any distance based classifier for your numeric attributes and then combine the results. I hope it helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文