{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"ネクストベストアクション","description":"Q学習を用いたユーザーの次の最適アクションを予測するAutoMLノートブック。状態と行動データから、個々のユーザーに最適な次のステップを機械学習で導き出します。","siteUrl":"https://docs.treasure.ai","lang":"en-US","jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.treasure.ai/","name":"Treasure AI","url":"https://www.treasure.ai/","logo":"https://www.treasure.ai/hubfs/assets/images/logos/primary-logo.svg"},{"@type":"WebSite","@id":"https://docs.treasure.ai/#website","name":"Treasure AI Documentation","url":"https://docs.treasure.ai/","inLanguage":["en","ja"],"publisher":{"@id":"https://www.treasure.ai/"}}]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"ネクストベストアクション","__idx":0},"children":["ネクストベストアクション"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["このノートブックは",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://en.wikipedia.org/wiki/Q-learning"},"children":["Q学習"]},"を使用して、特定の状態における各セッションのネクストベストアクションを予測します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2023-3-7_14-32-21.68aab4d930fee550adb496f54e6880744db8132c16dbf9ead00f4ee92ebde6fa.3cb60505.png","alt":""},"children":[]},"Qテーブル（状態→アクション）がトレーニングデータセット上で訓練および最適化され、各_user_id_の最新の状態に基づいてネクストベストアクションの予測を出力します。このノートブックは入力テーブルを受け取ります。入力テーブルの例は次のとおりです。"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"user_id"},"children":["user_id"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"tstamp"},"children":["tstamp"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"state"},"children":["state"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"action"},"children":["action"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"reward (オプション)"},"children":["reward (オプション)"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2a644f3f-ad33-48b3-b837-96c1e194dc17"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2021-06-14 08:58:59"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/custom-demo/"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["client_domain_organic_visit"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.0"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1740eb3c-03de-4856-891e-8f8bcffbfd6b"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2021-06-14 08:58:25"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/customers/lion/"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["client_domain_organic_visit"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.0"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["bd378622-0905-44d4-a950-53adcdfc2611"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2021-06-14 08:25:57"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["/learn/cdp-vs-dmp/"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["client_domain_organic_visit"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.0"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ノートブックは、最後の状態に基づいて各ユーザーの次のアクションを出力します。出力テーブルの例は次のとおりです。"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"user_id"},"children":["user_id"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"..."},"children":["..."]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"next_action"},"children":["next_action"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2a644f3f-ad33-48b3-b837-96c1e194dc17"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["cpc"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1740eb3c-03de-4856-891e-8f8bcffbfd6b"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["social"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["bd378622-0905-44d4-a950-53adcdfc2611"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["display"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["オプションとして、テストデータセットに対してホールドアウトテストが実施され、実際のアクション（ランダムサンプリング）と推奨アクションに基づいて支出と収益を計算します。平均CPA（Cost Per Action）と総予算を提供することで、CPA、コンバージョンの増加、および収益/ROI（Return On Investment）の利益を表示できます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["NBAの詳細については、こちらの",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://blog.treasuredata.com/blog/2023/03/03/next-best-action-marketing/"},"children":["TDブログ記事"]},"をご覧ください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ワークフローの例","__idx":1},"children":["ワークフローの例"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["サンプルワークフローは",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/treasure-data/treasure-boxes/blob/automl/machine-learning-box/automl/nba.dig"},"children":["Treasure Boxesのこちら"]},"にあります。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"+run_nba:\n  ipynb>:\n    notebook: NBA\n    train_table: ml_datasets.nba_train\n    test_table: ml_datasets.nba_test\n    budget: 10000\n    value_per_cv: 100\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"パラメータ","__idx":2},"children":["パラメータ"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"パラメータ名"},"children":["パラメータ名"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"コンソール上のパラメータ"},"children":["コンソール上のパラメータ"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"説明"},"children":["説明"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"デフォルト値"},"children":["デフォルト値"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["docker.task_mem"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Docker Task Mem"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["タスクメモリサイズ。契約しているティアに応じて、64g、128g（デフォルト）、256g、384g、または512gが利用可能です"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["128g"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["train_table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Train Table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["トレーニングに使用するTDテーブルを指定"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["test_table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Test Table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["テストと評価に使用するTDテーブルを指定"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["user_column"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["User Column"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ユーザーカラム名"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["user_id"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["tstamp_column"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tstamp Column"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["タイムスタンプカラム名"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["tstamp"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["state_column"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["State Column"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["状態カラム名"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["state"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["action_column"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Action Column"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["アクションカラム名"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["action"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["reward_column"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Reward Column"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["報酬カラム名"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["reward"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["budget"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Budget"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["総予算"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["value_per_cv"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Value Per Cv"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["コンバージョンあたりの平均値"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["neg_reward"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Neg Reward"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["負の報酬"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["-10.0"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["steps"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Steps"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Q学習で使用される総ステップ数"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["100000"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["gamma"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Gamma"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Q学習で使用される割引率"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.6"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["lr"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Lr"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Q学習で使用される学習率"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.05"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ignore_actions"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ignore Actions"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["無視するアクション"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["currency"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Currency"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["通貨記号"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["$"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["default_action_cost"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Default Action Cost"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["デフォルトのアクションコスト"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1.0"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["action_cost"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Action Cost"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ユーザー定義のアクションコスト"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["{}"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["export_q_table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Export Q Table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Qテーブルをエクスポートするためのテーブル名"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["export_state_action"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Export State Action"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["各状態の推奨アクションをエクスポートするためのテーブル名"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["export_channel_ratio"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Export Channel Ratio"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["実際のアクションと推奨アクションの比較結果をエクスポートするためのテーブル名"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["export_predictions"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Export Predictions"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["テストデータセットの予測結果をエクスポートするためのテーブル名"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["export_model_performance"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Export Model Performance"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["モデルパフォーマンスをエクスポートするためのテーブル名"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["audience_name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Audience Name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["属性テーブルをマージするためのオーディエンスペアレンツ（マスター）セグメント名"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["join_key"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Join Key"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Audience統合に使用されるマスターセグメントの結合キーカラム名。設定されていない場合は、_user_column_の値が使用されます。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]}]}]}]}]},"headings":[{"value":"ネクストベストアクション","id":"ネクストベストアクション","depth":1},{"value":"ワークフローの例","id":"ワークフローの例","depth":3},{"value":"パラメータ","id":"パラメータ","depth":3}],"frontmatter":{"seo":{"title":"ネクストベストアクション","description":"Q学習を用いたユーザーの次の最適アクションを予測するAutoMLノートブック。状態と行動データから、個々のユーザーに最適な次のステップを機械学習で導き出します。"}},"lastModified":"2026-06-17T07:22:53.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/products/customer-data-platform/machine-learning/automl/notebook-solutions/next-best-action","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}