Comments (8)
@anirudhasundaresan I think the problem is from the algorithm itself... (I am not the author, but i implemented it).
Nowadays, i am busy for other submission (until next week).
I will look around the issue after i finish my work.
If you solve the problem before i start, please make a pull request !
from robuststl.
did you check whether the weights contains np.inf, NaN ?
Another possibility of the error is when np.sum(weights)=0
from robuststl.
@LeeDoYup I also get the same error. Yes, you are right, the weights are close to 0.
If there is a huge level shift from one time period to the next, i.e. |y_j - y_t| is large, then the denoising through bilateral filters involves computing the product of terms (which are close to 0. because of exponential factors). This causes the weights to go to zero. This problem is also amplified if the time period set is high. Do you have a workaround for dealing with this issue?
from robuststl.
I've encountered a similar error, probably for the same reason:
main:54: RuntimeWarning: invalid value encountered in double_scalars
Traceback (most recent call last):
File "", line 1, in
RobustSTL(y,12)
File "/Users/Common 1/SA/RobustSTL/RobustSTL/RobustSTL.py", line 121, in RobustSTL
return _RobustSTL(input, season_len, reg1, reg2, K, H, dn1, dn2, ds1, ds2)
File "/Users/Common 1/SA/RobustSTL/RobustSTL/RobustSTL.py", line 97, in _RobustSTL
trend_extraction(denoise_sample, season_len, reg1, reg2)
File "/Users/Common 1/SA/RobustSTL/RobustSTL/RobustSTL.py", line 36, in trend_extraction
delta_trends = l1(P,q)
File "/Users/Common 1/SA/RobustSTL/RobustSTL/l1.py", line 56, in l1
primalstart={'x': x0, 's': s0}, dualstart={'z': z0})
File "/Users/Shared/anaconda3/lib/python3.7/site-packages/cvxopt/coneprog.py", line 1033, in conelp
W = misc.compute_scaling(s, z, lmbda, dims, mnl = 0)
File "/Users/Shared/anaconda3/lib/python3.7/site-packages/cvxopt/misc.py", line 285, in compute_scaling
W['d'] = base.sqrt( base.div( s[mnl:mnl+m], z[mnl:mnl+m] ))
ValueError: domain error
I printed the value of s in coneprog.py just before line 1033 and found that it was all nan's.
from robuststl.
I am getting the same error for most of the time series. Does anyone has solved this or any idea?
from robuststl.
I think the error comes from l1 optimizer, which is a part of cvxopt library.
I didn't manually implement the l1.py, but use the part of cvxopt.
Can you debug which values have -7?
from robuststl.
I'm not sure, but I think when sol['x'] is NonType return sol['y'][:n] in 'l1.py' line 57.
from robuststl.
I'm seeing this as well, and (for me at least) the root cause is the weights returned by bilateral_filter
all go to zero causing nan's on the following line due to divide by zero
season_value = np.sum(weight_sample * weights)/np.sum(weights)
Edit: So the issue in my case was fixed by setting the bilateral_filter
hyper-parameters, in particular ds2
. Since the denominator is squared large values of | y_j - y_t | cause nan's so ds2 is required to scale this back
I have energy consumption data with daily and weekly seasonality - if I set T to daily (48 samples) then this issue occurs since there's a large difference between the weekday and weekend level at the same time of the day. I think there are other issues - if I train on a largish dataset in jupyter the kernel crashes
from robuststl.
Related Issues (16)
- Certificate of primal infeasibility found. HOT 2
- Is there any way currently to deal with trendy only signal ? HOT 1
- typo in run_example.ipynb HOT 1
- How is the period calculated? HOT 1
- Trend seems to depend on the first value of sample HOT 5
- unreachable code HOT 14
- Hi,DoYup !Function get_relative_trends has bug when sum delta_trends HOT 1
- What is the format of input? HOT 1
- is there any advice to predict the future steps ? HOT 1
- Update the numpy requirement HOT 1
- Is it going to be implemented in statsmodels?
- Time series reconstruction HOT 1
- memory error HOT 4
- How is RobustSTL used for prediction?
- issue from l1.py --- ValueError: Rank(A) < p or Rank([G; A]) < n
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from robuststl.