facebookexperimental / Robyn

Robyn is an experimental, AI/ML-powered and open sourced Marketing Mix Modeling (MMM) package from Meta Marketing Science. Our mission is to democratise modeling knowledge, inspire the industry through innovation, reduce human bias in the modeling process & build a strong open source marketing science community.
https://facebookexperimental.github.io/Robyn/
MIT License
1.08k stars 322 forks source link

InputCollect hyperparameter causes error #860

Closed jmorten closed 7 months ago

jmorten commented 7 months ago

Project Robyn

Describe issue

An error is produced when running InputCollect <- robyn_inputs(InputCollect = InputCollect, hyperparameters = hyperparameters)

Provide reproducible example

>> Running feature engineering...
Error in if (is.finite(resvar) && resvar < (mean(f)^2 + var(c(f))) * 1e-30) warning("essentially perfect fit: summary may be unreliable") : 
  missing value where TRUE/FALSE needed
In addition: Warning message:
In `-.integer64`(y, z$residuals) : NAs produced by integer64 overflow

Environment & Robyn version

Make sure you're using the latest Robyn version before you post an issue.

jmorten commented 7 months ago

It appears that colSums is returning an incorrect sum for the paid_media_vars.

Incorrect sums: image

Input to above colSums: image

Using dplyr to sum columns: image

jmorten commented 7 months ago

Solution: integer64 does not play nice with R.