Version: 2012.09-SNAPSHOT
RandomRBFGeneratorEvents generates Instance objects correctly. The problem
occurs when they are generated via noise. In that case
weka.core.Instance.toString() throws exception, which is annoying because is
not possible to use WriteStreamToARFFFile for example.
Here is an example:
import moa.streams.clustering.RandomRBFGeneratorEvents;
import weka.core.Instance;
public class InstanceGenerator {
private RandomRBFGeneratorEvents randomRBFGeneratorEvents;
public InstanceGenerator() {
randomRBFGeneratorEvents = new RandomRBFGeneratorEvents();
//randomRBFGeneratorEvents.noiseLevelOption.setValue(0);
randomRBFGeneratorEvents.prepareForUse();
}
public Instance next() {
return randomRBFGeneratorEvents.nextInstance();
}
public static void main(String[] args) {
InstanceGenerator generator = new InstanceGenerator();
for (int i = 0; i < 10; i++) {
Instance instance = generator.next();
System.out.println(instance.toString());
}
}
}
Original issue reported on code.google.com by AndreFer...@gmail.com on 28 Feb 2013 at 4:44
Original issue reported on code.google.com by
AndreFer...@gmail.com
on 28 Feb 2013 at 4:44