我有一个使用.libsvm
格式编写的数据集,我想使用机器学习算法构建一个分类模型。我尝试使用Weka环境的3.6.12版本,但遇到了以下错误:
weka.core.convrters.LibSVMLoaderfailed to load 'train.ecml.libsvm.txt' Reason:Unable to determine structure as libsvm:java.lang.StringIndexOutOfBoundsException:String index out of range: -1
那么,如何解决这个问题,或者有没有其他简单的方法来处理这种数据文件格式?
回答:
你可以使用weka.core.converters.SVMLightLoader
来加载.libsvm
格式的数据文件。谢谢。