Comments (3)
@ArianKhorasani could you provide the entire error trace? Itβs not clear which assertion is failing
from gluonts.
@lostella - the error trace that I provided is the entire error that I get. Please check the screenshot below too:
from gluonts.
Dear @lostella - I have already checked the dimension of my multivariate time series too. Putting my whole dataset code below:
```
variables = ['DBP', 'SBP', 'Resp', 'Temp', 'HR', 'O2Sat', 'MAP']
df_actual = pd.read_csv('merged_test.csv')
static_features = df_actual[['patient_id', 'Age', 'Gender', 'HospAdmTime']].drop_duplicates().reset_index(drop=True)
df_residuals = pd.DataFrame()
for variable in variables:
# First, let's load forecasted values
df_forecast = pd.read_csv(f'forecasts_{variable}.csv')
# Ensure that the data are ordered in the same way
df_actual = df_actual.sort_values(by=['patient_id', 'ICULOS'])
df_forecast = df_forecast.sort_values(by=['patient_id', 'ICULOS'])
# Calculate residuals
residuals = df_actual[variable] - df_forecast[f'{variable}_forecast']
# Add residual to df_residuals
df_residuals[variable] = residuals
df_residuals['patient_id'] = df_actual['patient_id']
df_residuals['ICULOS'] = df_actual['ICULOS']
# Convert df_residuals to ListDataset
data_residuals = []
for patient_id, group in df_residuals.groupby('patient_id'):
target = group[variables].values # Use the residuals as target
start = pd.Timestamp("1970-01-01 00:00") + pd.Timedelta(hours=group['ICULOS'].iloc[0])
entry = {
FieldName.TARGET: target,
FieldName.START: start, # Use the index as the start date
FieldName.FEAT_STATIC_CAT: static_features[static_features['patient_id'] == patient_id][['Age', 'Gender']].values[0]
}
data_residuals.append(entry)
dataset_residuals = ListDataset(data_residuals, freq='1H', one_dim_target=False)
```
from gluonts.
Related Issues (20)
- mxnet version is not compatible with jupyter notebook in Ananconda
- stable documentation SimpleFeedForwardEstimator example does not work HOT 2
- Cannot script PyTorch model
- Issue with frequency since pandas 2.2.0 in the DeepAREstimator HOT 4
- gluonts.torch.distributions.BinnedUniformsOutput raises AttributeError
- add millisecond L and microsecond U support in `time_feature` HOT 1
- TypeError while using PiecewiseLinearOutput as distribution output with torch version GluonTS 0.14.3
- Cannot use iTransformer with GluonTS version 0.14.4 HOT 2
- Support pydantic-2.5.3 HOT 2
- Notebook problem HOT 1
- Deserialize on CPU-only machine a model trained in colab (using gpu) HOT 1
- Inference Single Item on model trained on Multiple Items HOT 5
- Performance regression in negative binomial from 0.12 to 0.13 and onwards (at least for DeepAR in PyTorch) HOT 7
- INDEX OUT OF RANGE IN SELF -- Pytorch GluonTS for large datasets
- ValueError: setting an array element with a sequence. The requested array has an inhomogeneous HOT 1
- Missing changelog for 0.14.0
- metric mase
- Randomness Control in DeepAR. Advice Needed.
- support pandas 2.2.x HOT 1
- Evaluation multiple windows took too long HOT 1
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 gluonts.