Open robertclf opened 3 years ago
Multiple targets are currently not implemented but it is definitely on the roadmap.
oh! ok.
Thank you.
looking forward to this feature !! @jdb78 :)
Already implemented :) But some issues with the predict method that will be resolved shortly.
Hmmm weird, from the demo, when I changed to input target=["volume", "avg_volume_by_sku"]
like below,
training = TimeSeriesDataSet(
data[lambda x: x.time_idx <= training_cutoff],
time_idx="time_idx",
target=["volume", "avg_volume_by_sku"],
group_ids=["agency", "sku"],
min_encoder_length=max_encoder_length // 2, # keep encoder length long (as it is in the validation set)
max_encoder_length=max_encoder_length,
min_prediction_length=1,
max_prediction_length=max_prediction_length,
static_categoricals=["agency", "sku"],
static_reals=["avg_population_2017", "avg_yearly_household_income_2017"],
time_varying_known_categoricals=["special_days", "month"],
variable_groups={"special_days": special_days}, # group of categorical variables can be treated as one variable
time_varying_known_reals=["time_idx", "price_regular", "discount_in_percent"],
time_varying_unknown_categoricals=[],
time_varying_unknown_reals=[
"volume",
"log_volume",
"industry_volume",
"soda_volume",
"avg_max_temp",
"avg_volume_by_agency",
"avg_volume_by_sku",
],
target_normalizer=GroupNormalizer(
groups=["agency", "sku"], transformation="softplus"
), # use softplus and normalize by group
add_relative_time_idx=True,
add_target_scales=True,
add_encoder_length=True,
)
I am getting this error:
ValueError: Wrong number of items passed 2, placement implies 1
@jdb78
You might want to update the package.
I downloaded the master branch directly from zip
You are using the GroupNormalizer which can handle only one target. I suggest to use the MultiNormalizer or leave the argument empty to determine it automaticaly.
that did the trick, thanks
Hi @jdb78, just to confirm, is this
Already implemented :) But some issues with the predict method that will be resolved shortly.
related to this error?:
AssertionError: Prediction should only have one extra dimension
which occurs in to_prediction()
of metrics.py
when I run this in a multi-target setting:
# find optimal learning rate
res = trainer.tuner.lr_find(
tft,
train_dataloader=train_dataloader,
val_dataloaders=val_dataloader,
max_lr=10.0,
min_lr=1e-6,
)
Are you having the same issue with 0.8.3?
I'm sorry which one is 0.8.3 this referring to? I think don't worry about it I will just wait for you to finalize this first and then I will try again. Thanks.
Already implemented :) But some issues with the predict method that will be resolved shortly.
0.8.3 refers to the latest release. I think you might have something else misspecified such as no MultiLoss or MultiNormalizer. The new version will flag this.
Hello,
I'm facing an error using TimeSeriesDataSet when trying to setup the "target" parameter with a list:
It works fine setting the target with just one column name, but when using a 2-element list it throws:
I read that it supports a list, so I'm wondering what I could do to fix this or workaround this problem, please.
Thanks in advance!