better / convoys

Implementation of statistical models to analyze time lagged conversions
https://better.engineering/convoys/
MIT License
254 stars 42 forks source link

fix numerical issues with the nonparametric model #29

Closed erikbern closed 6 years ago

erikbern commented 6 years ago

Found a few issues

After these changes, Weibull estimation of synthetic Weibull data lines up fairly well with the nonparametric estimation

image

image

erikbern commented 6 years ago

🤔 still looks like there's a mild bias in the distribution... not sure what's up

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.04%) to 86.126% when pulling fdf182e4cbe7c3989731e76efb4e564a3964b6bf on nonparametric-numerical-issues into a5f213bc5fd9ce0212a8c45ad0a31693ac935e22 on master.

erikbern commented 6 years ago

This seems like a marginal improvement but I'm still not 100% sure about the nonparametric model... will investigate more. Merging for now

erikbern commented 6 years ago

Think I figured out what's up. If z ~ N(m, s) and m < 0 then E(sigmoid(z)) > sigmoid(m) so you end up accumulating a bunch of positive biases. The MLE actually doesn't have the same problem.

Will think of some way to fix this, probably entails getting rid of the cumsum stuff