{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"RFM分析","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"rfm分析","__idx":0},"children":["RFM分析"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Recency（最終購入日）、Frequency（購入頻度）、Monetary Value（購入金額）（RFM）は、企業の顧客ベースを購入パターンでセグメント化するマーケティング分析モデルです。具体的には、顧客のRecency（最後に購入してからの経過時間）、Frequency（購入頻度）、Monetary Value（支出金額）を評価します。Recency、Frequency、Monetary Valueのそれぞれに対して分位数によるランキングが実行されます。顧客はk-meansアルゴリズムを使用してRFMスコアによってクラスタリングされ、ロイヤリスト、チャンピオン、失われた顧客などのカテゴリに分類されます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"想定される入力","__idx":1},"children":["想定される入力"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["このノートブックは、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["input_table"]}]}," オプションで指定されたトランザクションテーブルに対してRFM分析を実行します。想定される入力テーブルのスキーマは、パラメータ ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["aggregated_input"]}," に依存します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["aggregated_input"]}," が ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["False"]}," に設定されている場合、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["input_table"]}," のスキーマは次のように想定されます："]},{"$$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":["各ユーザーに対して、"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Recencyは最新のtstampからの経過日数によって定義されます"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Frequencyはトランザクション数によって定義されます"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Monetaryは合計金額によって定義されます"]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Recencyを定義するための基準日として、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["input_table"]}]}," 内の最大 ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["tstamp"]}," 値が使用されます。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["aggregated_input"]}," が ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["True"]}," に設定されている場合、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["input_table"]}," のスキーマは次のように想定されます："]},{"$$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":"strong","attributes":{},"children":["user"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["recency"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["frequency"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["monetary_value"]}]}]}]},{"$$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":["10"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["200.12"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1850985734"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["20"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["5"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["500.3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["274382808"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["30"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["50.4"]}]},{"$$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":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["aggregated_inputがFalseの場合、欠損値処理が実行されます。`aggregated_inputがTrueの場合、欠損値処理は実行されないため、事前に自分で前処理を行う必要があります。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"想定される結果","__idx":2},"children":["想定される結果"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["recency"]},"、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["frequency"]},"、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["monetary_value"]}," のそれぞれに対して分位数によるランキングが実行されます。r_quartile/f_quartile/m_quartileの分位数ランクは1から4の範囲で、値が高いほど良好です。RFMスコアは ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["(r_quartile + f_quartile + m_quartile) / 3"]}," によって定義されます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["サンプル ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["output_table"]},"："]},{"$$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":"61612"},"children":["61612"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"3181"},"children":["3181"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"4"},"children":["4"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"4115"},"children":["4115"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"3"},"children":["3"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"1"},"children":["1"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"4"},"children":["4"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"R3F1M4"},"children":["R3F1M4"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"2.6667"},"children":["2.6667"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Promising"},"children":["Promising"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"0"},"children":["0"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"R3F2M2"},"children":["R3F2M2"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["9549"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3227"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["8"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1456"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["R2F3M2"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2.3333"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Need attention"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["R1F1M1"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["21495"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3326"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["6"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2770"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["R1F2M3"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2.0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["High Value Sleeping"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["R3F2M2"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["39408"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3290"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["9"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["4893"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["4"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["4"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["R2F4M4"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3.3333"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cannot lose them"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["R3F2M2"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["8120"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3216"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["5"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1056"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["R2F1M1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1.3333"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Hibernating"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["R1F1M1"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["45110"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3818"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["133"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["R1F1M1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1.0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Lost customers"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["R1F1M1"]}]},{"$$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":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["user"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["recency"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["frequency"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["monetary_value"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["r_quartile"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["f_quartile"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["m_quartile"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["rfm_quartile"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["rfm_score"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["rfm_segment"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["rfm_cluster_id"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["rfm_cluster_rank"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ユーザーはk-meansアルゴリズムを使用してRFMスコアによってクラスタリングされます。",{"$$mdtype":"Tag","name":"em","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rfm_cluster_rank"]}]}," はクラスタの特性を説明します。クラスタサイズが3の場合、クラスタ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["R3F3M3"]}," は ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["recency"]},"、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["frequency"]},"、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["monetary_value"]}," が高く、有望なクラスタであることを表します。一方、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["R1F1M1"]}," はrecency、frequency、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["monetary_values"]}," が低いことを意味します。"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["最適なクラスタ数は ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["min_clusters"]}," から ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["max_clusters"]}," の範囲で自動的に計算されます。",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["num_clusters"]}," オプションを設定することで、この計算を上書きできます。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["audience_name"]}]}," が指定されている場合、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["output_table"]}]}," 内の ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["recency、frequency、monetary_values、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["r_quartile、f_quartile、m_quartile、rfm_score、rfm_segment、rfm_cluster_rank"]}]}," がマスターセグメントの属性列として追加され、",{"$$mdtype":"Tag","name":"em","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rfm_segment"]}]}," と ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rfm_cluster_rank"]}]}," を使用したセグメントが定義されます。"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["rfm_segment"]}," の名前は、複数のプレイヤーによって使用される業界標準の命名規則に従います。",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["rfm_segment"]}," の命名規則については、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://gist.github.com/myui/0d86fc50cacf4a813393e21eca23bca5#file-rfm_treemap-svg"},"children":["このツリーマップと疑似コード"]},"を参照してください。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["10のRFMセグメントの説明については、次の表を参照してください。"]},{"$$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":"RFM分位数値"},"children":["RFM分位数値"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Champions"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["理想的な顧客。最近購入し、頻繁に購入し、最も多く支出しています。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["R4F4M4"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Loyal Customers"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["多額の支出をしています。プロモーションに反応が良い。これらは非常にアクティブで価値の高い顧客です。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["R4F4M3、R4F3M4、R4F3M3、R3F4M4、R3F4M3、R3F3M4、R3F3M3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Potential Loyalists"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["最近の顧客で、適切な金額を支出し、複数回購入しています。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["R4F4M2、R4F3M2、R4F2M4、R4F2M3、R4F2M2、R3F4M2、R3F3M2、R3F2M4、R3F2M3、R3F2M2"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Promising"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["最近の買い物客で、比較的最近高額で購入したか、頻繁に購入しています。したがって、有望な顧客セグメントです。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["R4F4M1、R4F3M1、R4F2M1、R4F1M4、R4F1M3、R4F1M2、R3F4M1、R3F3M1、R3F2M1、R3F1M4、R3F1M3、R3F1M2"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["New Customers"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["最近購入しましたが、頻繁ではありません。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["R4F1M1、R3F1M1"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cannot lose them"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["大きな購入を頻繁に行いましたが、かなり前のことです。このセグメントから大きな収益が得られており、彼らの注意を失わないようにした方が良いでしょう。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["R2F4M4、R2F4M3、R2F3M4、R2F3M3、R2F2M4、R2F2M3、R2F1M4、R2F1M3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Need attention"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["潜在的なロイヤリストが注意を失いつつあります。したがって、注意が必要です。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["R2F4M2、R2F3M2、R2F2M2"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Hibernating"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["低支出、低頻度、かなり前に購入。彼らに注意を払う価値はありません。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["R2F4M1、R2F3M1、R2F2M1、R2F1M2、R2F1M1"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["High Value Sleeping"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["過去の潜在的ロイヤリストが眠っています。失われつつある関心を再び呼び覚ます価値があります。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["R1F4M4、R1F4M3、R1F4M2、R1F3M4、R1F3M3、R1F3M2、R1F2M4、R1F2M3、R1F2M2、R1F1M4、R1F1M3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Lost customers"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["最も低いRecency、Frequency、Monetaryスコア。このセグメントは最も優先度が低いです。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["R1F4M1、R1F3M1、R1F2M1、R1F1M2、R1F1M1"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"グラフ出力例","__idx":3},"children":["グラフ出力例："]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/249718477-45bf1e00-7438-4eaf-aded-b380891f9807.4339c4d9d9c3deb6e7284522549c73d8ea6e6e3a479f1eedc5a47e228342b05b.3cb60505.png","alt":"image"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/249718519-9e979577-7e18-48da-89b9-a4a229c7233c.20b0216e9f472269bdd2a17fe4bd45615a3e0682b114ced7ea302252d5c38b99.3cb60505.png","alt":"image"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/249718706-4c40d950-0b6b-4807-ad9f-0d43449d8c46.5eda8ed5c6d41cc0daf970567d784f4a0adfef00cc22248ca4800d0332ec21ba.3cb60505.png","alt":"Screen Shot 2023-06-29 at 17 35 08"},"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/rfm.dig"},"children":["Treasure Boxes"]},"にあります。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"+rfm:\n  ipynb>:\n    notebook: RFM\n    input_table: ml_datasets.cosmetics_store\n    user_column: user_id\n    tstamp_column: event_time\n    amount_column: price\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":["dbname.table_nameのような形式でRFM分析に使用するTDテーブルを指定します"]},{"$$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":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ml_dataset.td_rfm"]},{"$$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":"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":["RFM結果をエクスポートする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":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ml_output.rfm"]},{"$$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":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["min_clusters"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["クラスタの最小数を指定します"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["いいえ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["5"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["max_clusters"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["クラスタの最大数を指定します"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["いいえ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["8"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["25"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["num_clusters"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["クラスタの固定数を指定します"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["いいえ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$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":["disable_clustering"]},{"$$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":["aggregated_input"]},{"$$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"]}]}]}]}]}]},"headings":[{"value":"RFM分析","id":"rfm分析","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":"RFM分析"}},"lastModified":"2025-11-22T02:43:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/products/customer-data-platform/machine-learning/automl/notebook-solutions/rfm-analysis","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}