Reputation: 87
I implemented a feed forward model and a recurrent model with deeplearning4j to detect anomalies in a 1D signal. Maybe I'm missing an abstraction but I thought I could solve this problem the following way:
Is this approach even possible? Do you have any ideas?
Upvotes: -1
Views: 157
Reputation: 807
It depends on how the structure to those defects looks like.
Given that you have a 1D signal, I expect that your examples are a sequence of data that is effectively a window over your continuous signal.
There are multiple ways to model that problem:
This works if all of your examples have the same length. In that case, you can make a normal feed forward network, that just takes a fixed number of steps as input and returns a single classification.
If your real data doesn't have enough data, you can pad it, and if it has more data than the example length, then you slide over the sequence (e.g. with a window size of 2 the sequence abcd turns into [ab], [bc], [cd] and you get 3 classifications).
As far as I know there is nothing in DL4J out of the box that implements this solution. But on the other hand it shouldn't be too hard to implement it yourself using RecordConverter.toRecord
and RecordConverter.toArray
to transform your real data into NDArrays.
Using a recurrent network, you can apply a neural network to any length of sequence data. This will likely be your choice if the faults you are looking for can have different lengths in the signal.
The recurrent network can have an internal state that gets updated on each call during inference and it will produce a classification after each step of your signal.
What the right solution is for you, will depend entirely on your actual concrete use case.
Upvotes: 1