How can I reduce the number of columns without losing the data quality

조회 수: 3(최근 30일)
James Muwanguzi
James Muwanguzi 2021년 10월 7일
답변: Shivam Singh 2021년 10월 12일
I have an LSTM code, the YTrain and XTrain have different number of Columns, how can I reduce the number of columns of YTrain to match the number of Columns of XTrain without losing the data quality?
  댓글 수: 2
James Muwanguzi
James Muwanguzi 2021년 10월 11일
This is my full code. I need to adjust the size of the YTrain to match that of XTrain or either way round because the X-axis of the Ytrain has more steps than the X-axis of the Xtrain although they both have the same end magnitude.
I was thinking about interp1 function although am not sure which suits me best.

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

답변(1개)

Shivam Singh
Shivam Singh 2021년 10월 12일
Hello James,
You can downsample your datapoints of YTrain using downsample function.

Community Treasure Hunt

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

Start Hunting!

Translated by