Sliding Window (MACHINE LEARNING AND DEEPL LEARNING)

조회 수: 5 (최근 30일)
Saif Aljanahi
Saif Aljanahi 2021년 4월 28일
답변: Nazneen Kotwal 2022년 3월 4일
I can't figure out what is the purpose of the sliding window in preprocessing time-series data like an accelerometer sensor.
I kinda stick here, I want to preprocess my data and apply it to DL/ML algorithms.
But I'm having a hard time understanding this.
are there any textbooks to understand this?
also now I'm struggling in writing a code to do a sliding window over raw sensor data and extract some features like (mean, std, var, median, max, min,...etc) and put them in a vector.
Any help is appreciated.
  댓글 수: 2
Saif Aljanahi
Saif Aljanahi 2021년 4월 28일
Please guys help me, I'm new to all that.
Manju Rana
Manju Rana 2022년 3월 3일
I also need help for the same. I have raw data from IMU sensors. Now how to pre process it before applying ML algorithms

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

답변 (1개)

Nazneen Kotwal
Nazneen Kotwal 2022년 3월 4일
Given a sequence of numbers for a time series dataset, we can restructure the data to look like a supervised learning problem. The response will be based on the task you are trying to perform.
For example, to frame the task of Time series forecasting as a supervised learning problem, we can use previous time steps as features and use the next time step as the response variable. We can also use the previous time steps to extract relevant features (such as mean, max, etc) and use the next time step as the response variable. From what I understand, you would like to do the latter.
Data = (1:20)'; % Simple vector to verify output
myFunc = {@mean,@max,@min}; % Your functions
WindowLength = 5;
Features = zeros(length(Data)-WindowLength,length(myFunc));
for ij = 1: numel(myFunc)
fun = myFunc{ij};
for idx = 1:length(Data)-WindowLength
DataSubset = Data(idx:idx+WindowLength-1);
Features(idx,ij) = fun(DataSubset);
end
end
Response = Data(WindowLength+1: end);

카테고리

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