title: Predict peaks on a chart in real time, using data from another
body: <p>I receive two data from two sensors data in real-time (that measure vibrations in a tube at different points). And I need to know, can I use only one sensor? I must measure vibrations at both points, and want to understand if can I use only the first sensor and predict peaks in the point where installed second sensor.</p>
  <p>I collected datasets from both sensors. I attached a graph after signal processing. I try to use the Long short-term memory algorithm, but my result is very strange, maybe you can give me advice on which algorithm is better for this situation?</p>
  <p>blue - first sensor, orange - second sensor. Can I use data from first sensor to detect peak in second sensor</p>
  <p><img src="https://i.stack.imgur.com/IZQAr.jpg" alt="1" /></p>
  <p>The algorithm that I used and the result that I received:</p>
  <pre><code>df = pd.read_excel('dataset.xlsx')
  X = df[[&quot;1_peak_X&quot;]]
  Y = df[&quot;2_peak_X&quot;]
  X_train, X_test, y_train, Y_test = train_test_split(X,Y , test_size=0.5, random_state=42)
  for_graph=Y_test
  y_train=np.array(y_train)
  X_train=tf.reshape(X_train, [5000, 1,1])
  X_test = tf.reshape(X_test, [1000, 1,1])
  regressor = Sequential()
  regressor.add(tf.keras.layers.LSTM(units = 50, return_sequences = True, input_shape = (1, 1)))
  regressor.add(tf.keras.layers.Dropout(0.2))
  regressor.add(tf.keras.layers.LSTM(units = 50, return_sequences = True))
  regressor.add(tf.keras.layers.Dropout(0.2)
  regressor.add(tf.keras.layers.Dense(units = 1))
  regressor.compile(optimizer = 'adam', loss = 'mean_squared_error')
  regressor.fit(X_train, y_train, batch_size = 1, steps_per_epoch = 1)
  predicted_stock_price = regressor.predict(X_test, steps = 1)
  </code></pre>