新しく開設された
Discord コミュニティに参加して、リアルタイムのディスカッション、ユーザー同士のサポート、メリディアン チームとの直接の交流をお楽しみください。
デフォルトの事前分布のパラメータ化
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
メリディアンには、各介入群変数の KPI に対する因果効果をパラメータ化する方法が複数あり、各オプションは、異なるモデルのパラメータ化と呼ばれます。ベイズ推定では、モデルのパラメータに事前分布を設定する必要があります。したがって、モデルのパラメータ化によって、事前分布を設定する具体的な対象が決まります。
事前分布タイプは、介入群タイプごとに指定できます。ModelSpec
には、media_prior_type
、rf_prior_type
、organic_media_prior_type
、organic_rf_prior_type
、non_media_treatments_prior_type
の引数があります。これらの引数により、事前分布を ROI、mROI、貢献度、または係数の平均に適用するかどうかを指定できます。なお、ROI 事前分布と mROI 事前分布は、有料メディアでのみ使用できます。
PriorDistribution
オブジェクトには、介入群タイプと事前分布タイプの組み合わせごとに引数があります。各介入群タイプについて、選択した事前分布タイプに対応する引数のみが使用されます。他の引数は無視されます。たとえば、R&F 以外の有料メディアに対応する引数は、roi_m
、mroi_m
、contribution_m
、beta_m
です。media_prior_type
が 'roi'
の場合、roi_m
が使用され、他は無視されます。
デフォルトの事前分布はモデルのパラメータ化ごとに異なります。以下の表は、各モデルのパラメータ化のデフォルトの事前分布をまとめたものです。
以下の表に、有料メディアが KPI に及ぼす因果効果に関するモデルのパラメータ化とデフォルトの事前分布の概要を示します。これらは、ModelSpec
の media_prior_type
と rf_prior_type
の各引数に応じて異なります。モデルのパラメータ化とデフォルトの事前分布は、結果が収益であるかどうかによっても異なります。KPI が収益である場合、または revenue_per_kpi
が InputData
に渡される場合、結果は収益となります。KPI が収益ではなく、revenue_per_kpi
が InputData
に渡されない場合、結果は収益ではありません(「収益以外」)。この表には、PriorDistribution
コンテナの対応するパラメータを示す列も含まれており、これを使って事前分布をカスタマイズできます。
モデルタイプ |
デフォルトの事前分布 |
media_prior_type/rf_prior_type |
結果 |
事前分布のタイプ |
PriorDistribution のパラメータ |
'roi' (デフォルト) |
収益 |
ROI |
roi_m 、roi_rf |
'roi' (デフォルト) |
収益以外 |
有料メディア合計貢献度 |
roi_m 、roi_rf |
'mroi' |
収益 |
mROI |
mroi_m 、mroi_rf |
'mroi' |
収益以外 |
デフォルトはなく、カスタムで設定する必要があります |
mroi_m 、mroi_rf |
'contribution' |
収益 |
貢献度 |
contribution_m 、contribution_rf |
'contribution' |
収益以外 |
貢献度 |
contribution_m 、contribution_rf |
'coefficient' |
収益 |
係数 |
beta_m 、beta_rf |
'coefficient' |
収益以外 |
係数 |
beta_m 、beta_rf |
各モデルのパラメータ化のデフォルトの事前分布として使用される分布は、デフォルトの事前分布にまとめられています。
表に記載されている各シナリオで、表に示されている適切な PriorDistribution
のパラメータを使ってカスタムの事前分布を設定します。カスタムの事前分布を設定する際は、その設定対象を理解することが重要です。ROI、mROI、貢献度の定義について詳しくは、ROI、mROI、貢献度のパラメータ化をご覧ください。係数の定義について詳しくは、モデル仕様をご覧ください。有料メディア合計貢献度の事前分布について詳しくは、カスタムの有料メディア合計貢献度の事前分布をご覧ください。
オーガニック メディアの介入群効果のデフォルトの事前分布は organic_media_prior_type
と organic_rf_prior_type
の各引数で指定します。'contribution'
と 'coefficient'
から選択でき、デフォルトは 'contribution'
です。貢献度事前分布を使用する場合、contribution_om
と contribution_orf
の各パラメータで事前分布を指定します。係数事前分布を使用する場合は、beta_om
と beta_orf
の各パラメータで事前分布を指定します。
non-media_treatments の介入群効果のデフォルトの事前分布は non_media_treatments_prior_type
引数で指定します。'contribution'
と 'coefficient'
から選択でき、結果が収益かどうかにかかわらず、デフォルトは 'contribution'
となります。貢献度事前分布を使用する場合、contribution_n
パラメータで事前分布を指定します。係数事前分布を使用する場合、gamma_n
パラメータで事前分布を指定します。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-17 UTC。
[null,null,["最終更新日 2025-08-17 UTC。"],[[["\u003cp\u003eMeridian allows for different model parameterizations to analyze the causal effect of treatment variables on the KPI, influencing the prior settings in Bayesian inference.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003epaid_media_prior_type\u003c/code\u003e argument in \u003ccode\u003eModelSpec\u003c/code\u003e determines whether the prior is set on ROI, mROI, or the coefficient (\u003ccode\u003ebeta_m\u003c/code\u003e), impacting the active parameters in \u003ccode\u003ePriorDistribution\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eDefault priors for paid media's causal effect vary based on the \u003ccode\u003epaid_media_prior_type\u003c/code\u003e and whether the outcome is in terms of revenue or not, while specific \u003ccode\u003ePriorDistribution\u003c/code\u003e parameters (\u003ccode\u003eroi_m\u003c/code\u003e, \u003ccode\u003emroi_m\u003c/code\u003e, \u003ccode\u003ebeta_m\u003c/code\u003e, etc.) allow customization.\u003c/p\u003e\n"],["\u003cp\u003eOrganic media and non-media treatment prior parameters (\u003ccode\u003ebeta_om\u003c/code\u003e, \u003ccode\u003ebeta_orf\u003c/code\u003e, and \u003ccode\u003egamma_n\u003c/code\u003e) are independent of the \u003ccode\u003epaid_media_prior_type\u003c/code\u003e setting and the revenue status of the KPI.\u003c/p\u003e\n"],["\u003cp\u003eThe table indicates the relationship between the \u003ccode\u003epaid_media_prior_type\u003c/code\u003e, the type of outcome, the Prior Type, and the corresponding parameter that must be customized in \u003ccode\u003ePriorDistribution\u003c/code\u003e.\u003c/p\u003e\n"]]],["Meridian allows setting priors for causal effects using `ModelSpec`'s `paid_media_prior_type`, choosing between ROI, mROI, or coefficient (beta_m). The `PriorDistribution` object defines these priors via `roi_m`, `mroi_m`, `beta_m` (for paid media), or `beta_om`/`beta_orf`(organic) or `gamma_n` (non-media). Default priors depend on `paid_media_prior_type` and whether the outcome is revenue-based, for example, 'roi' type for revenue default to ROI. Users can set custom priors with the corresponding parameters in `PriorDistribution`.\n"],null,["# Default prior parameterizations\n\nMeridian offers multiple ways to parameterize the causal effect of each\ntreatment variable on the KPI. We refer to each option as different\n*model parameterizations*. In Bayesian inference, a prior must be set on the\nparameters of the model. So the model parameterization determines what precisely\none is setting a prior on.\n\nThe prior type can be specified for each treatment type. The\n[`ModelSpec`](/meridian/reference/api/meridian/model/spec/ModelSpec) contains\narguments `media_prior_type`, `rf_prior_type`, `organic_media_prior_type`,\n`organic_rf_prior_type`, and `non_media_treatments_prior_type`, which allow\nyou to specify whether a prior is placed on ROI, mROI, contribution, or the\ncoefficient mean. (ROI and mROI priors are only available for paid media.)\n\nThe\n[`PriorDistribution`](/meridian/reference/api/meridian/model/prior_distribution/PriorDistribution)\nobject has an argument for each combination of treatment type and prior type.\nFor each treatment type, only the argument corresponding to the selected prior\ntype is used. The others are ignored. For example, the arguments corresponding\nto non-R\\&F paid media are `roi_m`, `mroi_m`, `contribution_m`, and `beta_m`. If\n`media_prior_type` is `'roi'`, then `roi_m` is used and the others are ignored.\n\nEach model parameterization has a different default prior distribution. The\nfollowing tables summarize the default priors under each model parameterization.\n\nPaid media\n----------\n\nThe following table summarizes the model parameterization and default priors for\nthe causal effect of paid media on the KPI. These vary based on the\n`media_prior_type` and `rf_prior_type` arguments in `ModelSpec`. The model\nparameterization and default priors also depend on whether\n[outcome](/meridian/docs/basics/glossary) is revenue. Outcome is revenue when\neither the KPI is revenue or when `revenue_per_kpi` is passed to `InputData`.\nOutcome is not revenue (\"non-revenue\") when the KPI is not revenue and\n`revenue_per_kpi` is not passed to `InputData`. The table also includes a column\nindicating the corresponding parameter in the `PriorDistribution` container that\nallows one to customize the prior.\n\n| Model Type || Default Prior ||\n| `media_prior_type/rf_prior_type` | Outcome | Prior Type | Parameter in `PriorDistribution` |\n|----------------------------------|-------------|-------------------------------|-------------------------------------|\n| `'roi'` (default) | Revenue | ROI | `roi_m`, `roi_rf` |\n| `'roi'` (default) | Non-revenue | Total paid media contribution | `roi_m`, `roi_rf` |\n| `'mroi'` | Revenue | mROI | `mroi_m`, `mroi_rf` |\n| `'mroi'` | Non-revenue | No default, must set custom | `mroi_m`, `mroi_rf` |\n| `'contribution'` | Revenue | Contribution | `contribution_m`, `contribution_rf` |\n| `'contribution'` | Non-revenue | Contribution | `contribution_m`, `contribution_rf` |\n| `'coefficient'` | Revenue | Coefficient | `beta_m`, `beta_rf` |\n| `'coefficient'` | Non-revenue | Coefficient | `beta_m`, `beta_rf` |\n\nThe distribution used as the default prior for each model parameterization is\nsummarized in\n[Default prior distributions](/meridian/docs/advanced-modeling/default-prior-distributions).\n\nUnder each scenario listed in the table, set a custom prior using the\nappropriate `PriorDistribution` parameter indicated in the table. When setting a\ncustom prior, it's important to understand what you are setting a custom prior\non. For more on the definition of ROI, mROI, and Contribution see [ROI, mROI,\nand Contribution parameterizations](/meridian/docs/basics/roi-mroi-contribution-parameterizations).\nFor more on the definition of a coefficient, see the [model\nspecification](/meridian/docs/basics/model-spec). For more on the total paid\nmedia contribution prior, see [Custom total paid media contribution\nprior](/meridian/docs/advanced-modeling/unknown-revenue-kpi-default#default-total-paid-media-contribution-prior).\n\nOrganic media\n-------------\n\nThe default prior for treatment effects of organic media is specified by the\n`organic_media_prior_type` and `organic_rf_prior_type` arguments. The options\nare `'contribution'` and `'coefficient'`, with `'contribution'` being the\ndefault. If contribution priors are used, then a prior distribution is specified\non the\n[`contribution_om` and `contribution_orf`](/meridian/docs/advanced-modeling/default-prior-distributions#contribution_m_contribution_rf_contribution_om_and_contribution_orf)\nparameters. If coefficient priors are used, then a prior distribution is\nspecified on the\n[`beta_om` and `beta_orf`](/meridian/docs/advanced-modeling/default-prior-distributions#beta_m_beta_rf_beta_om_and_beta_orf)\nparameters.\n\nNon-media treatments\n--------------------\n\nThe default prior for treatment effects of non-media_treatments is specified by\nthe `non_media_treatments_prior_type` argument. The options are `'contribution'`\nand `'coefficient'`, with `'contribution'` being the default regardless of\nwhether the outcome is revenue. If contribution priors are used, then a prior\ndistribution is specified on the\n[`contribution_n`](/meridian/docs/advanced-modeling/default-prior-distributions#contribution_n)\nparameter. If coefficient priors are used, then a prior distribution is\nspecified on the\n[`gamma_n`](/meridian/docs/advanced-modeling/default-prior-distributions#gamma_c_and_gamma_n)\nparameter."]]