utils#
Utility functions for the Marketing Mix Modeling module.
Functions
|
Return df with additive Gaussian noise applied to channels columns. |
|
Calculate adjusted Value at Risk (AVaR) score. |
|
Apply a scikit-learn transformer across a dimension of an xarray DataArray. |
|
Compute the average response of the posterior predictive distribution. |
|
Build a wide contributions DataFrame from idata.posterior variables. |
|
Calculate the Conditional Value at Risk (CVaR) at a specified confidence level. |
|
Create an index to take the first dimension of a tensor based on the provided dimensions. |
|
Create new spend data for the channel forward pass. |
|
Create a DataFrame for future prediction, with zeros (or supplied constants). |
|
Calculate the Diversification Ratio of a portfolio to evaluate risk distribution. |
|
Calculate the Mean Tightness Score (MTS). |
|
Calculate the entropy of a portfolio's asset weights to assess diversification. |
|
Calculate the Risk-Adjusted Return on Capital (RAROC). |
|
Calculate the Sharpe Ratio. |
|
Calculate the absolute distance between the mean and the quantiles. |
|
Transform a 1D array using a scikit-learn transformer. |
|
Calculate the Value at Risk (VaR) at a specified confidence level. |