Giter VIP home page Giter VIP logo

ast's Introduction

1. Download data

electricity: https://archive.ics.uci.edu/ml/datasets/ElectricityLoadDiagrams 20112014 traffic: https://archive.ics.uci.edu/ml/datasets/PEMS-SF solar data: https://www.nrel.gov/grid/solar-power-data.html wind: https://www.kaggle.com/sohier/30-years-of-european-wind-generation

2. Preprocess data

python preprocess_data.py

3. Train and evaluate the model

python train_gan.py --dataset elect --model test --dataset The name of the preprocessed data --model the position of the specific params.json file under the folder of "experiments".

ast's People

Contributors

hihihihiwsf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ast's Issues

Params.json example

Hi @hihihihiwsf ! Congratulations for your very interesting paper and thank you for sharing the code ! I am trying to run your code, could you please provide an example of your params.json file ?

requirement.txt

Hi, Thanks for your code sharing. Could you please attach a corresponding requirement file for the necessary libraries?

There seems to be something wrong with function test() in gan_transformer.py ?

def test(model, params, x, v_batch, id_batch):
batch_size = x.shape[0]
sample_mu = torch.zeros(batch_size, params.predict_steps, device=params.device)
sample_q90 = torch.zeros(batch_size, params.predict_steps, device=params.device)
src_mask, memory = model.encode(x[:, :params.predict_start,:], id_batch)
for t in range(params.predict_steps):
ys = x[:, params.predict_start:params.predict_start+t+1,:]
out = model.decode(memory, ys, id_batch, src_mask)
q50, q90 = model.generator(out)
if t!=0:
q50 = q50[:, -1]
q90 = q90[:, -1]
sample_mu[:, t] = q50 * v_batch[:, 0] + v_batch[:, 1]
sample_q90[:, t] = q90* v_batch[:, 0]
if t < (params.predict_steps - 1):
x[:, params.predict_steps+t+1, 0] = q50
return sample_mu, sample_q90

  1. In the loop "for t in range(params.predict_steps):", the loop executes once and returns?
  2. When forecasting, the value of the prediction range is unknown. Why is ys = x[:, params.predict_start:params.predict_start+t+1,:] is used as the input of the decoder.
  3. if t < (params.predict_steps - 1): x[:, params.predict_steps+t+1, 0] = q50 What does this step mean?

code

I wonder if it is possible to share your code in github?

How to update the q90?

In this lines,The self.q90 tensor could not do backwards,How can it to update the parameters?

class Generator(nn.Module):
    def __init__(self, params):
        super(Generator, self).__init__()
        self.q50 = nn.Linear(params.d_model, 1)
        self.q90 = nn.Linear(params.d_model, 1)

Code to reproduce experiments

Hi, many thanks for releasing this code. I am wondering whether you would be able to upload any code to reproduce the experiments from the paper? In particular, it would be great to see how you built vanilla transformer and sparse transformer, then evaluated their performance against AST. Thanks again!

how does the embed() work in gan_transformer.py?

Hi, thanks for your code sharing. I tried to run the training process, but I am stuck in many Ipython sections, there is no description about how did you guys use Ipython in the code running process. Could you share this parts also?

The data set

Can you send me the elect data set? I can't download the elect data set.Thank you very much!
Thanks a million!
Email: [email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.