Waikato / moa

MOA is an open source framework for Big Data stream mining. It includes a collection of machine learning algorithms (classification, regression, clustering, outlier detection, concept drift detection and recommender systems) and tools for evaluation.
http://moa.cms.waikato.ac.nz/
GNU General Public License v3.0
610 stars 353 forks source link

Addressed NullPointerException thrown during execution of the moa.streams.clustering.FileStream task #81

Closed richard-moulton closed 7 years ago

richard-moulton commented 7 years ago

Attempting to execute the moa.streams.clustering.FileStream task with a MOA generated ARFF file consisting exclusively of numerical attributes, exclusively of non-numeric attributes, or a mix of numeric and non-numeric attributes, the following error was received:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at com.yahoo.labs.samoa.instances.Instances.(Instances.java:115)

The cause for this exception was traced to FileStream.java, line 232, where the program attempts to 'remove dataset from instance so we can delete attributes' with the code: rawInstance.setDataset(null); As no instances were removed, the moa.streams.clustering.FileStream task was tested separately with an ARFF file while deleting attributes. This revealed that a separate error occurs - #79

Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException: Not yet implemented at com.yahoo.labs.samoa.instances.InstanceInformation.deleteAttributeAt(InstanceInformation.java:144)

Therefore, removed FileStream.java, line 232 and associated comment and added a new comment describing the function of the following 'for' loop. The moa.streams.clustering.FileStream task now executes properly when provided an ARFF file consisting exclusively of numeric attributes, exclusively of non-numeric attributes, or a mix of numeric and non-numeric attributes, where no attributes are removed.