Code Monkey home page Code Monkey logo

nowcasting-python's People

Contributors

majestickhan 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

Watchers

 avatar  avatar  avatar

nowcasting-python's Issues

Release Dates

Hey,

I dont know if this is an issue with how I am formatting data or something else, but I am trying to run the code on dataframes which have different release dates.

As a result I have formatted the data in a weekly format with NAs in between.

When I run this code i then either get the error:

ValueError: expected square matrix

or

ValueError: Internal work array size computation failed: -5

Ideally I would also be able to run with actual weekly data as an input.

Have attached the relevant files and would love any thoughts you have?
Spec_US_example.xlsx

2016-06-29.xlsx

Next steps

Unit testing

  • Create unit test to ensure python model is working properly

Graphs and formatting

  • Plotting graphs: finished plotting graphs for example_dfm.py in plot
  • Plot loglik in Plotly
  • Branch plot has been merged to the master. Should be able to see the graphs that are show in the Matlab code.

Comments:

  • Next set of tasks is working on creating unit tests

About update_Nowcast.py

Thanks for sharing your code.
Recently I'm learning about nowcasting models, your code is just what I need.
But I got something wrong when running your update_Nowcast.py,so I tried to fix it.

When I change the vintage, I may got error on line 407 ~ line 422,so I rewrite like this

for jk in range(1, lag + 1):

    Plag.append(np.zeros(Plag[0].shape))

    for jt in range(Plag[0].shape[0], lag, -1):

        As = np.matmul(np.matmul(Vf[jt-jk-1], A.T), np.linalg.pinv(np.matmul(np.matmul(A, Vf[jt-jk-1]), A.T) + Q))

        Plag[jk][jt-1] = np.matmul(As, Plag[jk-1][jt-1]) 

Also you mention that weight seems suspicious.
I find a mistake on line 281,it should be
if t_miss[j] > t_miss[i]:

I'm not sure whether line 245 should like this
m = max(t_miss[i],t_fcst[0])

Finally, I run the code with vintage_old = '2016-11-30' and vintage_new = '2016-12-23'.
I can get these:

          2016-11-30 nowcast:              2.80471
  Impact from data revisions:      0.10666
   Impact from data releases:      -0.49701
                                 +_________
                Total impact:      -0.39035
          2016-12-23 nowcast:              2.41436

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.