Spatial Classification OPF Experiments

Hello,

I’m testing out opf/experiments/spatial_classification with category_0, except I’m trying to add a second field, similar to the scalar_1 experiment.

So the csv dataset looks like this:

classification,field1,field2

string,string,string

,,

0,0,0

1,1,1

0,0,0

1,1,1

and so on...

But I’m getting the exception: "Invalid file format: different number of fields in the header rows of file …category_0.csv (3, 0, 3) from nupic/data/file_record_stream.py:

image

This makes sense as they’re not all the same length, the specials header is empty, but I can’t figure out why I’m getting this error when the original file looks like this:

classification,field1

string,string

,

0,0

1,1

0,0

1,1

...

Does this mean a special value must be defined when adding a second field?

Thanks,
Dee

I’ve never worked with “spatial_classification” specifically, but it looks like the first row is empty (just “,”).
I’d try deleting that row and rerunning.
Not sure if that’ll fix it, just the first thing I’d do.

Hi @sheiser1,

Thanks so much for the reply. That line is apparently a header file for “specials”, I tried removing this line but no luck.

You got me on the right track though as I thought then to try removing all blank lines and it worked!

Thanks a million!

1 Like