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

Sync Resonance fork with latest Robyn #1

Open
wants to merge 1,368 commits into
base: main
Choose a base branch
from

Conversation

DaveJacques
Copy link

Project Robyn

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • API change with a documentation update
  • Additional test coverage
  • Code cleanup or just keeping up with the latest Rustc nightly

How Has This Been Tested?

Checklist:

  • Fork the repo and create your branch from master.
  • If you've added code that should be tested, add tests.
  • If you've changed APIs, update the documentation.
  • Ensure the test suite passes.
  • Make sure your code lints.

alxlyj and others added 30 commits October 2, 2024 15:53
…modeling_new

[modeling] add modeling implementations
remove the need for bool
…apper

[feature] data mapper from R to Python
…n_input_validation

Feature/calibration input validation
…apper

Quick fix on indents for data_mapper
alxlyj and others added 30 commits December 5, 2024 03:03
…al release (#1173)

* revert ridge modeling to match convergence

* tidy up loggers

* clear notebooks, update gitignore

* remove debug files
* refactored pareto_optimizer code

* removed unused unit test

* Added logging for Pareto module

* cleaned up unused functions and unimplemented code

* cluster loggers

---------

Co-authored-by: Dhaval Patel <[email protected]>
* fix calculate decomp spend dist to use abs calc

* clear notebook outs

* update missing columns
* updated readme for python robyn

* added package version of Robyn R used during python implementation

---------

Co-authored-by: Dhaval Patel <[email protected]>
Moving tutorials into tests and organizing tests
* update visual fixes on notebook

* clear notebook outputs

* remove logger configuration on file levels

* remove unused imports
* update colab notebooks

* update with notebook content

* publish with notebook content

* update notebook code

* update notebooks

* update colab notebooks

* update colab notebooks

* update colab notebooks

* update notebooks

* update colab notebooks
Introducing Robynpy - Robyn powered by Python.
Add Python version info to main readme.
…1132)

* feat: enable exposure fitting
- Exposures (Imp/GRP etc) will be prioritised over spend for parent model fitting
- Deprecate function fit_spend_exposure, incl. Michaelis Menten. Nonlinear fitting between spend and exposure wasn't improving fitting significantly. Instead, future curve calibration feature will aim to improve curve identification.
- Use cpe (cost per exposure) as ratio for spend to exposure translation. use cpe_window to scale the whole dataset in order to obtain the right spend scale for modeling period.
- remove minpack.lm / nlsLM dependency
- update exposure plot

* feat: create robyn_calibrate function
- Simulate cumulative R&F dataset with frequency bucket
- add beta coef besides alpha and gamma to nevergrad hyperparameter to improve curve fit
- plot with freq_bucket as well as onepager per trial
- add df_curve_reach_freq as dummy dataset
- create robyn_calibrate that consumes curve input and outputs hyperparameter ranges as input.
- Rename previous internal robyn_calibrate function as lift_calibration
- early stop convergence with while loop
- update documentation

* prototype: reach and frequency allocator
This is the proof of concept of a R&F allocator that includes
- Simulated R&F data
- The R&F hill params are estimated using a multiplicative equation with Nevergrad
- visualisation of surface
- R&F allocator with nlopt
- constrain validation

* update: checks, input, transformation & website
- simplify various check functions
- adapt model.R, incl. reset run_transformations params to have clearer overview of params needed. simplify transformation.R by removing unnecessary checks
- In model.R & pareto.R: remove decompSpendDist from  both scripts to reduce memory leak. Use xDecompAgg subsets instead
- In transformation.R & response.R: unify transformation namings in run_transformation and robyn_response
- In response.R: remove exposure extrapolation because it's already done in robyn_input. Also add inflexion point to output.
- In plots.R: fix onepager saturation plot issues
- In pareto.R: rewrite run_dt_resp() as response_wrapper and align transformation logic & naming.
- In pareto: Replace foreach response loop with lapply for simplicity.
- In pareto.R: Simplify plot data generation process, esp for saturation curve plot, actual vs predicted plot & immediate vs carryover plot.
- In pareto.R: Remove redundancy in xDecompVecCollect -> remove type rawMedia, rawSpend, predictedExposure, saturatedMedia & saturatedSpendReversed. Only keep adstockedMedia & decompMedia for response curve plotting.
- add set_default_hyppar for easier testing
- website update for all above changes
…te (#1090)

Bumps [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) from 2.0.6 to 2.0.7.
- [Release notes](https://github.com/chimurai/http-proxy-middleware/releases)
- [Changelog](https://github.com/chimurai/http-proxy-middleware/blob/v2.0.7/CHANGELOG.md)
- [Commits](chimurai/http-proxy-middleware@v2.0.6...v2.0.7)

---
updated-dependencies:
- dependency-name: http-proxy-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.6 to 3.3.8.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](ai/nanoid@3.3.6...3.3.8)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ata on actual vs predicted plot (#1193)

* fix: calibration error .min_max_norm(.data$mape) Caused by error different vector sizes
* fix: underlying data for actual vs predicted (linetype) #1187
…e-pagers (#1194)

* fix: prev versions' response curves and mean spends per channel on one-pagers
- Minor fix and tested on dummy data locally. Works as expected.
- minor fix and tested on local machine with different robyn_inputs specs, e.g. paid_media_spends and paid_media_vars are identical, or paid_media_spends only while paid_media_vars = NULL. All work as expected.
- bump up version
…y InputCollect for BA bug (#1199)

* fix: modeling window coverage considers all actual data dates (monthly data covers until end of month)
* fix: adapt to rollingWindow too
* fix: initial data message
* fix: legacy paid_media_selected issue in BA
* fix: replace paid_media_selected for paid_media_vars for response curves in OPs
…ion. (#1209)

* added proper handling of context variables

* added unit test on prepare_data

* update fix for prophet enabling

* updated timestamp formats

* update redundant dtype conversion

* update notebook reference visuals

* update notebook reference visuals

* update notebook references

* add back unit test file

* clear nb outputs

* remove nb previews

* update pyproject toml file

* add nb outputs

* add nb outputs
…1221)

- Precomputed denominator for `xDecompMeanNon0Perc`, eliminating redundant calculations inside loops.
- Optimized column indexing to remove repeated lookups.
- Used `to_numpy().sum()` for faster summation.
…~40% (#1217)

- Replaced loop-based implementation with `scipy.signal.lfilter`
- Improved `_geometric_adstock` execution time from **108.9s → 0.495s** (~99% faster) per trial
- Reduced overall app runtime from **~277.9s → ~166.7s** (~40% speedup) per trial
- Added unit test to ensure numerical correctness (`np.allclose`)
* fix lambda_seq and lambda calculation

* fix for column pollution

* temporary draft for modeling approach for lambda calculation

* test nevergrad changes

* tested glmnet and sklearn

* remove redundant function

* refactor functions

* complete debugging step3

* reconcile step6 hyper sampling

* validated step6 nevergrad sampling

* reconcile run_transformations

* update transformations cols

* ensure proper saturation for transformation

* remove all non essential loggers

* changes for validating data splits - step8

* complete validation for lambda_seq - step10

* addressed adjusted r2

* addressed rssd and model_decomp

* enforce required cols in x_decomp_agg and decomp_spend_dist

* resolve logging errors

* update fallback for rpy2 modeling

* updated dependencies

* add documentations for logging

* update notebooks

* prepopulate noteobok

* remove unused notebooks

* update notebooks

* remove unused functions

* remove unused code
* fix all media call in run_transformations

* update penalty factor calc

* update run_transformation

* fix sign control

* update py version

* revert cluster viz

* update notebooks

* update README for robynpy
* update ci calculation to address singular data points

* update notebooks

* fix solid handler

* fix ordering of paid media spends for spend calculations

* fix missing metric update for train size

* update allocator

* tidy up loggers

* tidy up allocator viz

* remove iframe figures

* update toml requirements files

* cleanup allocator code

* fix plotting behavior for allocator

* add missing filter for response curve plot

* update notebook contents

* update notebook content

* suppress redundant plot outputs

* update pypi package version

* remove component level tutorials

* update legend position, address paid_media_signs handling

* remove old loggers

* remove old debug loggers

* tidy up logging

* tidy up user docs on notebooks

* update pypi versioning
* remove dup pypi deps

* update README

* update versioning

* update missing dep
* update pypi version

* remove old file

* update notebook plots
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.