# Encoding a Discrete Signal to an Artificial Neural Network?

What might be some potential methods to encode a 100-point signal (curve) for input to a Artificial Neural Network?

Example: we have a large number of 100-pt 'curves' ranging from flat-line to approximately a half-sine wave with a wide range of max amplitude. The curves have some noise and occasional anomalous 'bumps'. These training set curves can be broken down into known positives or negatives for 'truthing'.

If I wanted to use an Artificial Neural Network to give a result for untrained data curves, what are potential method to encode the input data sets?

Would transforming each of the 100 points in a curve to a [0.0000 .... 1.0000] range be useful (and thus we'd have 100 inputs to the ANN? Or another method might produce better results?

NOTE: I understand that FFT and Power Spectrum analysis might be a completely different alternative here as well, but am focussing right now on a possible neural network method.

-
I'll bet people will respond here, but you might have better luck on this site: metaoptimize.com/qa – Jonathan Fischoff Aug 13 '10 at 6:47

As n0vakovic mentioned, it depends on the type of input signal, what you expect the classification to depend on, and the type of noise, if any in the signal. Also, remember that expanding the input to a higher dimensional space also helps a lot, if your classification surface is non complicated (highly nonlinear). This idea is used in nonlinear SVMs and Deep Learning (Geoff Hinton). Now, as to the possible encodings:

1. Raw input at each data point
2. Scaled input to [0.0,1.0]
3. Take FFT or DCT and use the coefficients as input
4. Wavelet transform and use the coefficients. You have the added advantage of selecting different wavelet bases.
5. Expand into pairwise products of raw input along with the inputs. Now you have approximately 100 + 100*50 inputs
6. Do some denoising (for example in wavelet domain) if you have an idea of what kind of noise it is.
7. Expand the input space by taking moving averages in addition to the raw inputs

.... you have many other choices. Also, you can mix and match from the above. i.e., do denoising with wavelets if you think you have some intermittent noise in certain frequencies, and then expand into inputs and pairwise products. You could take pairwise products locally instead of all pairs. Basically, the answer depends, though hopefully the above will give you something to start on.

-

You might get some results with the method you mentioned with 100 inputs to the ANN. It might be good enough for your application, but if it's not, you'll need to apply some pre-processing.

What kind of pre-processing will do the trick is largely dependent on the nature of your signal and what you're trying to get. Try thinking about what should not be important (what characteristics of the signal) to end result and try to filter that out.

For example, if DC component is not important, remove it from all signals. If amplitude is not important, scale everything to [0,1] independently. If you have some high frequency noise, filter the signal with low-pass. More generally, think what characteristics of the spectra of the signal might be important. One of the tricks is to look at auto-correlation of the signal.

With or without pre-processing, coarser quantization or coding with Gray's code might additionally help.

-