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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With