{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"CLTV予測","description":"Treasure AIのノートブックソリューションで、Buy Till You Die (BTYD)モデルを使用した顧客生涯価値(CLTV)予測の方法を解説します。","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":"cltv予測","__idx":0},"children":["CLTV予測"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["CLTV予測ソリューションノートブックは、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://en.wikipedia.org/wiki/Buy_Till_you_Die"},"children":["Buy Till You Die (BTYD)"]},"モデルを実装するためのオープンソースPythonライブラリ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/CamDavidsonPilon/lifetimes"},"children":["Lifetimes"]},"を使用して、顧客生涯価値（CLTV）を予測します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/112066640.443827cec104e35bc89a87cb7fb1f8ad148fdae7ac73349fd4e927d7adef41b5.3cb60505.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["BTYDは以下を使用して実装されます："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://brucehardie.com/papers/018/fader_et_al_mksc_05.pdf"},"children":["BG/NBD"]},"（Beta-Geometric/Negative Binomial Distribution）モデルは、購入頻度の分布と過去の購入後のエンゲージメント低下を記述するトランザクション履歴曲線に適合します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://www.brucehardie.com/notes/025/gamma_gamma.pdf"},"children":["Gamma-Gammaモデル"]},"は、トランザクションあたりの平均支出を予測するために使用されます。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"想定される入力","__idx":1},"children":["想定される入力"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["このノートブックは、RFM分析ノートブックと同じ入力形式を取ります。",{"$$mdtype":"Tag","name":"em","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["input_table"]},{"$$mdtype":"Tag","name":"em","attributes":{},"children":["オプションで指定されたトランザクションテーブルで、以下のように"]},{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user_column"]}]},"、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tstamp_column"]}]},"、および_",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amount_column"]},"_カラムを持ちます："]},{"$$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"},"children":["user"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"tstamp"},"children":["tstamp"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"amount"},"children":["amount"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3105285968"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2011-04-05"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["115"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1850985734"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2011-11-23"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1037"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["274382808"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2011-04-25"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["17"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["358273144"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2011-04-02"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["60"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Dataは、_",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tstamp"]},"_カラムに対して、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://dateutil.readthedocs.io/en/stable/parser.html"},"children":["dateutil"]},"でサポートされる様々な",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://en.wikipedia.org/wiki/ISO_8601"},"children":["ISO-8601日時形式"]},"およびUNIXタイムスタンプを受け付けます。"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["CLTVノートブックは、CLTV予測に日付ベースの頻度/最新性を使用します。タイムスタンプ情報は24時間間隔の解像度で処理されます。時、分、秒は使用されません。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"想定される出力","__idx":2},"children":["想定される出力"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["_output_table:_の内容："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["frequency"]},"、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["recency"]},"、および_tenure_は日数で測定されることに注意してください。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["_",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tenure"]},"_は、顧客が最初にトランザクションを発行してからの日数を表します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["今後1、3、6、12、24か月のCLTV（金額）がエクスポートされます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["パーセンタイルランクは0から100の値を取ります。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["_",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["automl_alive_prob"]},"_は、現在顧客が活動している確率を表します。"]}]},{"$$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":"customerid"},"children":["customerid"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"frequency"},"children":["frequency"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"recency"},"children":["recency"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"tenure"},"children":["tenure"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"monetary_value"},"children":["monetary_value"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"automl_cltv_1m"},"children":["automl_cltv_1m"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"automl_cltv_1m_pctile"},"children":["automl_cltv_1m_pctile"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"automl_cltv_3m"},"children":["automl_cltv_3m"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"automl_cltv_3m_pctile"},"children":["automl_cltv_3m_pctile"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"automl_cltv_6m"},"children":["automl_cltv_6m"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"automl_cltv_6m_pctile"},"children":["automl_cltv_6m_pctile"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"automl_cltv_12m"},"children":["automl_cltv_12m"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"automl_cltv_12m_pctile"},"children":["automl_cltv_12m_pctile"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"automl_cltv_24m"},"children":["automl_cltv_24m"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"automl_cltv_24m_pctile"},"children":["automl_cltv_24m_pctile"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"automl_alive_prob"},"children":["automl_alive_prob"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["12347"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["6"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["365"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["367"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["599.701667"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["9.753"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["82.832"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["28.97"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["82.832"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["57.086"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["82.832"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["110.856"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["82.832"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["209.203"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["82.832"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.998192"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["12348"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["283"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["358"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["301.48"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3.277"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["36.989"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["9.734"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["36.989"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["19.181"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["36.989"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["37.246"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["36.989"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["70.286"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["36.989"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.990166"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["12352"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["6"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["260"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["296"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["368.256667"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["7.203"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["72.581"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["21.394"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["72.581"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["42.157"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["72.581"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["81.863"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["72.581"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["154.486"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["72.616"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.996345"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["12356"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["303"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["325"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["269.905"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2.628"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["26.487"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["7.805"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["26.487"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["15.38"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["26.487"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["29.864"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["26.452"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["56.353"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["26.487"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.990548"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["12358"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["149"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["150"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["683.2"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["6.632"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["69.176"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["19.698"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["69.176"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["38.809"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["69.176"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["75.345"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["69.14"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["142.125"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["69.14"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.947"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["12359"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["274"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["331"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1941.693333"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["19.746"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["95.09"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["58.652"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["95.09"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["115.574"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["95.09"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["224.424"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["95.09"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["423.502"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["95.054"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.991769"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["12360"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["148"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["200"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["789.24"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["9.192"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["80.86"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["27.301"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["80.86"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["53.795"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["80.86"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["104.452"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["80.86"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["197.079"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["80.86"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.984178"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["入力パラメータとして_",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["audience_name"]},"_が指定されている場合、指定されたペアレントセグメントの新しい属性として以下の値が作成されます。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Xm"]},"は数か月後を表します。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["automl_cltv_Xm"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["automl_cltv_Xm_pctile"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["automl_cltv_segment"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["automl_alive_prob"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["_",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["automl_cltv_segment"]},{"$$mdtype":"Tag","name":"em","attributes":{},"children":["は、"]},{"$$mdtype":"Tag","name":"code","attributes":{},"children":["automl_cltv_12m"]},"_を分位数を使用して5つのグループ（very low/low/medium/high/very high）に分割し、5つのCDPセグメントを生成します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"グラフ出力の例","__idx":3},"children":["グラフ出力の例："]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/112066641.2a1f1649e3d01a383b836d3c906c90ec5ec10a0de7eddc21e89289f7b17c43b4.3cb60505.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/112066642.3dd47bd3d02ea9eceab9c71758eb5b4c99c56c9b88635e9cdf8678b6386986ae.3cb60505.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ワークフローの例","__idx":4},"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/cltv.dig"},"children":["Treasure Boxes"]},"でサンプルワークフローを見つけることができます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"+run_cltv:\n  ipynb>:\n    notebook: CLTV\n    input_table: ml_datasets.online_retail_txn\n    output_table: ml_results.online_retail_cltv_result\n    user_column: customerid\n    tstamp_column: invoicedate\n    amount_column: purchaseamount\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"パラメータ","__idx":5},"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":"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":["input_table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CLTV予測に使用するTDテーブルをdbname.table_nameのように指定します"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["はい"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string (dbname.table_name)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ml_dataset.td_txn"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["user_column"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ユーザーのカラム名を指定します"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["いいえ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["user"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["user"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["tstamp_column"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["タイムスタンプのカラム名を指定します"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["いいえ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["tstamp"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["time"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["amount_column"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["購入金額などのトランザクション金額のカラム名を指定します。このカラムのデータは数値が期待されます。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["いいえ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["amount"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["purchase_amount"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["output_table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CLTV予測結果をエクスポートするTDテーブルをdbname.table_nameとして指定します"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["いいえ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string (dbname.table_name)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ml_output.rfm"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["discount_rate"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.0から1.0の範囲の月次調整割引率。0は調整なしを意味します。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["いいえ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["float"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.01"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.01"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["hide_table_contents"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["テーブルの内容の表示を抑制します"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["いいえ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["false"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["false"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["audience_name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["属性テーブルをマージするオーディエンス名"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["いいえ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["master_segment_name"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["foreign_key"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["オーディエンス統合に使用されるマスターセグメントの外部キーカラム名。設定されていない場合はuser_column値が使用されます。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["いいえ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["td_canonical_id"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["segment_time_horizon"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CLTVセグメントの時間範囲（1m/3m/6m/12m/24m）"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["いいえ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["12m"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["6m"]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["_",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["discount_rate"]},"_パラメータは、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://en.wikipedia.org/wiki/Discounted_cash_flow"},"children":["DCF（割引キャッシュフロー）"]},"の概念に基づいています。将来の金額を割引率で割り引いて、そのキャッシュフローの現在価値を取得し、資本コストを調整します。資本コストを回避するには0に設定できます。"]}]}]},"headings":[{"value":"CLTV予測","id":"cltv予測","depth":1},{"value":"想定される入力","id":"想定される入力","depth":2},{"value":"想定される出力","id":"想定される出力","depth":2},{"value":"グラフ出力の例：","id":"グラフ出力の例","depth":3},{"value":"ワークフローの例","id":"ワークフローの例","depth":2},{"value":"パラメータ","id":"パラメータ","depth":2}],"frontmatter":{"seo":{"title":"CLTV予測","description":"Treasure AIのノートブックソリューションで、Buy Till You Die (BTYD)モデルを使用した顧客生涯価値(CLTV)予測の方法を解説します。"}},"lastModified":"2026-06-17T07:22:53.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/products/customer-data-platform/machine-learning/automl/notebook-solutions/cltv-prediction","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}