From 6013755c03782b531ca17bdc0e44b767452a7590 Mon Sep 17 00:00:00 2001 From: bogdan-XT Date: Fri, 4 Sep 2020 22:18:09 +0300 Subject: [PATCH] Add info for Signal Processing and Training modules --- content/pybytes/mlintegration/features.md | 38 +++++++++++++++++++---- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/content/pybytes/mlintegration/features.md b/content/pybytes/mlintegration/features.md index 816202e..858a220 100644 --- a/content/pybytes/mlintegration/features.md +++ b/content/pybytes/mlintegration/features.md @@ -18,21 +18,47 @@ The data collection shows the collected samples. Click on the sample to see the ![Data Acquisition](/gitbook/assets/pybytes/ml/data_acquisition_graph.png) -### Processing +### Signal Processing -#### Raw Data +Signal processing is used to extract features for the Neural Network module. -In the processing tab, the Windows Size and Windows Step should be filled. Select the data range on the graph to fill the Windows step. +There are many ways to extract features. The simplest way is using convolutional layers, but doing this there is no control of what features will be used and also the convolutional layers make the neural network bigger, so more data is needed for training. -#### Spectral Analysis +Signal processing provides an easy and intuitively way to extract features and also the features can be analyzed using different methods. -After selecting the data range to be analyzed. Fill the form and click in the button **Process Signal** +The input data consists from accelerations values on three axes (X, Y, Z). To analyze the data, a window of a certain size is moved over the data using a moving step. The Window Size and Window Step are model specific and they are defined in the Model Configuration tab. This window is received by the signal processing block as input. + +##### Standardization + +First, the window data can be standardized by subtracting the average and dividing it by its standard deviation, thus obtaining a window with zero mean and a variance equal to one. + +##### Filter + +After the window is standardized, a filter can be applied to the data. The type of the filter (none, low-pass, high-pass), the cutoff frequency and the filter order can be selected by the user. + +##### Features + +Using Fourier analysis (FFT transform), features are extracted from the data. Time localization is lost if the Fourier transform is applied to the entire window data. To keep some information about time localization, the user can split the window data in smaller intervals and analyze each interval separately (this is the short-time Fourier transform). + +Features are calculated for every axis (X, Y, Z), independently of other axes. The next features are available to be selected/used by the user: + +- The root mean square. It is the square root of the arithmetic mean of the squares of the values. +- FFT peaks. First peaks from FFT values, to be used as features. +- Spectral Power on intervals. Mean of the squares of the FFT values, on specified frequencies intervals. + +##### Select Features + +To select the desired features and also to see the filtered data and calculated FFTs, select the data window to be analyzed, fill in the form and click the **Process Signal** button. ![Processing](/gitbook/assets/pybytes/ml/processing.png) #### Training -Fill the Neural Network Settings form and click on **START TRAINING** to train the model. +The neural network receives its input from the Signal Processing block. + +The number of layers and the number of neurons in this layer can be selected by the user. For the moment there are supported only dense layers as hidden layers. Other parameters that can be selected are: the number of training epochs, the learning rate and the confidence threshold. + +To train the model, fill the Neural Network Settings form and click on **START TRAINING** button. The results can be checked on the Training Performance section.