time-series-machine-learning/tsml-java

Converter toArff (single instance) does not copy over dataset

c-eg opened this issue · 3 comments

c-eg commented

The function Instance toArff(TimeSeriesInstance data) on line 157 of Converter.java.

On line 160, it returns a DenseInstance with the m_Dataset variable not being set, hence it's null. This is an issue as when an Instance is normally created with Instances, it sets the dataset there. However, when converting from TimeSeriesInstance to Instance, the Instance will not have access to the dataset or be able to set it as it doesn't have a rerefence to the whole dataset. This causes issues when trying to use the converted Instance in other helper functions, such as TSClassifier.classifyInstance(TimeSeriesInstance inst)

The method to convert TimeSeriesInstances to Instances (line 78) does copy the dataset to m_Dataset, however.

Hey Conor, I've been working on a fix for this as I need to convert single instances in proximity forest. I've got a fix working right now, will PR this afternoon :)

#452 fixed in PR i believe

c-eg commented

Yes this is now fixed