Question: [![enter image description here](https://i.stack.imgur.com/LlJlS.jpg)](https://i.stack.imgur.com/LlJlS.jpg)I have a univariate time series (there is a value for each time sampling) (sampling time: 66.66 micro second, number of samples/sampling time=151) coming from a scala customer

This time series contains some time frame which each of them are 8K (frequencies)\*151 (time samples) in 0.5 sec [overall 1.2288 millions samples per half a second)

* I need to find anomalous based on different rows (frequencies)
Report the rows (frequencies) which are anomalous? (an unsupervised learning method)

Do you have an idea to which statistical parameter is more useful for it? or is it possible to evaluate without time sampling?

Do have an idea about suitable fast method (with lowest time delay: therefore some algorithm like kmeans does not work)

I should produce online automated ML

Answer: 
It is straightforward to stack different neural networks with current deep learning frameworks (i.e., PyTorch or TensorFlow). There is no separate output for $r$, it just one of many layers.

It could look like this:
[![enter image description here](https://i.stack.imgur.com/Fc7UQ.png)](https://i.stack.imgur.com/Fc7UQ.png)

You can freeze or not freeze any layers in a stacked neural network. You can decide how far to backpropagate the training updates.

The advantages of unfreezing layers is that the model can learn better feature representations. The disadvantages of unfreezing is that training can take longer for very deep neural networks.
First of all: probably you should not train with the loss you propose, because with MSE you will train to minimize the total error, not to keep the features as they were, which is what CNNs are good at detecting; this is the same problem as what happens when you [train an image autoencoder on MSE, that you obtain blurry images](https://ai.stackexchange.com/q/8885/1315). Instead, configure the network as you want, reusing layers from the networks you deem appropriate, with the needed adaptation layers, and then train the whole network on the task that you need your network to do (e.g. classification).

When doing so, you can choose to only train some parts of the network, or train them at different learning rates. These are some potential alternatives:

1. Freeze all the layers except the adaptation ones. The original weights of the reused layers will remain as they originally were.
2. Train the adaptation layers at a normal learning rate and the other layers at a very small learning rate. This is typical of transfer learning setups and it aims at making the learning more flexible.