Skip to content

OPF File Format

Gustavo Rosa edited this page Jan 15, 2020 · 10 revisions

LibOPF

The original LibOPF file format can be depicted as following:

<# of samples> <# of labels> <# of features>
<0> <label> <feature 1 from sample 0> <feature 2 from sample 0> ...
<1> <label> <feature 1 from sample 1> <feature 2 from sample 1> ...
.
.
.
<n-1> <label> <feature 1 from sample n-1> <feature 2 from sample n-1> ... 

Note that the file must be binary with no blank spaces (ASCII representation just for illustration).

OPFython

In OPFython, we almost adopt the same file format as LibOPF. For the sake of easiness, we do not include the header line (# samples, # classes, and # features) and we load files from the following extensions: .txt, .csv and .json, instead of the binary format.

Clone this wiki locally