1
$\begingroup$

I have sensor which outputs signals (two signals bellow for example). I use 2000 signals as my data, which some of them are clear and some of them are bad signals. All clear signals have peaks, and all bad signals are like sinuses but with noise. I am using neural network for training on this data (code bellow). Bellow there is a signal which I want to preserve and a signal with noise which I want to delete it (second one). Is there any method how to do that ? I want to delete those signals because they ruin my accuracy score when I do ANN training.

Two signals:

signals

My code:

X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size = 0.4)

ann = tf.keras.models.Sequential() # Initialising ANN
ann.add(tf.keras.layers.Dense(units = 100, activation = "relu")) # Adding First Hidden Layer
ann.add(tf.keras.layers.Dense(units = 150, activation = "relu")) # Adding Second Hidden Layer
ann.add(tf.keras.layers.Dense(units = Y.shape[1], activation = 'softmax')) # Adding Output Layer
ann.compile(optimizer = "adam", loss = 'categorical_crossentropy',  metrics = ['accuracy']) # Compiling ANN
history = ann.fit(X_train, Y_train, batch_size = 30, validation_data = (X_test, Y_test), epochs = 100) # Fitting ANN
$\endgroup$

1 Answer 1

2
$\begingroup$

The problem is not in your neural network. It's in your data.

Often times people treat neural networks as a magical way of solving every problem. Yet, before inputting data to neural networks, much preprocessing is usually used to remove noise, highlit some features, etc., in data.

For your problem, you should preprocess your data as well. The first solution that comes to mind is to use Fast Fourier Transform to remove noise. Take a look at this post on how this is done. Also there are numerous other noise removal techniques that you can use.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.