Page 1 of 1

Getting data from OpenViBE to WEKA (-> ARFF file)

Posted: Mon Nov 02, 2015 10:08 am
by jtlindgren
Hi all,

an user was asking how to load data from OpenVIBE to WEKA for analysis and exploring with different classifiers. I'll repost my reply here in case somebody else is interested in this.

We don't currently have a WEKA exporter box, but it might be possible to do it manually. You could try the following procedure to convert data to the ARFF format used by WEKA,

- Use CSV Writer to save one .csv file per class from each feature aggregator box. Use , as the separator in the box config.
- Open each .csv file to a text editor. Add the class label to the end of each line. For example, in notepad++, you can use the extended replace operation to change special character \r to that files' class label, e.g. ",left" or ",right".
- Join all the files together (e.g. copy paste)
- Manually craft a matching .arff header (see the above link) into a third file text, copy-paste it to the beginning of the joined .arff file
- Its done

Its a bit of work. If you know linux shell programming you could make it automatic by tools such as sed and cat (or use them on windows via cygwin).

If there's enough interest, we could consider developing an ARFF exporter box. Let us know.

The user reports it might also be possible to use CSV somehow directly, by re-saving it to an .xls with the ; replaced by \t (tab) and then importing .xls to weka.