Weka Creating Instance Object error

java, weka

Solution

Okay, according to this documentation `Instance` is an interface. Which is why your getting this error. You will need create one of the implementing classes eg,

Instance iExample = new DenseInstance(4);

Perhaps that example is out of date.

Problem

I was looking a programmatic exampple of Weka from http://weka.wikispaces.com/Programmatic+Use . However, I think because of the version of my Weka jar (3.7.7), it gives error on this line: ``` Instance iExample = new Instance(4); Error: Cannot instantiate the type Instance ``` What kind of change should I do on the code?

Original source