Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move models folder #580

Closed
wants to merge 33 commits into from
Closed

Move models folder #580

wants to merge 33 commits into from

Conversation

twiecki
Copy link
Contributor

@twiecki twiecki commented Mar 8, 2024

Closes #520


📚 Documentation preview 📚: https://pymc-marketing--580.org.readthedocs.build/en/580/

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@wd60622
Copy link
Contributor

wd60622 commented Apr 1, 2024

Do you want to finish this one up, @twiecki ?
I can take it over if you'd like

@twiecki
Copy link
Contributor Author

twiecki commented Apr 2, 2024

That'd be great thanks.

wd60622 and others added 23 commits April 8, 2024 23:08
* current status as method

* format

* Update version.txt

* Implement different convolution modes (#454)

* Add PR template

* Update pull_request_template.md

* Fix issues in index example

* Update .pre-commit-config.yaml

* Update .pre-commit-config.yaml

* move from other PR

* put legend on side

* Optimisation in customer_lifetime_value when discount_rate == 0 (#468)

* Optimisation in customer_lifetime_value when discount_rate == 0

cf #467

* Update utils.py

* Update README.md

* add support for pre-commit-ci

* add isort

* modify autosummary templates

* Rename `clv_summary` to `rfm_summary` and extend functionality (#479)

* clv_summary adapted into rfm_summary

* added clv_summary with warning

* moved dataset from testing folder

* Update version.txt

* improve ruff

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.11 → v0.1.14](astral-sh/ruff-pre-commit@v0.1.11...v0.1.14)
- [github.com/pre-commit/pre-commit-hooks: v3.2.0 → v4.5.0](pre-commit/pre-commit-hooks@v3.2.0...v4.5.0)

* resolve conflict

* Add baselined saturation (#498)

* add baselined saturation with test and plots

* refactor docs

* add the reparam

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* verify parametrization is equivalent under change of baseline

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add a note for setting x0

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* make it clear how r_ref is calculated

* fix typo

* fix docstrings

* improve test by making sure transform is gives identical saturation and cac0

* add comment in the docstring

* add blank line in the code-block

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Swap Before and After convolution modes as per #489 (#501)

* Add support for string mode args

* Swap before and after and make mode explicit

* Use Union due Python 3.9

* Style

* resolve conflict

* add dim_name arg

* add seed to tests and test methods

* add slice as type hint

* use slice in docstring

* defaults to mean for each channel

* add non-negative check

* ax as last arg

* change weeks -> time

* parameterize quantiles

* separate out and add to docs

* rerun the baseline images

* mock the prior

* add new images from latest env

* migrate to toml instead of ci/cd

* test only is axes

* remove the images

---------

Co-authored-by: Juan Orduz <[email protected]>
Co-authored-by: Abdalaziz Rashid <[email protected]>
Co-authored-by: Ricardo Vieira <[email protected]>
Co-authored-by: Ricardo Vieira <[email protected]>
Co-authored-by: vincent-grosbois <[email protected]>
Co-authored-by: juanitorduz <[email protected]>
Co-authored-by: Oriol (ProDesk) <[email protected]>
Co-authored-by: Colt Allen <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxim Kochurov <[email protected]>
* other nuts sampler init

* clean directories

* fix toctree

* add nutpie

* gpu comment

* feedback
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.3.0 → v0.3.2](astral-sh/ruff-pre-commit@v0.3.0...v0.3.2)
- [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](pre-commit/mirrors-mypy@v1.8.0...v1.9.0)
- [github.com/nbQA-dev/nbQA: 1.8.3 → 1.8.4](nbQA-dev/nbQA@1.8.3...1.8.4)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.3.2 → v0.3.3](astral-sh/ruff-pre-commit@v0.3.2...v0.3.3)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Moving michaelis menten function to transformers module

As requested on issue #532

* Modifying sigmoid saturation

* Updating the docstring

* update function

* pre-commit

* small update

* Update

* Small changes

* changes

* Adjusting deprecation

* Solving error

* extra correction

* Small change

* correcting plot

* Modifying plot

* update

* correcting latex
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.3.3 → v0.3.4](astral-sh/ruff-pre-commit@v0.3.3...v0.3.4)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
updates:
- [github.com/nbQA-dev/nbQA: 1.8.4 → 1.8.5](nbQA-dev/nbQA@1.8.4...1.8.5)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* add scaling into lift test method

* test scaling methods

* test change of MMM likelihood

* link up beta_channel parameters

* change name to sigma

* reorganize and edit

* closes #406

* address the feedback in docstrings

* add more to docstring

* format the docstring

* be verbose for future devs

* be explicit for the column max values

* incorporate the feedback

* hide cells and add to intro

* add conclusion

* switch to header 2

* run notebook through

* move the types together

* separate model estimated from empirical

* fix typos
* drop python 3.9

* try python 3.12

* undo try python 3.12
juanitorduz and others added 8 commits April 8, 2024 23:08
* improve nb

* rm warnings and add link to lifetimes quickstart

* address comments

* feedback part 3

* remove warnings manually
* add more info to the notebook

* hide plots code

* fix plot y labels

* fix plot outputs and remove model build

* improve final note probability plots

* address comments

* use quickstart dataset

* feedback part 3

* remowe warnings manually

* feedback part 4
* improve mmm docs init

* add more code examples to docstrings

* minor improvemeents

* typo

* better phrasing

* add thomas suggestion
* move fixtures to conftest

* docstrings and moved set_model_fit to conftest

* fixed pandas quickstart warnings

* revert to MockModel and add ParetoNBD support

* quickstart edit for issue 609

* notebook edit
Copy link

codecov bot commented Apr 8, 2024

Codecov Report

Attention: Patch coverage is 21.86667% with 293 lines in your changes are missing coverage. Please review.

Project coverage is 35.01%. Comparing base (be423bd) to head (5c55a0d).
Report is 29 commits behind head on main.

❗ Current head 5c55a0d differs from pull request most recent head d3f8be4. Consider uploading reports for the commit d3f8be4 to get more accurate results

Files Patch % Lines
pymc_marketing/clv/models/pareto_nbd.py 20.40% 117 Missing ⚠️
pymc_marketing/mmm/lift_test.py 32.92% 55 Missing ⚠️
pymc_marketing/mmm/delayed_saturated_mmm.py 9.25% 49 Missing ⚠️
pymc_marketing/clv/utils.py 12.12% 29 Missing ⚠️
pymc_marketing/clv/plotting.py 14.28% 12 Missing ⚠️
pymc_marketing/mmm/utils.py 29.41% 12 Missing ⚠️
pymc_marketing/clv/models/beta_geo.py 0.00% 5 Missing ⚠️
pymc_marketing/mmm/base.py 37.50% 5 Missing ⚠️
pymc_marketing/clv/distributions.py 0.00% 2 Missing ⚠️
pymc_marketing/mmm/budget_optimizer.py 50.00% 2 Missing ⚠️
... and 3 more
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #580       +/-   ##
===========================================
- Coverage   91.04%   35.01%   -56.03%     
===========================================
  Files          21       22        +1     
  Lines        1999     2273      +274     
===========================================
- Hits         1820      796     -1024     
- Misses        179     1477     +1298     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wd60622
Copy link
Contributor

wd60622 commented Apr 8, 2024

Think I need to restart from scratch 😆
Will likely close and begin again!

@twiecki twiecki closed this Apr 9, 2024
@wd60622 wd60622 deleted the move_models_folder branch April 9, 2024 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename models folder
7 participants