Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
more deprecations and pinning pytest-cov
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Jan 7, 2019
1 parent 9a0c416 commit f74e195
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ flake8
autopep8
pytest
matplotlib
pytest-cov
pytest-cov==2.5.1
pytest-mpl
coveralls
pydocstyle
Expand Down
5 changes: 2 additions & 3 deletions lifetimes/fitters/beta_geo_fitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
where, exp
from numpy import ones_like
from pandas import DataFrame
from scipy.special import gammaln, hyp2f1, beta, gamma
from scipy import misc
from scipy.special import gammaln, hyp2f1, beta, gamma, logsumexp

from . import BaseFitter
from ..utils import _fit, _scale_time, _check_inputs
Expand Down Expand Up @@ -164,7 +163,7 @@ def _negative_log_likelihood(params, freq, rec, T, weights, penalizer_coef):
(r + freq) * log(rec + alpha)
A_4[isnan(A_4) | isinf(A_4)] = 0
penalizer_term = penalizer_coef * sum(np.asarray(params) ** 2)
return - (weights * (A_1 + A_2 + misc.logsumexp(vconcat[A_3, A_4], axis=1, b=d))).mean() \
return - (weights * (A_1 + A_2 + logsumexp(vconcat[A_3, A_4], axis=1, b=d))).mean() \
+ penalizer_term

def conditional_expected_number_of_purchases_up_to_time(self, t, frequency,
Expand Down
1 change: 0 additions & 1 deletion lifetimes/fitters/pareto_nbd_fitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from numpy import log, exp, logaddexp, asarray, any as npany, c_ as vconcat
from pandas import DataFrame
from scipy.special import gammaln, hyp2f1, betaln
from scipy import misc
from scipy.special import logsumexp

from . import BaseFitter
Expand Down

0 comments on commit f74e195

Please sign in to comment.