CarlosLpzH-91 / SAEA

0 stars 0 forks source link

some question about BSA Encoding #1

Open lovingpolar opened 1 year ago

lovingpolar commented 1 year ago

Hi, I want to ask about BSA Encoding, how does fs affect encoding? I've read the papers, but they all talk about thresholds and cutoff frequencies, so I don't know how fs value should be set properly.

CarlosLpzH-91 commented 1 year ago

Hi

The Fs value represents they sampling frequency of the data you are encoding. So it is a fixed variable. In the case of Egg data that i'm using, the sampling Frequency was 256 Hz, therefor fs was set to 256

lovingpolar commented 1 year ago

Thanks for your answer. I am also used for EEG encoding, but after I set FS as the sampling rate of the dataset, I found that the decoded waveform was very different from the original signal.

lovingpolar commented 1 year ago

waveform

CarlosLpzH-91 commented 1 year ago

And the other parameters?? The Fs only takes action on the lenght of signal that gets enconded at a time.

What procedure are you using to find suitable parameters (size of filter, cutoff frequency and threshold)?

lovingpolar commented 1 year ago

Is there any suitable algorithm recommended? The parameters I'm currently using are derived from a paper that uses a grid search algorithm. After adjusting to the appropriate parameters, the waveform is much better, but there are still a few position differences.

lovingpolar commented 1 year ago

waveform1 code

CarlosLpzH-91 commented 1 year ago

It definitely looks better. Regarding the algorithms, grid search is a good option. I've try with differential evolution and a surrogate implementation of it with good results.

The visual comparison is valid, but I strongly recommend using another metric. For example, RMSE OR Sings to noise ratio (SNR). Tha would give a numerical value of the process.

Now, you have to understand that the encoding-decoding process will always have an unavoidable loss of information (error).

I would recommend that you use the algorithm (grid search if you have it) directly on the signal that you are using.

lovingpolar commented 1 year ago

Thanks for the suggestion.Is it necessary to find out the optimal parameters using all the data in the data set?

lovingpolar commented 1 year ago

I tried doing a grid search on the entire dataset to find the optimal encoding parameters for BSA, where both SNR and RSME performed well. However, when the converted spike dataset is fed into the network model, the classification results are not ideal. Referring to the encoding parameters of the paper I have seen (SNR and RSME are not as good as grid search after decoding), the classification works well. I don't know if you have encountered such a problem, do you have any ideas to solve it?