Time series forecasting using deep learning with 2 numFeatures

조회 수: 2 (최근 30일)
israt fatema
israt fatema 2020년 9월 15일
댓글: israt fatema 2021년 2월 12일
How to use two input features to get 1 output using this example?
This example use 1 numFeatures, for example if i have time series data with 2 features, wind speed and temperature, how can i use this example to forecast weather?

채택된 답변

Anshika Chaurasia
Anshika Chaurasia 2020년 9월 30일
Hi Israt,
It is my understanding that you have two features as input and want to train the network with this input.
You could change numFeatures = 2 while defining sequenceInputLayer function as shown:
numFeatures = 2; %take 2 features as input
numResponses = 1; %give 1 output
layers = [ ...
sequenceInputLayer(numFeatures)
lstmLayer(numHiddenUnits)
fullyConnectedLayer(numResponses)
regressionLayer];
  댓글 수: 2
israt fatema
israt fatema 2020년 10월 29일
Thank you for the response. In this case how can i read and load the time series data with these two features such as wind speed and temperature?
The example contains a single time series, the output is a cell array, where each element is a single time step and then reshaped the data to be a row vector.
israt fatema
israt fatema 2021년 2월 12일
Hi, the Matlab example https://au.mathworks.com/help/deeplearning/ug/time-series-forecasting-using-deep-learning.html read 1 (one feature). I couldn't read more than 1 feature from the dataset (timeseries) if i want to use numFeatures = 2
%data = chickenpox_dataset;
%data = [data{:}];
How to read more than 1 (for example numFeatures = 2 and output = 1) feature from the dataset to get 1 output?
Thanks in advance.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by