Multivariate Time Series Classification Tutorial with LSTM in PyTorch, PyTorch Lightning and Python

preview_player
Показать описание

In this tutorial, you'll learn how to convert sequences of sensor data to classify the surface on which a robot currently is. We'll use PyTorch Lightning to build a data module and an LSTM model for sequence classification. How accurate will our model be?

#TimeSeries #PyTorch #Python #LSTM #Classification #Tutorial
Рекомендации по теме
Комментарии
Автор

15:41: Making the PTL LightningDataModule.
20:04: Making the SequenceModel, which extends Pytorch nn.Module.
23:40: Making the PTL LightningModule.

RedShipsofSpainAgain
Автор

Thanks! can you share the notebook created here?

DTrackFinder
Автор

Great videos man, many thanks. Could you also provide the links for the source code.
Thanks for your great work 👍🏼

amineleking
Автор

You explained each step very clearly. Thanks man!

sayederfanarefin
Автор

What happens when the sequence lengths are not the same? Say, for example, one was 128 and another was 130. What would you do in this case?

aliyaqoob
Автор

Thanks for the great content. Why do you not normalize or standardize your data before feeding it into the LSTM?

mukeshnarendran
Автор

Thank you for the insightful video! In this implementation we assume that all the instances in a sequence have the same label. What if the label of instances within a sequence are not the same and change within the sequence? How should we add the label information into the sequence?

mertmermerci
Автор

How is it common to apply padding when the data length does not match?

유영재-cc
Автор

Could you pls explain it using tensorflow?

elizabethm.j
Автор

Hey, is it not necessary to temporally split the data while creating training and testing data sets?

Octane
Автор

Awesome video mate. Do you have one on timeseries classification with MLP?

anonproxy
Автор

Hi Venelin. I watched your forecasting and classification videos, both are useful and great. I wonder if I can do classification and forecast at the same time using the same dataset. Do you have any idea on this? thanks

gmcobrazt
Автор

I'm getting this error:
TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.

Would you mind sharing the source code? That would help a lot

karlbooklover
Автор

Hi, do you do the normalization before the modeling?

zakkyang
Автор

Hi, are you planning to share the code with Github?

countrylifemoments
Автор

Nice tutorial, i like to see more such videos👍
Is it possible to teach some pytorch lightning in depth video?

robertjesuraj
Автор

Thank you for this great video!
Pleeease make some more videos about Time Series Forecasting!!
I would love to see them and to share them with friends.
regards from Austria

alteshaus
Автор

Hello, Venelin! Thank you for this! I followed all your code step-by-step, but I get this error:

RuntimeError: stack expects each tensor to be equal size, but got [0] at entry 0 and [1] at entry 3

What needs to be done to fix this?

jeromeanthonyalvarez
Автор

I followed your approach, took notes and am getting the following error when I try to initialize the SurfacePredictor


TypeError Traceback (most recent call last)
in <module>
----> 1 model = SurfacePredictor(
2 n_features = len(FEATURE_COLUMNS),
3 n_classes = len(label_encoder.classes_)
4 )

in __init__(self, n_features, n_classes)
5 def __init__(self, n_features: int, n_classes: int): # our constructor (int specifies featurs to integers)
6 super().__init__()
----> 7 self.model = SequenceModel(n_features, n_classes) # initialize the model by taking the number of features and classes
8 self.criterion = nn.CrossEntropyLoss() # criteria for classification
9

TypeError: __init__() takes 1 positional argument but 3 were given

Any thoughts on what I may be doing wrong?

AReece
Автор

I am getting an error that 'SequenceModel' object has no attribute 'classifier'. Does anyone know why nn.Module doesn't have 'classifier' attribute?

sang-hunsim