Spaces:
Sleeping
Sleeping
# Importing necessary libraries | |
import streamlit as st | |
import base64 | |
from utilities import set_header, load_local_css | |
st.set_page_config( | |
page_title="Glossary", | |
page_icon=":shark:", | |
layout="wide", | |
initial_sidebar_state="collapsed", | |
) | |
load_local_css("styles.css") | |
set_header() | |
st.header("Glossary") | |
# Glossary | |
st.markdown( | |
""" | |
### 1. Glossary - Homeβ | |
**Blend Employee ID:** Users should have access to the UI through their Blend Employee ID. User data should be available and validated through this ID.β | |
**API Data:** Incorporate data retrieved from APIs to be used in the tool.β | |
### 2. Glossary β Data Importβ | |
**Granularity:** Defines the level of detail to which the data should be aggregated.β | |
**Panel:** Represents columns corresponding to markets, DMAs (Designated Market Areas).β | |
**Response Metrics:** Target variables or metrics such as App Installs, Revenue, Form Submission/Conversion. These are the variables used for model building and spends optimization.β | |
**Spends:** Variables representing spend data for all media channels.β | |
**Exogenous:** External variables like bank holidays, GDP, online trends, interest rates.β | |
**Internal:** Internal variables such as discounts or promotions.β | |
### 3. Glossary β Data Assessmentβ | |
**Trendline:** Represents the linear average movement over the entire time period.β | |
**Media Variables:** Variables related to media activities such as Impressions, Clicks, Spends, Views. Examples: Bing Search Clicks, Instagram Impressions, YouTube Impressions.β | |
**Non-Media Variables:** Variables that exclude media-related data. Examples: Discount, Holiday, Google Trend.β | |
**CPM (Cost per 1000 Impressions):** Calculated as (YouTube Spends / YouTube Impressions) * 1000.β | |
**CPC (Cost per 1000 Clicks):** Calculated as (YouTube Spends / YouTube Clicks) * 1000.β | |
**Correlation:** Pearson correlation measures the linear relationship between two continuous variables, indicating the strength and direction of their association.β | |
### 4. Glossary β Transformationsβ | |
**Transformations:** Transformations involve adjusting input variables to capture nonlinear relationships, like diminishing returns and advertising carryover. They are always applied at the panel level if panel exist; if no panel exists, the transformations are applied directly to the aggregated level. | |
**Lag:** Shifts the data backward by a specified number of periods. Formula: LaggedΒ Series = Xtβlag | |
**Lead:** Shifts the data forward by a specified number of periods. Formula: LeadΒ Series = Xt+lead | |
**Moving Average:** Smooths the data by averaging values over a specified window size. Formula: MovingΒ Average = 1/π β1_0^(πβ1)π_(π‘β1) | |
**Saturation:** Applies a saturation effect to the data based on a specified saturation percentage. Formula: π_π‘= (1/(1 +[(π ππ‘π’πππ‘πππ πππππ‘)/π_π‘ ]^π π‘ππππππ π )) Γ π_π‘ | |
**Power:** Raises the data to a specified power. Formula: Yt = Xtpower | |
**Adstock:** Applies a decay effect to the data, simulating diminishing returns over time. Formula: Yt = Xt + decay rate x Yt-1 | |
### 5. Glossary - AI Model Build | |
**Train Set:** The train set is a subset of the data on which the AI Model is trained. It is standard practice to select 70-75% of the data as train set.β | |
**Test Set:** The test set is the subset of data on which the AI Modelβs performance is tested. There will be no common records between the train and test sets.β | |
**Residual:** Residual is defined as the difference between true value and predicted value from the AI Model. π ππ πππ’ππ=πππ’π ππππ’π βπππππππ‘ππ ππππ’π | |
**Actual VS Predicted Plot:** An actual vs. predicted plot visualizes the relationship between the actual values and the values predicted by the AI model, helping to assess model performance and identify patterns or discrepancies.β | |
**MAPE:** MAPE or Mean Absolute Percentage Error indicates the percentage of error in the AI Modelβs predictions. We use a variant of MAPE called Weighted Average Percentage Error. ππ΄ππΈ= β |π΄ππ‘π’ππ ππππ’π βπππππππ‘ππ ππππ’π| Γ·β [|π΄ππ‘π’ππ ππππ’π|] | |
**R-Squared:** R-Squared is a number that tells you how well the independent variable(s) in a AI model explain the variation in the dependent variable. Indicates the goodness of fit, with values closer to 1 suggesting a better fit.β | |
**Adjusted R-Squared:** Adjusted R-squared modifies the R-squared value to account for the number of predictors in the model, providing a more accurate measure of goodness of fit by penalizing the addition of non-significant predictors.β | |
**Multicollinearity:** Multicollinearity refers to a situation where two or more independent variables (media channels or marketing inputs) are highly correlated with each other. This makes it difficult to isolate the individual effect of each channel on the dependent variable (e.g., sales). It can lead to unreliable coefficient estimates, making it hard to determine the true impact of each media type. | |
### 6. Glossary β AI Model Tuning | |
**Event:** An event refers to a specific occurrence or campaign, such as a promotion, holiday, or product launch, that can impact the performance of response metricβ | |
**Trend:** Trend is a straight line which helps capture the underlying direction or pattern in the data over time, helping to identify and quantify the increasing or decreasing trend of the dependent variable.β | |
**Day of Week:** The "day of week" feature represents the specific day within a week (e.g., Monday, Tuesday) and is used to capture patterns or seasonal effects that occur on specific days.β | |
**Sine & Cosine Waves:** Sine and cosine waves are mathematical functions used to capture seasonality in the dependent variableβ | |
**Contribution:** Contribution of a channel is the percentage of its contribution to the response metric. Contribution is an output of the AI Model, calculated using the media data and modelβs coefficientsβ | |
### 7. Glossary β Response Curves | |
**Response Curve:** A response curve in media mix modeling represents the relationship between media inputs (e.g., impressions, clicks) on the X-axis and the resulting business outcomes (e.g., revenue, app installs) on the Y-axis, illustrating the impact of media variables on the desired response metric. | |
**R-squared (R-squared):** R-squared (R-squared) is a statistical measure that represents the proportion of the variance in the dependent variable that is predictable from the independent variables. It indicates how well the regression model fits the data, with a value between 0 and 1, where 1 indicates a perfect fit. | |
**Formula for R-squared (R-squared):** | |
R-squared = 1 β SSres / SStot | |
Where: | |
- **SSres** is the sum of squares of residuals (errors). | |
- **SStot** is the total sum of squares (the variance of the dependent variable). | |
**Actual R-squared:** Actual R-squared is used to evaluate how well a s-curve fits the data. Modified R-squared is used to evaluate how well a modified (manually tuned) s-curve fits the data. The difference between modified s-curve and actual s-curve shows how much the fit improves or worsens. | |
### 8. Glossary β Scenario Planner | |
**CPA (Cost Per Acquisition):** The cost associated with acquiring a customer or conversion. CPA = Total Spend / Number of Acquisitions | |
**ROI (Return on Investment):** A measure of the profitability of an investment relative to its cost. ROI = (Revenue - Total Spend) / Total Spend | |
**mROI (Marginal Return on Investment):** Measures the additional return generated by an additional unit of investment. It represents the slope of the ROI curve and shows the incremental effectiveness of the investment. mROI = Ξspend / ΞRevenueβ | |
**Bounds (Upper, Lower):** Constraints applied during optimization to ensure that media channel spends remain within specified limits. These bounds help in defining the feasible range for investments and prevent overspending or underspending. | |
**Panel & Timeframe:** | |
- **Panel:** The ability to optimize media strategies at a granular level based on specific categories such as geographies, product types, customer segments, or other defined groups. This allows for tailored strategies that address the unique characteristics and needs of each panel. | |
- **Timeframe:** The ability to optimize media strategies within specific time periods, such as by month, quarter, or year. This enables precise adjustments, ensuring that the approach aligns with specific business cycles. | |
**Actual Vs Optimized:** | |
- **Actual:** This category includes the unoptimized values, such as the actual spends and actual response metrics, reflecting the current or historical performance without any optimization applied. | |
- **Optimized:** This category encompasses the optimized values, such as optimized spends and optimized response metrics, representing the improved or adjusted figures after the optimization process. | |
**Regions:** | |
- **Yellow Region:** This represents the under-invested area where additional investments can lead to entering a region with a higher ROI than the average. Investing more in this region can yield better returns. | |
- **Green Region:** This is the optimal area where the ROI of the channel is above the average ROI, and the Marginal Return on Investment (mROI) is greater than 1, indicating that each additional dollar spent is generating substantial returns. | |
- **Red Region:** This represents the over-invested or saturated area where the mROI is less than 1, meaning that additional spending yields diminishing returns and is less effective. | |
**Important Formulas:β** | |
**1. Incremental CPA (%)** = (Total Optimized CPAβTotal Actual CPA) / (Total Actual CPAβ)β | |
**2. Incremental Spend (%)** = (Total Optimized SpendβTotal Actual Spend) / (Total Actual Spendβ) | |
**Note:** Calculated based on total actual spends (base spends is always zero)β | |
**3. Incremental Response Metric (%) [Media]** = (Total Optimized Response MetricβTotal Actual Responseβ Metric) / (Total Actual Response MetricβTotal Base Response Metricβ) | |
**Note:** Calculated based on media portion of total actual response metric only, excluding the fixed base contribution | |
**4. Incremental Response Metric (%) [Total]** = (Total Optimized Response MetricβTotal Actual Responseβ Metric) / (Total Actual Response Metricβ) | |
**Note:** Calculated based on total actual response metric only, including the fixed base contribution | |
### 10. Glossary β Model Optimized Recommendation | |
**% Split:** The percentage distribution of total media spend across different channels, optimized to achieve the best results. | |
**Return forecast by Media Channel:** Effectiveness and Efficiency for selected response metric. | |
""" | |
) | |