meridian.model.eda.eda_engine.EDAEngine

Meridian EDA Engine.

all_freq_da
Returns a DataArray containing all frequency data.

This includes both paid and organic frequency, concatenated along the RF_CHANNEL dimension.

all_reach_scaled_da
Returns a DataArray containing all scaled reach data.

This includes both paid and organic reach, concatenated along the RF_CHANNEL dimension.

all_spend_ds
Returns a Dataset containing all spend data.

This includes media spend and rf spend.

controls_scaled_da
Returns the scaled controls data array.
frequency_da
Returns the frequency data array.
geo_population_da
Returns the geo population data array.
kpi_has_variability
Returns True if the KPI has variability across geos and times.
kpi_scaled_da
Returns the scaled KPI data array.
media_raw_da
Returns the raw media data array.
media_scaled_da
Returns the scaled media data array.
media_spend_da
Returns media spend.

If the input spend is aggregated, it is allocated across geo and time proportionally to media units.

national_all_freq_da
Returns a DataArray containing all national-level frequency data.

This includes both paid and organic frequency, concatenated along the RF_CHANNEL dimension.

national_all_reach_scaled_da
Returns a DataArray containing all national-level scaled reach data.

This includes both paid and organic reach, concatenated along the RF_CHANNEL dimension.

national_all_spend_ds
Returns a Dataset containing all national spend data.

This includes media spend and rf spend.

national_controls_scaled_da
Returns the national scaled controls data array.
national_frequency_da
Returns the national frequency data array.
national_kpi_scaled_da
Returns the national scaled KPI data array.
national_media_raw_da
Returns the national raw media data array.
national_media_scaled_da
Returns the national scaled media data array.
national_media_spend_da
Returns the national media spend data array.
national_non_media_scaled_da
Returns the national scaled non-media treatment data array.
national_organic_frequency_da
Returns the national organic frequency data array.
national_organic_media_raw_da
Returns the national raw organic media data array.
national_organic_media_scaled_da
Returns the national scaled organic media data array.
national_organic_reach_raw_da
Returns the national raw organic reach data array.
national_organic_reach_scaled_da
Returns the national scaled organic reach data array.
national_organic_rf_impressions_raw_da
Returns the national raw organic RF impressions data array.
national_organic_rf_impressions_scaled_da
Returns the national scaled organic RF impressions data array.
national_paid_raw_media_units_ds

national_reach_raw_da
Returns the national raw reach data array.
national_reach_scaled_da
Returns the national scaled reach data array.
national_rf_impressions_raw_da
Returns the national raw RF impressions data array.
national_rf_impressions_scaled_da
Returns the national scaled RF impressions data array.
national_rf_spend_da
Returns the national RF spend data array.
national_treatment_control_scaled_ds
Returns a Dataset containing all scaled treatments and controls.

This includes media, RF impressions, organic media, organic RF impressions, non-media treatments, and control variables, all at the national level.

national_treatments_without_non_media_scaled_ds
Returns a Dataset of national scaled treatments excluding non-media.
non_media_scaled_da
Returns the scaled non-media treatments data array.
organic_frequency_da
Returns the organic frequency data array.
organic_media_raw_da
Returns the raw organic media data array.
organic_media_scaled_da
Returns the scaled organic media data array.
organic_reach_raw_da
Returns the raw organic reach data array.
organic_reach_scaled_da
Returns the scaled organic reach data array.
organic_rf_impressions_raw_da
Returns the raw organic RF impressions data array.
organic_rf_impressions_scaled_da
Returns the scaled organic RF impressions data array.
paid_raw_media_units_ds

reach_raw_da
Returns the raw reach data array.
reach_scaled_da
Returns the scaled reach data array.
rf_impressions_raw_da
Returns the raw RF impressions data array.
rf_impressions_scaled_da
Returns the scaled RF impressions data array.
rf_spend_da
Returns RF spend.

If the input spend is aggregated, it is allocated across geo and time proportionally to RF impressions (reach * frequency).

spec

treatment_control_scaled_ds
Returns a Dataset containing all scaled treatments and controls.

This includes media, RF impressions, organic media, organic RF impressions, non-media treatments, and control variables, all at the geo level.

treatments_without_non_media_scaled_ds
Returns a Dataset of scaled treatments excluding non-media.

Methods

check_cost_per_media_unit

View source

Checks if the cost per media unit is valid.

This function checks the following conditions: 1. cost == 0 and media unit > 0. 2. cost > 0 and media unit == 0. 3. cost_per_media_unit has outliers.

Returns
An EDAOutcome object with findings and result values.

check_geo_cost_per_media_unit

View source

Checks if the cost per media unit is valid for geo data.

Returns
An EDAOutcome object with findings and result values.

Raises

GeoLevelCheckOnNationalModelError
If the check is called for a national model.

check_geo_pairwise_corr

View source

Checks pairwise correlation among treatments and controls for geo data.

Returns
An EDAOutcome object with findings and result values.

Raises

GeoLevelCheckOnNationalModelError
If the model is national.

check_geo_std

View source

Checks std for geo-level KPI, treatments, R&F, and controls.

check_geo_vif

View source

Computes geo-level variance inflation factor among treatments and controls.

check_national_cost_per_media_unit

View source

Checks if the cost per media unit is valid for national data.

Returns
An EDAOutcome object with findings and result values.

check_national_pairwise_corr

View source

Checks pairwise correlation among treatments and controls for national data.

Returns
An EDAOutcome object with findings and result values.

check_national_std

View source

Checks std for national-level KPI, treatments, R&F, and controls.

check_national_vif

View source

Computes national-level variance inflation factor among treatments and controls.

check_overall_kpi_invariability

View source

Checks if the KPI is constant across all geos and times.

check_pairwise_corr

View source

Checks pairwise correlation among treatments and controls.

Returns
An EDAOutcome object with findings and result values.

check_std

View source

Checks standard deviation for treatments and controls.

Returns
An EDAOutcome object with findings and result values.

check_vif

View source

Computes variance inflation factor among treatments and controls.

Returns
An EDAOutcome object with findings and result values.

run_all_critical_checks

View source

Runs all critical EDA checks.

Critical checks are those that can result in EDASeverity.ERROR findings.

Returns
A list of EDA outcomes, one for each check.

Design a Mobile Site
View Site in Mobile | Classic
Share by: