java - Indexing a dataset with labels in weka arff files -
i trying indexing dataset in arff files label indexes. ve got dataset of mxn dimension nth column dedicated dataset labels. when trying create arff file using weka's class attribute in order construct proper arff file.
int numatts = data[0].length; fastvector atts = new fastvector(numatts); (int att = 0; att < numatts-1; att++) { atts.addelement(new weka.core.attribute("attribute" + att, att)); } string qwer ="class"; double [] labels = {1, 2, 3m}; weka.core.attribute object = new weka.core.attribute(qwer); atts.addelement(object);
my problem how construct last attribute labels indexing in arff file in order take string name "class" , values {1,2,3}.
as seen instance in adding attributes dataset, following code should enough:
atts.addelement(new attribute("class",labels));
where labels
of type: java.util.list<java.lang.string>
Comments
Post a Comment