Machine learning 从ARFF文件访问特定属性

Machine learning 从ARFF文件访问特定属性,machine-learning,jython,weka,arff,Machine Learning,Jython,Weka,Arff,我正在学习使用weka解决集群问题。对我来说,使用ARFF文件似乎是新的。我有一个疑问,我无法从网上搜索到答案。问题是如何从ARFF文件访问特定属性。 实例 我的文件有这样的内容 @relation whatever @attribute Latitude numeric @attribute Longitude numeric @attribute NoOfEmp numeric @attribute Revenue numeric @attribute Type4 numeric @att

我正在学习使用weka解决集群问题。对我来说,使用ARFF文件似乎是新的。我有一个疑问,我无法从网上搜索到答案。问题是如何从ARFF文件访问特定属性。 实例 我的文件有这样的内容

@relation whatever

@attribute Latitude numeric
@attribute Longitude numeric
@attribute NoOfEmp numeric
@attribute Revenue numeric
@attribute Type4 numeric
@attribute Type6 numeric
@attribute Type7 numeric
@attribute Type8 numeric
@attribute Type9 numeric
@attribute Type10 numeric
@attribute Type11 numeric

@data
0.456,0.029,-0.143,-0.143,1,0,0,0,0,0,0
0.443,0.032,-0.286,-0.286,1,0,0,0,0,0,0
0.487,0.012,-0.286,-0.286,1,0,0,0,0,0,0
0.435,0.027,-0.286,-0.286,1,0,0,0,0,0,0
0.467,-0.01,-0.143,-0.143,1,0,0,0,0,0,0
0.484,0.007,-0.286,-0.286,1,0,0,0,0,0,0
0.456,0.029,-0.286,-0.286,1,0,0,0,0,0,0
0.457,0.032,0.286,0.286,0,0,1,0,0,0,0
0.486,-0.019,0.286,0.286,0,0,1,0,0,0,0
使用X-Means聚类算法,将上面的每一行作为一个实例,也就是说,如果我说给出第四个实例,它给出

0.435,0.027,-0.286,-0.286,1,0,0,0,0,0,0
但我需要的是从上面的实例中单独获取一个属性,比如“-0.286”。我尝试了实例[2],但它说“对象不可订阅”。我是个新手,有人能帮我吗

任何帮助都会非常有用


提前谢谢。

我已经得到了答案。它的
“data.instance(2).value(3)”