if the elements are just nominal or string values we can use Instance object to represent that particular instance. Also for the Instances dataset we can get attributes by pre-defining them. But i have question. what is the approach if we want to use collections as values to the attribute elements?
for ex:
weka.core.Attribute attribute1 = new weka.core.Attribute("list1");
weka.core.Attribute attribute2 = new weka.core.Attribute("list2");
weka.core.Attribute classAttribute = new weka.core.Attribute("Function");
FastVector fvWekaAttributes = new FastVector(3);
fvWekaAttributes.addElement(attribute1);
fvWekaAttributes.addElement(attribute2);
fvWekaAttributes.addElement(classAttribute);
is the way we create the attributes if two are nominal values and one is string(class). and the way we add elements in to any dataset(ex:trainInstances), we create Instance object and add like this:
Instance iExample = new Instance(3);
iExample.setValue((weka.core.Attribute)fvWekaAttributes.elementAt(0), 10);
iExample.setValue((weka.core.Attribute)fvWekaAttributes.elementAt(0), 15);
iExample.setValue((weka.core.Attribute)fvWekaAttributes.elementAt(2), "F1");
trainInstances.add(iExample);
this is ok, but what should i use to store Lists/collections instead of single nominal values. I want to do like this:
int[] list1={10,20,30,40};
int[] list2={90,80,70,60};
iExample.setValue((weka.core.Attribute)fvWekaAttributes.elementAt(0), **list1**);
iExample.setValue((weka.core.Attribute)fvWekaAttributes.elementAt(0), **list2**);
iExample.setValue((weka.core.Attribute)fvWekaAttributes.elementAt(2), "F1");
trainInstances.add(iExample);
to be more specific, these lists might change their sizes sometimes. i..e, in this example we see each list of length 4 in size but should support lists of different sizes in other Instance objects. Is that possible using WEKA or any learning API. If so, please provide me the resources. It is mandatory to my master thesis..