23 Commits

Author SHA1 Message Date
wassname 01663eb05f some poor results 2022-12-24 12:36:51 +08:00
wassname 204aed2371 poor results 2022-12-24 07:37:19 +08:00
wassname 6c84953ac1 fixes 2022-12-23 19:00:56 +08:00
wassname f6d1884c4c fixes 2022-12-23 15:14:17 +08:00
wassname 3fb53f620e wip 2022-12-23 14:34:54 +08:00
wassname ae2b7a6878 add ou noise, and not flattening 2022-12-23 12:51:19 +08:00
wassname f31af603e4 starting on timegrad 2 2022-12-23 12:18:12 +08:00
Kashif Rasul 62a18cfd0f fix input_size
fixes issue #100
2022-06-18 10:11:37 +02:00
Kashif Rasul 7c31deeb17 updated notebook 2021-05-17 16:32:29 +02:00
Kashif Rasul 0053eceaf1 Temporal fusion transformer (#40)
* initial tft model

* fixes

* fix FeatureProjector

* fixed attention module

* added quantile loss output

* added predict

* added tft_transform from gluonts

* requires tensor_split

* comment out key_padding_mask

give nans on GPU

* added example
2021-04-15 19:10:55 +02:00
Kashif Rasul 903c6c2469 fixed api 2021-04-12 09:53:03 +02:00
Samuel Norling c4f6445d11 Updated Solar example (#43) 2021-03-06 17:44:34 +01:00
Kashif Rasul 41b3d7f883 fixed device name to cuda 2021-02-17 10:38:50 +01:00
Kashif Rasul 908945b422 Time grad (#28)
* initial uncond image gaussian diff

TODO make it work for multivariate vector
add conditioning

* remove tqdm

* initial unet

TODO convert to 1d conv

* initial time grad estimator

* initial training

* initial sampling

* added huber loss

* use SinusoidalPosEmb from wavegrad

* use time diff network

* fix reshaping

* fix missing property

* clip false

* updated api

* added padding

* added circular padding

* use linear schedule

* added more schedules

* added back cosine schedule

* Delete Solar-time-grad.ipynb

* updated estimator API

* not tuple

* renamed to EpsilonTheta

* removed

* added example notebook

* removed some output

* fix requirements

* formatting

* added more options to time-grad

* added article
2021-02-11 10:09:25 +01:00
Dr. Kashif Rasul 2726bc94ec added back TransformedIterableDataset 2020-12-18 13:02:26 +01:00
Dr. Kashif Rasul b072ab227b initial gluonts dependency 2020-12-17 17:04:56 +01:00
Adele Gouttes e3b8de5da9 ASF-3099 Implement IQN in pytorch-ts (#21)
* ASF-3099 Bootstrap: write backbones of test, distribution and distribution output

* ASF-3099 First proposition for IQN distribution output
Mostly for backbones, the functions themselves are far from final

* ASF-3099 Add sample() to ImplicitQuantile and its test

* ASF-3099 Test prediction, sampling and convergence logic for IQN

* ASF-3099 IQN module takes the data input and taus in

* ASF-3099 Add torch.no_grad in the sampling

* ASF-3099 Add tests on quantiles (10%, 90%), for both normal and uniform

* ASF-3099 Improve feeting of quantile function:
Increase depth of quantile network, change activation to PReLU

* ASF-3099 Fix distribution attributes and module imports

* ASF-3099 Fix implicit quantile init

* ASF-3099 Add integration test with deepAR

* ASF-3099 Add a transformed distribution

* ASF-3099 Fix init of ImplicitQuantile

* ASF-3099 Make iqn distribution compatible with forecast-length>1

* ASF-3099 Fix device for new tensors

* ASF-3099 Fix device for new tensors: device is not a function...

* ASF-3099 Fix output size of the network

* ASF-3099 Define torch network in the DistributionOutput only
Distribution takes only the predicted quantiles, or the parameters
of the trained model to define a new quantile function

* ASF-3099 Test: create quantile function on compatible device
Attempt: class method might force the module to be created only once,
not necessarily with the right device

* ASF-3099 Second attempt: create quantile function on compatible device

* ASF-3099 Sampling returns a tensor of the correct shape
Shape is (num_sample, batch_size, forecast_length)

* ASF-3099 Handle empty sample shapes

* ASF-3099 Fix tau device at inference time

* ASF-3099 Fix device of the layer

* ASF-3099 Handle empty sample shapes (fix output)

* ASF-3099 Last activation of quantile layer should be removed
That way, embedded quantiles are symetrically distributed around the 0.5
quantile. Otherwise we distort part of their distribution before applying
it to the forecasted quantities

* ASF-3099 (test) Add a bunch of layers

* ASF-3099 [test] reduce the embedding size of tau

* ASF-3099 [test] Use same IQN version as in sales forecaster

* ASF-3099 Put original parameters back

* use @torch.no_grad() decorator

* ASF-3099 [test, to be reverted] Remove - in front of the loss

* ASF-3099 Revert former commit: put - back in the loss

* ASF-3099 [fix] Add log_prob method in piecewise linear

* ASF-3099 [test] ImplicitQuantileModule should be instanciated only once
Current problem: it's instanciated once at training and once at prediction,
as if the model was never trained. Thus it is now defined as a
global variable. However, this can only be a temporary hack: it means that
only one model can be trained during a session.

* ASF-3099 [test] ImplicitQuantileModule should be instanciated only once
Current problem: it's instanciated once at training and once at prediction,
as if the model was never trained.
However here, if the same model is retrained in the same session,
the module is not reset.

* ASF-3099 Add notebooks for experiments

* ASF-3099 [test] Move module to the distribution

* ASF-3099 Class method for args_proj

* ASF-3099 Clean up

* ASF-3099 More clean up

* ASF-3099 Define options for domain of preditected quantiles
Predicted quantiles can be either positive, either real

* ASF-3099 Set quantile_arg_proj in the init of the distribution output
Before it was instanciated once per python session, thus when retraining
the same models, the previously trained module was used, and not a fresh
one

* ASF-3099 Add test on number of instantiation of the quantile_arg_proj

* ASF-3099 Add an example notebook

* ASF-3099 Remove some notebooks

* ASF-3099 Remove diff vs master

Co-authored-by: Kashif Rasul <kashif.rasul@zalando.de>
Co-authored-by: Mateusz Koren <mateusz.koren@zalando.de>
Co-authored-by: Adele Gouttes <agouttes@bm1-lxslurmctl01.corp.ad.zalando.net>
2020-10-01 15:52:04 +02:00
Kashif Rasul 9173b0a8c3 revert changes 2020-09-17 09:33:16 +02:00
Kashif Rasul 4aa176186a initial piecewise linear distribution (#22)
* initial piecewise linear distribution

test is failing though

* typo

* added more tests

* added TransformedPiecewiseLinear and output

* added test_robustness and fixed typos

* more typos

* fix issue with torch.where

* sample without grad

* added license
2020-09-17 09:29:19 +02:00
Kashif Rasul 79ac528398 added m5 forecast 2020-09-03 10:58:41 +02:00
Dr. Kashif Rasul c21a353d5c fix typo 2020-05-25 12:32:31 +02:00
Dr. Kashif Rasul 674929344b added multivariate Flow example
for issue #12
2020-05-25 12:25:55 +02:00
Dr. Kashif Rasul ea2c05de7f updated readme 2020-03-11 15:11:14 +01:00