Treten Sie der neuen
Discord-Community bei. Sie können sich dort in Echtzeit austauschen, Unterstützung von anderen Nutzern erhalten und direkt mit dem Meridian-Team interagieren.
Benutzerdefinierte ROI-Priors anhand früherer Tests festlegen
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Für Meridian müssen Verteilungen für die ROI-Kalibrierung übergeben werden. Es ist zwar sinnvoll, benutzerdefinierte Priors anhand der Ergebnisse früherer Tests festzulegen, es ist aber vieles zu beachten, bevor Sie fortfahren. Beispiel:
Zeitpunkt des Tests im Verhältnis zum MMM-Zeitraum: Wenn der Test vor oder nach dem MMM-Zeitraum durchgeführt wurde, sind die Ergebnisse möglicherweise nicht direkt anwendbar.
Dauer des Tests: Bei einem kurzen Test lassen sich die langfristigen Auswirkungen der Marketingeffektivität möglicherweise nicht ausreichend erfassen.
Komplexität des Tests: Wenn der Test mehrere Channels umfasst, liefern die Ergebnisse möglicherweise keine klaren Erkenntnisse zur Leistung einzelner Channels.
Unterschiede bei Schätzgrößen: Die in Tests verwendeten Schätzgrößen können von denen im MMM abweichen. Als kontrafaktisches Szenario des MMM werden zum Beispiel Ausgaben in Höhe von null angenommen, während bei einigen Tests ein anderes kontrafaktisches Szenario verwendet werden kann, z. B. mit reduzierten Ausgaben.
Unterschiede bei der Population: Die im Test angestrebte Population ist möglicherweise nicht mit der Population identisch, die im MMM verwendet wird.
Sie sollten die benutzerdefinierten Priors auf Grundlage davon festlegen, wie sehr Sie von der Wirksamkeit eines Channels überzeugt sind. Eine vorherige Überzeugung kann auf vielen Dingen beruhen, z. B. auf Tests oder anderen zuverlässigen Analysen. Nutzen Sie die Stärke dieser vorherigen Überzeugung, um die Standardabweichung der Prior-Verteilung zu bestimmen:
Wenn Sie von der Effektivität eines Channels überzeugt sind, können Sie einen Anpassungsfaktor auf die Standardabweichung des Priors anwenden, um Ihr Vertrauen widerzuspiegeln. Angenommen, Sie haben mehrere Tests für einen bestimmten Channel durchgeführt und alle Tests haben ähnliche ROI-Punktschätzungen ergeben. Oder Sie haben Verlaufsdaten aus früheren MMM-Analysen, die die Effektivität dieses Channels belegen. In diesem Fall können Sie eine kleinere Standardabweichung für den Prior festlegen, damit die Verteilung nicht stark variiert. Diese engere Verteilung zeugt von Ihrer hohen Zuversicht in die Testergebnisse.
Umgekehrt lassen sich die Testergebnisse möglicherweise nicht auf das MMM übertragen. In diesem Fall können Sie einen Anpassungsfaktor auf die Standardabweichung der Prior-Verteilung anwenden.
Je nachdem, wie skeptisch Sie sind, können Sie beispielsweise eine größere Standardabweichung für den Prior festlegen.
Sie sollten darüber nachdenken, das Argument roi_calibration_period
in ModelSpec
zu verwenden. Weitere Informationen finden Sie unter Zeitraum für ROI-Abstimmung festlegen.
Beim Festlegen von Priors wird häufig die LogNormal
-Verteilung verwendet. Der folgende Beispielcode kann verwendet werden, um den Mittelwert und den Standardfehler des Tests in die LogNormal
-Prior-Verteilung zu transformieren:
import numpy as np
def estimate_lognormal_dist(mean, std):
"""Reparameterization of lognormal distribution in terms of its mean and std."""
mu_log = np.log(mean) - 0.5 * np.log((std/mean)**2 + 1)
std_log = np.sqrt(np.log((std/mean)**2 + 1))
return [mu_log, std_log]
Wenn die Ergebnisse aus früheren Tests jedoch nahe null liegen, sollten Sie überlegen, ob Ihre bisherigen Überzeugungen durch eine nicht negative Verteilung wie die LogNormal
-Verteilung korrekt dargestellt werden. Wir empfehlen Ihnen dringend, die Prior-Verteilung grafisch darzustellen, um zu bestätigen, dass sie Ihren Vorannahmen entspricht, bevor Sie mit der Analyse fortfahren. Im folgenden Beispielcode wird gezeigt, wie Sie neu parametrisierte LogNormal
-Parameter abrufen, die Verteilung definieren und Stichproben daraus ziehen.
import tensorflow as tf
import tensorflow_probability as tfp
# Get reparameterized LogNormal distribution parameters
mu_log, std_log = estimate_lognormal_dist(mean, std)
mu_log = tf.convert_to_tensor(mu_log, dtype=tf.float32)
std_log = tf.convert_to_tensor(std_log, dtype=tf.float32)
# Define the LogNormal distribution
lognormal_dist = tfp.distributions.LogNormal(mu_log, std_log)
# Draw 10,000 samples
lognormal_samples = lognormal_dist.sample(10000).numpy()
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-08-17 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-08-17 (UTC)."],[[["\u003cp\u003eMeridian's ROI calibration can be enhanced by incorporating prior knowledge from past experiments, but factors like experiment timing, duration, complexity, estimand, and population differences need careful consideration for accurate application.\u003c/p\u003e\n"],["\u003cp\u003ePrior beliefs about channel effectiveness should guide the standard deviation of the prior distribution, with stronger beliefs corresponding to tighter distributions and vice-versa.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eroi_calibration_period\u003c/code\u003e argument in \u003ccode\u003eModelSpec\u003c/code\u003e offers further control over the calibration process.\u003c/p\u003e\n"],["\u003cp\u003eWhile the \u003ccode\u003eLogNormal\u003c/code\u003e distribution is commonly used for setting priors, its suitability should be evaluated when experimental results are near zero, potentially requiring alternative distributions to better reflect prior intuitions.\u003c/p\u003e\n"],["\u003cp\u003eVisualizing the prior distribution before analysis is crucial for ensuring it aligns with expectations and avoids misrepresentation of prior beliefs.\u003c/p\u003e\n"]]],["Meridian uses passing distributions for ROI calibration, informed by prior beliefs and experiments. Before using custom priors, consider: experiment timing, duration, complexity, estimand differences, and population differences. Adjust prior standard deviation based on confidence; strong confidence warrants a smaller standard deviation. Use the `roi_calibration_period` argument in `ModelSpec`. `LogNormal` distributions are common, and sample code transforms experimental mean and standard error to `LogNormal` parameters. For near-zero experimental results, verify that the `LogNormal` distribution aligns with prior beliefs.\n"],null,["# Set custom ROI priors using past experiments\n\nMeridian requires passing distributions for ROI calibration. Although setting\ncustom priors using results from previous experiments is a sound approach,\nthere are many nuances to consider before proceeding. For example:\n\n- **The timing of the experiment in relation to the MMM time window:**\n If the experiment was conducted either before or after the MMM time window,\n the results might not be directly applicable.\n\n- **The duration of the experiment:** An experiment of short duration might\n not effectively capture the long-term effects of the marketing effectiveness.\n\n- **The complexity of the experiment:** If the experiment involved a mixture\n of channels, the results might not provide clear insights into the performance\n of individual channels.\n\n- **Estimand differences:** The estimands used in experiments can differ from\n those used in the MMM. For example, the MMM counterfactual is zero spend,\n whereas some experiments might have a different counterfactual, such as\n reduced spend.\n\n- **Population differences:** The population targeted in the experiment might\n not be the same as the population considered in the MMM.\n\nWe recommend setting the custom priors based on your belief in the\neffectiveness of a channel. A prior belief can be informed by many things,\nincluding experiments or other reliable analyses. Use the strength in that\nprior belief to inform the standard deviation of the prior:\n\n- If you have a strong belief in the effectiveness of a channel,\n you can apply an adjustment factor to the standard deviation of the prior to\n reflect your confidence. For example, suppose you have conducted several\n experiments for a particular channel and all the experiments yielded similar\n ROI point estimates, or you have historical data from previous MMM analyses\n that support the effectiveness of this channel. In this case, you could set a\n smaller standard deviation for the prior so that the distribution won't vary\n widely. This tighter distribution indicates your strong confidence in the\n experimental results.\n\n- Conversely, the experiment might not necessarily translate to the MMM,\n considering some of the nuances listed earlier. In this case, you might choose\n to apply an adjustment factor to standard deviation of the prior distribution.\n For example, you could set a larger standard deviation for the prior,\n depending on your level of skepticism.\n\nYou should consider using the `roi_calibration_period` argument in\n`ModelSpec`. For more information, see\n[Set the ROI calibration period](/meridian/docs/user-guide/configure-model#set-roi-calibration-period).\n\nWhen setting the prior, the `LogNormal` distribution is a common\none to use. The following sample code can be used to transform experiment's\nmean and standard error to the `LogNormal` prior\ndistribution: \n\n import numpy as np\n\n def estimate_lognormal_dist(mean, std):\n \"\"\"Reparameterization of lognormal distribution in terms of its mean and std.\"\"\"\n mu_log = np.log(mean) - 0.5 * np.log((std/mean)**2 + 1)\n std_log = np.sqrt(np.log((std/mean)**2 + 1))\n return [mu_log, std_log]\n\nHowever, if the results from previous experiments are near zero, you should\nconsider whether your prior beliefs are accurately represented by a\nnon-negative distribution, such as the `LogNormal` distribution. We\nhighly recommend plotting the prior distribution to confirm it matches\nyour prior intuitions before proceeding with the analysis. The following\nsample code shows how to get reparameterized `LogNormal`\nparameters, define the distribution, and draw samples from it. \n\n import tensorflow as tf\n import tensorflow_probability as tfp\n\n # Get reparameterized LogNormal distribution parameters\n mu_log, std_log = estimate_lognormal_dist(mean, std)\n mu_log = tf.convert_to_tensor(mu_log, dtype=tf.float32)\n std_log = tf.convert_to_tensor(std_log, dtype=tf.float32)\n # Define the LogNormal distribution\n lognormal_dist = tfp.distributions.LogNormal(mu_log, std_log)\n # Draw 10,000 samples\n lognormal_samples = lognormal_dist.sample(10000).numpy()"]]