Basic Sinusoidal Predictor Tutorial Help

Hi Guys,

I’ve recently got into the world of TinyML. I have a question regarding the use of CSV files in Edge Impulse. I’m currently trying to follow this tutorial, but using Edge Impulse instead of the method given in the original video by the wonderful Shawn Hymel:

https://www.youtube.com/watch?v=dU01M61RW8s&t=65s

As such, I’ve been trying to format my CSV files to try and solve this regression style ML problem. So far, I’ve tried formatting my Excel files in the following ways:

Both of these formats have not been able to be processed by Upload Data. If anyone knows what I’m doing wrong with my files, or whether the sinusoidal example can be done in Edge Impulse in the first place, it would be greatly appreciated.

Hi @Martin_08 you’ll need to have a timestamp column. So, e.g.

timestamp,noisy_values
0,1.203

Then save as 1.002.csv - downside is that the automatic detection of labels does not work for labels with a dot in it, so you would have to relabel in the Studio or upload via the CLI:

edge-impulse-uploader --label "1.002" 1.002.csv
1 Like

Hi @janjongboom,

Thanks for the quick reply, do you know if the automatic detection of labels will know that it is a numerical value and not a string?

The reason is that so far, the examples I’ve seen in Edge Impulse have been classification style problems rather than regression.

@Martin_08, Yes, will be automatically detected - see https://www.edgeimpulse.com/blog/predict-the-future-with-regression-models for some background.

Sorry for the continued annoyance @janjongboom, you’ve been very helpful so far.

I’m still encountering errors in uploading the CSV files for each sample.
I changed the formatting of my CSV files to the following:

timestamp,noisy_values
0.000,1.203

I’m still getting the same error as before:

I tried manually assinging the label value this time around, but it doesn’t seem to get rid of the error.

@Martin_08 Ah good point… A dirty way to fix this would be:

timestamp,noisy_values
0,1.203
100,1.203

But as you can see Edge Impulse is not 100% set up for these ML problems without a time domain.

(The reason why you need at least two entries in the CSV file is because we need to determine the data frequency, the JSON/CBOR etc. formats don’t need it.)

1 Like