lifetimes icon indicating copy to clipboard operation
lifetimes copied to clipboard

Tolerence error;

Open wangk28 opened this issue 5 years ago • 3 comments

When fitting BetaGeoFitter with small sample size data, I always get the following message:

Desired error not necessarily achieved due to precision loss.

Thus resulting in ConvergenceError. When this error occurred, I have to manually set the a high tol in BetaGeoFitter and GammaGammaFitter. Is there a way that the tol can be automatically changed when facing precision problems?

wangk28 avatar Nov 14 '19 20:11 wangk28

With small sample size data, it's going to be more difficult to have the model converge. There probably isn't enough consistency in the data for the parameter fitting to find a stable combination. You can set a high tol, but you should actually be more concerned with getting more data instead.

Also, if you get some more data, try toying around with the penalizer_coef before messing with the tol.

psygo avatar Nov 19 '19 14:11 psygo

thanks for detailed explanation. However, the use case here is that there exists some extreme customers and behave quite different than others(highly-paid customers) which only covers a really small proportion of the training data(~0.1% and ~20 samples). Will high 'penalizer_coef' help solving such problem?

wangk28 avatar Nov 22 '19 03:11 wangk28

If these customers are such a low percentage of your data, they shouldn't be a convergence problem, the other customers should be able to smooth them out. I suspect your problem is elsewhere.

I suggest you share a sample of your data that has the same issue here, so others can help trying to solve it.

psygo avatar Nov 22 '19 12:11 psygo