-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generating Multi-Label Synthetic Data Stream gives a NullPointerException #137
Comments
Yes. Same happens to me whenever I run WriteStreamToArffFile with the MetaMultilabelGenerator. |
I finally solved it by forcing the generator to use a dense representation instead of a sparse one. That is, in the method called "generateMLInstance" I changed the following line: |
I changed the line in the SparseInstance.java We are changing the type of constructor. An example setting:
|
A little change of constructor calling to solve the MetaMultilabelGenerator problem. The commit solves the issue Waikato#137 . An example is also given in the comment section
This issue still persists. I have tried every solution here with the given setup of @JayKumarr but Multi-Label stream generation still does not work. As you can see in the screenshot, I have used @JayKumarr 's suggestion and his setup, but I couldn't solve my problem. Also I have saved this file into the JAR package so I'm sure this is the running code. Edit: I have also tried @Juancard's suggestion but it did not solve my problem neither. |
Since this issue has been solved by #249 it is safe to close it now |
Hey There,
The issue that I will talk about next is discussed here previously: https://groups.google.com/forum/#!topic/moa-development/ho-_Z22k1-E
The task WriteStreamToARFFFile does not work properly. Although some initial statistics on the distribution of the label sets are outputted to the terminal, the process terminates with a NullPointerException.
The error is replicated by some other user in MOA Development Google Group as well.
The error is similar to this:
Failure reason: Failed writing to file /home/****/Synth.arff *** STACK TRACE ***java.lang.RuntimeException: Failed writing to file /home/****/Synth.arff at moa.tasks.WriteStreamToARFFFile.doMainTask(WriteStreamToARFFFile.java:86) at moa.tasks.MainTask.doTaskImpl(MainTask.java:50) at moa.tasks.AbstractTask.doTask(AbstractTask.java:57) at moa.tasks.TaskThread.run(TaskThread.java:76) Caused by: java.lang.NullPointerException at com.yahoo.labs.samoa.instances.SparseInstanceData.locateIndex(SparseInstanceData.java:237) at com.yahoo.labs.samoa.instances.SparseInstanceData.setValue(SparseInstanceData.java:220) at com.yahoo.labs.samoa.instances.InstanceImpl.setValue(InstanceImpl.java:269) at moa.streams.generators.multilabel.MetaMultilabelGenerator.generateMLInstance(MetaMultilabelGenerator.java:274) at moa.streams.generators.multilabel.MetaMultilabelGenerator.nextInstance(MetaMultilabelGenerator.java:228) at moa.streams.generators.multilabel.MetaMultilabelGenerator.nextInstance(MetaMultilabelGenerator.java:46) at moa.tasks.WriteStreamToARFFFile.doMainTask(WriteStreamToARFFFile.java:80) ... 3 more
The setting which results in the error is as follows:
The text was updated successfully, but these errors were encountered: