Body: <p>I have 999 signals, each with separate day timestamp, each T=10s long, sampled with fs=25kHz. This gives N=250,000 samples in total.</p>
  <p>My task was to obtain the averaged magnitude spectrum for each signal. For example, for k=100, the signal is divided into k-equal fragments, 0.1s and 2500 samples long. Then FFT is computed on all fragments and mean value is calculated for all spectral component (mean for each frequency from DC to Nyquist Frequency).
  The averaged spectrum for each signal for k=100 contains 1251 values and 1251 frequency points (0-fs/2).</p>
  <p>My question is, how can prepare the train dataset for multiple Machine Learning models based on that data, so I can predict when is the threshold time, before the failure of the machine occurs?
  Do i treat each spectral component (frequency) as separate feature? Or there is a different approach ?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-10-31T11:15:31.967Z
Comments.Text: "mean value is calculated for all spectral component". Mean of all 100 FFTs from fragments of a signal for a specific frequency ?  You are not interested in the information from time evolution of the FFT ?
Comments.UserDisplayName: pasaba por aqui
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-10-31T15:09:54.353Z
Comments.Text: Instead of having 125,001 frequency components I want to firstly average the spectrum and have smaller dataset of (for k=100) 1251 spectral components. Maybe my approach is bad, I am a novice. If you have an advice, I will definitely listen to you.
Comments.UserDisplayName: Filip Szczybura
Tags: <python>
Title: How can I predict an anomaly based on FFT of multiple signals?
UserDisplayName: Filip Szczybura
ThreadText: # How can I predict an anomaly based on FFT of multiple signals?
  
  (Asked by: username_0 on 2020-10-31)
  
  I have 999 signals, each with separate day timestamp, each T=10s long, sampled with fs=25kHz. This gives N=250,000 samples in total.
  
  My task was to obtain the averaged magnitude spectrum for each signal. For example, for k=100, the signal is divided into k-equal fragments, 0.1s and 2500 samples long. Then FFT is computed on all fragments and mean value is calculated for all spectral component (mean for each frequency from DC to Nyquist Frequency).
  The averaged spectrum for each signal for k=100 contains 1251 values and 1251 frequency points (0-fs/2).
  
  My question is, how can prepare the train dataset for multiple Machine Learning models based on that data, so I can predict when is the threshold time, before the failure of the machine occurs?
  Do i treat each spectral component (frequency) as separate feature? Or there is a different approach ?
  
  **Tags:** python
  > **Comments:**
  > **username_1**: "mean value is calculated for all spectral component". Mean of all 100 FFTs from fragments of a signal for a specific frequency ?  You are not interested in the information from time evolution of the FFT ?  
  > **username_0**: Instead of having 125,001 frequency components I want to firstly average the spectrum and have smaller dataset of (for k=100) 1251 spectral components. Maybe my approach is bad, I am a novice. If you have an advice, I will definitely listen to you.  
  
  ---
  
  ## 0 answers
  
  