majestickhan / nowcasting-python Goto Github PK
View Code? Open in Web Editor NEWPython Nowcasting
License: BSD 3-Clause "New" or "Revised" License
Python Nowcasting
License: BSD 3-Clause "New" or "Revised" License
thanks for your code! I find freqs with [day, week, month,quarter, year] in your code, but the example code just use month and quarter data. Is there any way that I can use your code with yearly data?
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.