You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The point is: my user is getting through the target action more then once, without starting a new experiment. So Beta parameter b was negative. This fix limits the conversions maximum at the participants number of the alternative.
I believe a better approach would be warn the user that this is happening and telling him to reconsider his experiment so as user cannot hit conversion more then once before restarting the experiment.
What do you guys thing? If this is the way I can do this :)
I got same error on a dev env ON MY SECOND PROJECT using split gem with the default redis config.
I eliminated the error by specifying a db name in config/initializers/redis.rb thus:
$redis = Redis.new(db: 2) # default config uses localhost:6379
Just hit the same problem. I use forcing a parameter with the URL override option. It initially worked fine and completed the experiment with the actual selection and not the override. But then I hit this after I restarted my server and went through the process again.
In other words, I finished the experiment twice I believe, one with the override parameter and another time after that (also with the override). I got
Alpha and beta parameters must be positive. Received a = 2 and b = -1
I can also verify that you can increase the alpha by finishing the same experiment without the override option on (removed from URL).
Just to let you know, my error was that in the code wasn't clear when the test started and when it finishes. Sometimes it wasn't starting but finishes, so the error triggered.
What I did to avoid it was to change the name of the metrics, so the alfa and beta counters start again (a=0, b=0), and then I analyze the code to be sure that the start/finish of the a/b test was logically correct.
Shouldn't the gem detect this? There is a user session associated with the finish action. A user should not be able to finish the same experiment more than once. Also if the experiment hasn't started, the user should not be able to finish it.
I had this same error. Somehow in making a new feature my staging environment's data became invalid, causing the error at the top of this issue. After much investigation, I ended up being able to fix it in the console, it was not a (current version) code problem. I thought I'd share what fixed it. The first three commands get information and the last one fixed the problem because completed_count was bigger than participant_count for one experiment.
Activity
jdanielnd commentedon Oct 13, 2014
It seems the problem is with this line: https://github.com/andrew/split/blob/f767cb79eb0ccc6d26a9b06a0dfe36a7bdc9cf68/lib/split/experiment.rb#L377
Maybe the user is getting to conversion from a direct path and then conversions is bigger than participants? This would lead to negative parameter...
jdanielnd commentedon Oct 13, 2014
This fixes the error, but I'm not sure the validity of the solution.
jdanielnd@954f186
The point is: my user is getting through the target action more then once, without starting a new experiment. So Beta parameter b was negative. This fix limits the conversions maximum at the participants number of the alternative.
I believe a better approach would be warn the user that this is happening and telling him to reconsider his experiment so as user cannot hit conversion more then once before restarting the experiment.
What do you guys thing? If this is the way I can do this :)
andrew commentedon Oct 14, 2014
@caser do you have any thoughts on this?
johnknapp commentedon Oct 23, 2014
I got same error on a dev env ON MY SECOND PROJECT using split gem with the default redis config.
I eliminated the error by specifying a db name in config/initializers/redis.rb thus:
$redis = Redis.new(db: 2) # default config uses localhost:6379
I hope this helps.
skwp commentedon Nov 10, 2014
Same problem here, upgraded from 0.6.0 to latest 1.0 gem
yagudaev commentedon Feb 25, 2015
Just hit the same problem. I use forcing a parameter with the URL override option. It initially worked fine and completed the experiment with the actual selection and not the override. But then I hit this after I restarted my server and went through the process again.
In other words, I finished the experiment twice I believe, one with the override parameter and another time after that (also with the override). I got
I can also verify that you can increase the alpha by finishing the same experiment without the override option on (removed from URL).
robquesada commentedon Mar 11, 2015
Same error here. Not resolved yet.
igor-brishkoski commentedon Apr 15, 2015
Same thing.
robquesada commentedon Apr 15, 2015
Just to let you know, my error was that in the code wasn't clear when the test started and when it finishes. Sometimes it wasn't starting but finishes, so the error triggered.
What I did to avoid it was to change the name of the metrics, so the alfa and beta counters start again (a=0, b=0), and then I analyze the code to be sure that the start/finish of the a/b test was logically correct.
igor-brishkoski commentedon Apr 15, 2015
Thanks @robquesada. That worked. So the issue is that I finish the experiment more times than I start the experiment?
robquesada commentedon Apr 15, 2015
Yeah, that it seems to be.
yagudaev commentedon Apr 15, 2015
Shouldn't the gem detect this? There is a user session associated with the finish action. A user should not be able to finish the same experiment more than once. Also if the experiment hasn't started, the user should not be able to finish it.
b264 commentedon Aug 19, 2015
I had this same error. Somehow in making a new feature my staging environment's data became invalid, causing the error at the top of this issue. After much investigation, I ended up being able to fix it in the console, it was not a (current version) code problem. I thought I'd share what fixed it. The first three commands get information and the last one fixed the problem because completed_count was bigger than participant_count for one experiment.
derricklannaman commentedon Sep 18, 2015
@theB264 That worked for me. Thanks!
FIX Negative numbers on non-finished
alexander-bal commentedon Jun 7, 2016
the fix is in the master
andrew commentedon Jun 13, 2016
Fixed by #408
FIX Negative numbers on non-finished