I'm getting these type of logs:
Rejecting initial value:
Log probability evaluates to log(0), i.e. negative infinity.
Stan can't start sampling from this initial value.
Rejecting initial value:
Log probability evaluates to log(0), i.e. negative infinity.
Stan can't start sampling from this initial value.
Rejecting initial value:
Log probability evaluates to log(0), i.e. negative infinity.
Stan can't start sampling from this initial value.
Rejecting initial value:
Log probability evaluates to log(0), i.e. negative infinity.
Stan can't start sampling from this initial value.
Rejecting initial value:
Log probability evaluates to log(0), i.e. negative infinity.
Stan can't start sampling from this initial value.
Rejecting initial value:
Log probability evaluates to log(0), i.e. negative infinity.
Stan can't start sampling from this initial value.
Rejecting initial value:
Log probability evaluates to log(0), i.e. negative infinity.
Stan can't start sampling from this initial value.
Rejecting initial value:
Log probability evaluates to log(0), i.e. negative infinity.
Stan can't start sampling from this initial value.
Rejecting initial value:
Log probability evaluates to log(0), i.e. negative infinity.
Stan can't start sampling from this initial value.
Rejecting initial value:
Log probability evaluates to log(0), i.e. negative infinity.
Stan can't start sampling from this initial value.
Initialization between (-2, 2) failed after 100 attempts.
Try specifying initial values, reducing ranges of constrained values, or reparameterizing the model.
My data set is having y values in the range of 0 to 1 and some values are 0. So, obviously when I apply log on these values, it becomes some -ve number or - infinity. Please suggest what should be done when I have this sort of dataset.
@nikitagupta55
What you can do is increment your zero values with a small amount.
For example, you can use sys.float_info.epsilon:
import sys
sys.float_info.epsilon
>>> 2.220446049250313e-16
@maskani-moh
You mean, In my input data-set I should replace 0 values with sys.float_info.epsilon ?
That's what causes your error.
My data set is having y values in the range of 0 to 1 and some values are 0. So, obviously when I apply log on these values, it becomes some -ve number or - infinity
Things will not work with -Inf in the dataframe. You may also have been running into the bug from #182 which was just fixed, so do install the latest version from github.
https://github.com/facebookincubator/prophet/commit/1339aada960c6d49a319d6f70ebed14f5604d994 checks for Inf values and produces a more useful error.
@bletham , As I told earlier that in my dataframe I'm having values in the range of 0 to 1. So, what I thought is, I'll replace all the 0 values with NA's and and then take log of all the values so, that I will not get error like "Rejecting initial value: Log probability evaluates to log(0)".
Actually, I'm not getting this error also. But other error is coming like "ERROR: Percentiles must be in the range [0,100]Traceback (most recent call last)". I think this is because, I have values between 0-1 and the log of certain values is negative, that's why I'm getting this error. How do I resolve this error now?
Also, You said to install github version of prophet. How do I install it? pip install ....... ?
To install from github you can do as follows:
First, clone the repo:
git clone https://github.com/facebookincubator/prophet.git
Then run the setup.py file:
cd ./python
sudo python setup.py install
OR
You can use pip install and make it install the project from source repo on github:
pip install git+https://github.com/facebookincubator/prophet.git
@maskani-moh , following second way gives error : Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/06/80w3670d3h74s73p8gr45c5h0000gn/T/pip-4oc2iou6-build/
first way works fine
@maskani-moh @bletham On installing the github version. I'm still getting error:
ERROR: Percentiles must be in the range [0,100]Traceback
Also, I'm replacing 0's with .001 instead of NA's.
Are you by chance setting the input "interval_width" to something not betwen [0, 1]? This isn't very clearly described in the docstring, but it needs to be in [0, 1] (defaults to 0.8).
@bletham , I'm aware of this thing and I'm setting this to something between [0,1] .For eg: .95 etc.
Please guide what can be the problem?
Can you post the full traceback?
@bletham , no need. I checked it all over again. I was working with 2 codes simultaneously. When you pointed for confidence_interval, I checked it in both the codes. It was proper in first code while in other it was not. Thanks for this.
I am estimating the model through Bayesian Generalized method of moment
But the result of the coding is following anyone how to give me some suggestion that how I tackle this problem. would be greatly appreciated...
trying deprecated constructor; please alert package maintainer
Error in new_CppObject_xp(fields$.module, fields$.pointer, ...) :
no valid constructor available for the argument list
In addition: Warning message:
In readLines(file, warn = TRUE) :
incomplete final line found on 'C:\Users\Muhammad\Desktop\project1\stan_GEE1_ind.stan'
failed to create the sampler; sampling not done
@muhammad123zada It looks like RStan is not working. My guess would be that RTools isn't correctly installed. Check out the instructions here, and in particular follow the steps to verify that RTools is working:
https://github.com/stan-dev/rstan/wiki/Installing-RStan-on-Windows