Comments (3)
u can try this way:
import numpy as np
DATA_PATH = './npydata/'
# read dataset
X_train = np.load(DATA_PATH + 'X_train.npy')
y_train = np.load(DATA_PATH + 'y_train.npy')
X_test = np.load(DATA_PATH + 'X_test.npy')
y_test = np.load(DATA_PATH + 'y_test.npy')
# convert to dataloader
X, y, splits = combine_split_data([X_train, X_test], [y_train, y_test])
tfms = [None, [Categorize()]]
dsets = TSDatasets(X, y, tfms=tfms, splits=splits, inplace=True)
dls = TSDataLoaders.from_dsets(dsets.train, dsets.valid, bs=64, batch_tfms=[TSStandardize()], num_workers=0)
where DATA_PATH is ur dataset with numpy form.
Whats more, tsai
library has specific format requirements for input data (such as X_train and X_test here). u can check this from their Tutorial: https://timeseriesai.github.io/tsai/tutorials.html
from tsai.
TypeError Traceback (most recent call last)
Cell In[81], line 13
10 X, y, splits = combine_split_data([X_train, X_test], [y_train, y_test])
11 tfms = [None, [Categorize()]]
---> 13 dsets = TSDatasets(X, y, tfms=tfms, splits=splits, inplace=True)
14 dls = TSDataLoaders.from_dsets(dsets.train, dsets.valid, bs=64, batch_tfms=[TSStandardize()], num_workers=0)
TypeError: unhashable type: 'numpy.ndarray'
then I have this error when I used your sentence.could you do me a favor that what I should do?thanks a lot.
from tsai.
Hey I am also facing this same issue. Were you able to resolve it? @Albertccy
from tsai.
Related Issues (20)
- AttributeError: 'TST' object has no attribute 'backbone'
- Bug with `prepare_forecasting_data` in v0.3.7 HOT 1
- Variable `sequence_length` ts for MiniRocket Pytorch
- get_long_term_forecasting_data fails HOT 2
- Does PartchTST work for categorical variables?
- Using MVP callback for pre-training a TSTabFusionTransformer multilabel classification model
- Q: Can i use TST for regression problem?
- Training LSTM for time series data
- PatchTST tutorial missing data HOT 2
- Support for anomaly detection / segmentation
- PatchTST pretrain
- TSiT Non-trainable parameters
- Misalignment in LSTM Application and Subsequent Operations in _TSSequencerEncoderLayer
- Output size
- Packed Padded Sequences as inputs in tsai?
- Facing Runtime error while trying to use L1Loss function in multivariate timeseries forecasting using patchTST.
- yolo implementation
- TSClassifier issue
- Which models can I use? TSRegressor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tsai.