-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pwlf with unknown line segments #88
Comments
Penalty parameters generally range from 1e-1 to 1e-6, and yes it's super arbitrary. If you are looking at automatically performing these fits in a more robust manner, check out this post #17 (comment) where I look for a variance ratio. You probably need at least 20 data points for that variance ratio to work. I think this is a very novel way to automatically fit these models (and I really need to write a paper on this). So the Bayesian optimization is trying to minimize the sum of square of residuals ( I would just try |
The variance is very high in your case, and you may benefit from trying this #17 (comment) but replace |
Thanks Charles, One other thing I am going to try is to smooth my data with a 7-day moving average, this will remove most of the noise in the data. I tried this averaging already, to get the data stationary, and the 7 day period gives the best results (clear trend). The reason I am trying your method is to have the piece-wise linear lines to check if there is a trend change after a known date. I can use the (known) date, but that won't prove that there is a trend change, that will (in my understanding) only show a different trend. |
Hi Charles, |
What was the F ratio for both cases? F = sigma_hat / sigma Maybe it's better to pick the one that is closest to 1.0, since one over and the other is under. |
I am trying to run the BayesianOptimization, and am trying to understand your function def my_obj(x):
-define some penalty parameter l
-you'll have to arbitrarily pick this
-it depends upon the noise in your data, --> how do you check this, and what are acceptable levels
-and the value of your sum of the square of residuals --> how do I find/obtain this number
Could you give some ranges and explain in more detail how the penalty parameter is affecting the results?
Your assistance would be most appreciated and a great help in understanding how the function works
The text was updated successfully, but these errors were encountered: