- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我下载了适用于 linux 操作系统的 SVM-Light。运行命令。它会生成 2 个可执行文件 svm_learn 和 svm_classify。使用这个我尝试使用以下代码执行示例文件(它包含 train.dat
、test.dat
文件)
./svm_learn example1/train.dat example1/model.txt
./svm_classify example1/test.dat example1/model.txt example1/predictions.txt
之后我得到了 2 个文本文件模型和预测。我是 svm 的新手。为什么示例文件中的 test.dat
和 train.dat
格式相同?
test.dat +1 6:0.0342598670723747 26:0.148286149621374 27:0.0570037235976456
train.dat 1 6:0.0198403253586671 15:0.0339873732306071 29:0.0360280968798065
输出如下
> Scanning examples...done
Reading examples into memory...100..200..300..400..500..600..700..800..900..1000..1100..1200..1300..1400..1500..1600..1700..1800..1900..2000..OK. (2000 examples read)
Setting default regularization parameter C=1.0000
Optimizing........................................................................................................................................................................................................................................................................................................................................................................................................................................done. (425 iterations)
Optimization finished (5 misclassified, maxdiff=0.00085).
Runtime in cpu-seconds: 0.07
Number of SV: 878 (including 117 at upper bound)
L1 loss: loss=35.67674
Norm of weight vector: |w|=19.55576
Norm of longest example vector: |x|=1.00000
Estimated VCdim of classifier: VCdim<=383.42790
Computing XiAlpha-estimates...done
Runtime for XiAlpha-estimates in cpu-seconds: 0.00
XiAlpha-estimate of the error: error<=5.85% (rho=1.00,depth=0)
XiAlpha-estimate of the recall: recall=>95.40% (rho=1.00,depth=0)
XiAlpha-estimate of the precision: precision=>93.07% (rho=1.00,depth=0)
Number of kernel evaluations: 45954
Writing model file...done
train.dat
是训练文件,所以在执行前就打了标签,那为什么test.dat
在执行前就打了标签呢?你能解释一下输出,特别是术语精度、召回率、错误
最佳答案
测试数据也会被标记,以便您的分类器可以评估。如果测试集没有好的标签,您就无法衡量其质量。在分类过程中不使用此信息,它仅用于检查良好分类的数量。错误、精确度和召回率测量是用于评估分类器的众多指标之一。
哪里
关于linux - 为什么 svmlight 中的训练和测试文件相同,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21227088/
我需要知道 SVMlight 是否输出分类分数。我在任何地方都找不到它。我知道例如 libSVM 确实如此。thx 最佳答案 SVMLight 的输出包含每个分类实例的“预测值”。严格来说,这不是“分
我很困惑每个部分在 svmLight 数据格式中的含义。例如: (标签/目标,[(特征,值),...],查询ID) label是数据的排序,queryid是对象的id吗? 例如:对于以下项目: 2 q
SVMlight site (在常见问题解答中)提供了一个计算超车道权重向量的脚本。它说它“计算支持向量的加权和”。 这是什么意思?也就是这个脚本是做什么的,这个权重向量的意义和用途是什么? 提前致谢
我正在尝试使用 svm light 对路透社文本进行分类,但我的训练数据不遵循格式 .=. : : ... : # 其形式为 .=. : : ... : # 目标标签位于单独的文件中。我知道
我是 SVMlight 新手。我下载了源代码并编译了SVMlight。 我创建了训练和测试数据集。然后跑了 [command] 创建模型文件。使用此模型文件,我运行 svm_classify 创建一个
我下载了适用于 linux 操作系统的 SVM-Light。运行命令。它会生成 2 个可执行文件 svm_learn 和 svm_classify。使用这个我尝试使用以下代码执行示例文件(它包含 tr
e1071 的 SVM 的成本似乎与 svmlight 的成本不同。 e1071库的手册对其成本参数的定义如下: cost of constraints violation (default: 1)—
我想使用 SVMlight 对我的训练集运行交叉验证。似乎这个选项是 -x 1 (尽管我不确定它实现了多少折叠......)。输出为: XiAlpha-estimate of the error: e
我正在尝试使用 SVM Light 学习 OpenCV2.2 HOG 描述符的分类器。我从 HOG 描述符中得到一个浮点矢量输出。 看了SVMLight的文档,还是没明白输入train和test da
我在以前从未见过的 IPython 笔记本中收到一条新的弃用警告。我看到的是以下内容: X,y = load_svmlight_file('./GasSensorArray/batch2.dat')
我有几个问题要问 1)在svmlight风格的数据中有(目标特征:值特征:值...)我知道特征和值是什么,但是目标是什么?这是什么意思?我想知道这一点,因为我计划制作一个文本文件,并将这些数据写入其中
在 scikit-learn 中,提供了两个函数来加载和转储 SVM^light 格式的文件: sklearn.datasets.load_svmlight_file 和 sklearn.datase
有什么方法可以将 python 数组导出为 SVM light 格式? 最佳答案 scikit-learn 中有一个: http://scikit-learn.org/stable/modules/g
我在 Mac OSX Mountain Lion 上使用 scikit_learn-0.14 运行 python 2.7.5。 但是,我运行 svmlight 命令的所有操作都会收到以下警告: Dep
我是一名优秀的程序员,十分优秀!