Clear Filters
Clear Filters

Use Convolution network for 1D data - regression to regression

6 views (last 30 days)
Hello
I am trying to use Convolution neural network for time series regression problem using MATLAB.
Below is my problem definition
Two time series inputs (signals)
A(t) = vector (1XN)
B(t) = vector (1XN)
2. One time series output (signal)
C(t) = vector (1XN)
3. 1000 sample inputs/outputs
A1(t), A2(t), A3(t), ……………………… A1000(t)
B1(t), B2(t), B3(t), ……………………… B1000(t)
C1(t), C2(t), C3(t), ……………………… C1000(t)
4. trainedNet = trainNetwork( X, Y, layers, options)
How do I set up X and Y arrays.
Per Matlab help “X is specified as a 4-D numeric array. The first three dimensions are the height, width, and channels, and the last dimension indexes the individual images.”
Matlab recommends use of reshape command but which array can be reshaped.
Height = 2;
Width = N;
Channels = 1;
Sample = M;
X_tmp = ……
X = reshapre(X_tmp, [height, width, channels, sampleSize]) ; % but how to setup X_tmp
How to set up Y
N-by-1 cell array of numeric sequences, where N is the number of observations. The sequences are matrices with r rows, where r is the number of responses. Not clear from the description.
How about layers to be used for network --
layers =
convolution2dLayer(R,S,'Padding','same')
reluLayer
............
maxPooling2dLayer(2,'Stride',2)
fullyConnectedLayer(1)
regressionLayer];

Answers (1)

Walter Roberson
Walter Roberson on 3 Jul 2018
X = cat(4, A{:});
However, I doubt that the tool will be willing to work with 1D data.

Categories

Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!