新しく開設された
Discord コミュニティに参加して、リアルタイムのディスカッション、ユーザー同士のサポート、メリディアン チームとの直接の交流をお楽しみください。
最適化結果の出力を生成する
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
最適化の出力を生成するには、次の複数の方法があります。
最適化の可視化データをプロットすることもできます。詳細については、最適化の可視化データのプロットをご確認ください。
最適化の HTML レポートを生成する
次のコードを実行すると、最適化 HTML を生成できます。
Colab を使用してレポートを Google ドライブにエクスポートする場合は、Google ドライブを Colab ノートブックにマウントします。
from google.colab import drive
drive.mount('/content/drive')
BudgetOptimizer
クラスをインスタンス化し、optimize()
メソッドを実行します。前のセクションで説明したように、最適化をカスタマイズすることもできます。
budget_optimizer = optimizer.BudgetOptimizer(meridian)
optimization_results = budget_optimizer.optimize()
ファイル名とパスを output_model_results_summary
に渡して、最適化の概要を生成し、指定したファイルに保存します。
例:
filepath = '/content/drive/MyDrive'
optimization_results.output_optimization_summary(f'{FILENAME}.html', filepath)
ここで
filepath
は、ファイルを保存する Google ドライブ内のパスです。
FILENAME
は、ファイルに指定する名前(例: optimization_output.html
)です。ファイルの拡張子は HTML にする必要があります。
HTML レポートが生成され、指定したファイルの場所に保存されます。
最適化シナリオのプラン
最適化シナリオのプランのセクションには、最適化された予算、費用対効果、収益または KPI の増分が表示されます。また、このセクションでは、チャネルレベルで費用に適用される制約と、予算の最適化のベンチマーク期間も表示されます。
出力例:(画像をクリックして拡大)

推奨の予算配分
推奨の予算配分のグラフには、各チャネルの最適化された費用の変化が表示されます。このセクションには、現在の費用と最適化された費用の間で、各チャネルの収益または KPI の増分にどの程度の差異が生まれるのかも表示されます。
出力例:(画像をクリックして拡大)


チャネル別の最適化された応答曲線
チャネル別の最適化された応答曲線のセクションでは、応答曲線上に、チャネル単位の現在の費用と最適化された費用が表示されます。
出力例:(画像をクリックして拡大)

最適化結果の概要を生成
最適化しない場合のデータと最適化した場合のデータの概要を生成して、レポートや可視化データをカスタマイズしたり、別の形式にエクスポートしたりできます。これらの数値の概要では、結果をチャネル別に分類して詳細を把握できるため、最適化された結果と最適化されていない結果を比較できます。
これらのデータの概要は、optimize()
メソッドによって返されるデータクラス コンテナ OptimizationResults
内で使用できます。
最適化しない場合の概要
次のコマンドを実行すると、最適化しない場合のデータの概要を生成できます。
optimization_results.nonoptimized_data
出力例:
最適化の概要
次のコマンドを実行すると、最適化した場合のデータの概要を生成できます。
optimization_results.optimized_data
出力例:
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-04 UTC。
[null,null,["最終更新日 2025-08-04 UTC。"],[[["\u003cp\u003eUsers can generate an HTML report of optimization results, customizable by time range, and exportable to Google Drive for sharing.\u003c/p\u003e\n"],["\u003cp\u003eOptimization results can be summarized numerically, providing detailed media metric data for custom reporting, visualizations, or export to other formats.\u003c/p\u003e\n"],["\u003cp\u003eThe optimization HTML report includes sections for the optimization scenario plan, recommended budget allocation, and optimized response curves by channel.\u003c/p\u003e\n"],["\u003cp\u003eBoth non-optimized and optimized data summaries are accessible via the \u003ccode\u003eOptimizationResults\u003c/code\u003e dataclass, offering a detailed breakdown of results by channel.\u003c/p\u003e\n"]]],[],null,["# Generate optimization results output\n\nThere are several options to generate optimizations output. You can:\n\n- [Generate a two-page optimization HTML report](/meridian/docs/user-guide/generate-optimization-results-output#html)\n with a custom time range and export the HTML output to your Google Drive to\n share with your team.\n\n- [Generate an optimization results summary](/meridian/docs/user-guide/generate-optimization-results-output#summary)\n to customize your own reports, visualizations, or export them to another\n format. These numerical summaries of your media metrics let you access more\n detail.\n\nYou can also plot optimization visualizations. For more information, see [Plot\noptimization\nvisualizations](/meridian/docs/user-guide/plot-optimization-visualizations).\n\nGenerate the optimization HTML report\n-------------------------------------\n\nRun the following code to generate the optimization HTML:\n\n1. If you use colab and want to export the report to your Google Drive, mount\n Google Drive to your colab notebook:\n\n from google.colab import drive\n drive.mount('/content/drive')\n\n2. Instantiate the `BudgetOptimizer` class and run the `optimize()` method. You\n can also customize the optimization as described in the preceding sections.\n\n budget_optimizer = optimizer.BudgetOptimizer(meridian)\n optimization_results = budget_optimizer.optimize()\n\n3. Pass in the filename and path to `output_model_results_summary` to run the\n summary for optimization and save it to the specified file.\n\n **Example:** \n\n filepath = '/content/drive/MyDrive'\n optimization_results.output_optimization_summary(f'{FILENAME}.html', filepath)\n\n Where:\n - `filepath` is the path in your Google Drive where you want to save your file.\n - `FILENAME` is the name you want to specify for the file, for example `optimization_output.html`. The file extension must be HTML.\n\n The HTML report is generated and saved to the specified file location.\n\n### Optimization scenario plan\n\nThe **Optimization scenario plan** section shows your optimized budget, ROI and\nincremental revenue or KPI. Additionally, this section presents the constraints\nimposed on spending at the channel level and the benchmark time period for\nbudget optimization.\n\n**Example output:** (*Click the image to enlarge.*)\n\n### Recommended budget allocation\n\nThe **Recommended budget allocation** charts show the change\nin optimized spend for each channel. This section also shows the disparity in\nincremental revenue or KPI for each channel from current to optimized spending.\n\n**Example output:** (*Click the image to enlarge.*)\n\n### Optimized response curves by channel\n\nThe **Optimized response curves by channel** section displays your current and\noptimized levels of channel-level spending on the response curves.\n\n**Example output:** (*Click the image to enlarge.*)\n\nGenerate the optimization results summary\n-----------------------------------------\n\nYou can generate non-optimized and optimized data summaries to customize your\nown reports, visualizations, or export them to another format. These numeric\nsummaries go into more detail, breaking down the results by channel so that you\ncan compare the optimized and non-optimized results.\n\nThese data summaries are available inside the `OptimizationResults` dataclass\ncontainer that is returned by `optimize()` method.\n\n### Non-optimized summary\n\nRun the following command to generate the non-optimized data summary: \n\n optimization_results.nonoptimized_data\n\n**Example output:**\n\n### Optimized summary\n\nRun the following command to generate the optimized data summary: \n\n optimization_results.optimized_data\n\n**Example output:**"]]