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:
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