SlideShare a Scribd company logo
1 of 8
Download to read offline
Clustering Analysis
Problem of Clustering Analysis on Business Application
クラスター分析は、放り込んだ変数を使って、ただオブザベーションを任意のクラスター数に分けてみるだ
け。分けた後、分析者が主観的に各クラスターに意味づけを行う。
分析としては非常に説得力が低い…。分けたことによって「何か気づくことはあるかな?」といった程度。
クラスター分析に用いた変数はどれがビジネス目標の達成に重要?といった質問(コンバージョンへの寄与
度など)にはもちろん答えられない。
あくまでも、クラスターを分類するのに大きく/小さく寄与しているかのみ把握可能。
⇒ 教師なし学習なのであたりまえ。
 クラスター分析は、投入される変数の影響をいかに受けるか?
 意味のある分類(ビジネス目標に役立つ分類)を行うことができるか?
Experiment by Simulation 1 (1)
(1) 多変量正規分布(下左の“分散共分散行列”を指定)から7列、1,000行の乱数を作成。
指定した分散共分散行列
y_ x1_ x2_ z1_ z2_ z3_ z4_
y_ 1 0.7 0.5 0 0 0 0
x1_ 0.7 1 0.6 0 0 0 0
x2_ 0.5 0.6 1 0 0 0 0
z1_ 0 0 0 1 0.8 0.6 0.4
z2_ 0 0 0 0.8 1 0.7 0.5
z3_ 0 0 0 0.6 0.7 1 0.6
z4_ 0 0 0 0.4 0.5 0.6 1
(2) すべての変数を中央値
で’0’, ’1’にカテゴリー
化。’0’群、’1’群共に
N=500。
相関係数(N=1,000)
y_ x1_ x2_ z1_ z2_ z3_ z4_
y_ 1 0.69074 0.47568 -0.00511 -0.00287 0.03206 0.05079
x1_ 1 0.58115 -0.04483 -0.02678 -0.01121 0.01509
x2_ 1 -0.02166 -0.01382 0.01712 0.00952
z1_ 1 0.79107 0.60812 0.42767
z2_ 1 0.70814 0.5107
z3_ 1 0.60694
z4_ 1
カッパ係数(N=1,000)
y_ x1_ x2_ z1_ z2_ z3_ z4_
y_ 1 0.476 0.336 -0.008 0.008 0.036 0.028
x1_ 1 0.444 -0.028 -0.056 -0.016 0.008
x2_ 1 0.004 0.008 0.032 0.056
z1_ 1 0.592 0.44 0.312
z2_ 1 0.492 0.332
z3_ 1 0.472
z4_ 1
クロス集計
y
1 0
x1
1 369 131
0 131 369
x2
1 334 166
0 166 334
z1
1 248 252
0 252 248
z2
1 252 248
0 248 252
z3
1 259 241
0 241 259
z4
1 257 243
0 243 257
Experiment by Simulation 1 (2)
(3) yを目的変数(ビジネス目標)とし、その他の変数をクラスター分析の変数とする。(yはクラスター分析の変数に使用
せず、その他の変数( x1, x2, z1, z2, z3, z4 )でクラスター分析後、yとクラスターとの関連性を見る。)
階層型クラスター分析(Ward法)で2クラスター(”Cluster 1, “Cluster 2”)作成。
x1,x2,z1,z2,z3,z4でクラスタリング
Cluster 1 Cluster 2
sum 0 1 % of 1 sum 0 1 % of 1
y 584 284 300 51.4% 416 216 200 48.1%
x1 584 260 324 55.5% 416 240 176 42.3%
x2 584 271 313 53.6% 416 229 187 45.0%
z1 584 500 84 14.4% 416 0 416 100.0%
z2 584 463 121 20.7% 416 37 379 91.1%
z3 584 408 176 30.1% 416 92 324 77.9%
z4 584 372 212 36.3% 416 128 288 69.2%
(4) 結果 - N(Cluster 1)=584, N(Cluster 2)=416
 クラスターは、yをほぼ判別しない結果となる。
 数が多いz変数(z1, z2, z3, z4)の影響を強く受け
て、クラスター分けされている。
 yと関連の強いx変数(x1, x2)のクラスターへの
影響は小さい。
→ クラスターは、相関の強い変数の塊の影響を強く受ける傾向があると考えられる。
→ もし、yが変数z( z1, z2, z3, z4 )と相関が強いデータであれば、クラスターはyを変別できると考えられる。
Experiment by Simulation 1 (3)
(5) yと相関の強い、x変数(x1, x2)のみでクラスター分析。
 x変数(x1)でクラスタリングされるので、結果、
関連の強いyも判別されやすい。
→ ビジネス目標(y)と関連の強い変数を集めることができれば、クラスター分析で、意味のあるセグメンテーショ
ンが実行できるのではないかと考えられる。
x1,x2でクラスタリング
Cluster 1 Cluster 2
sum 0 1 % of 1 sum 0 1 % of 1
y 500 131 369 73.8% 500 369 131 26.2%
x1 500 0 500 100.0% 500 500 0 0.0%
x2 500 139 361 72.2% 500 361 139 27.8%
z1 500 257 243 48.6% 500 243 257 51.4%
z2 500 264 236 47.2% 500 236 264 52.8%
z3 500 254 246 49.2% 500 246 254 50.8%
z4 500 248 252 50.4% 500 252 248 49.6%
(6) 結果 - N(Cluster 1)=500, N(Cluster 2)=500
x1変数のみでクラスター分けされた結果となる。
Experiment by Simulation 2 (1)
Simulation 1のデータから、y=‘1’のみ抽出して、クラスター分析を実施。(コンバージョンした客のみ取り出して、クラ
スター分析を実施し、各変数のクラスターへの影響を観察する。)
(1) y=‘1’のデータ - N=500
相関係数
y_ x1_ x2_ z1_ z2_ z3_ z4_
y_ 1 0.49583 0.3363 -0.02466 -0.03196 0.00285 0.05941
x1_ 1 0.50623 -0.0787 -0.04527 -0.03326 0.01275
x2_ 1 -0.01126 -0.0037 0.04586 0.00227
z1_ 1 0.79667 0.61595 0.47558
z2_ 1 0.72039 0.55442
z3_ 1 0.62006
z4_ 1
カッパ係数
y_ x1_ x2_ z1_ z2_ z3_ z4_
y_
x1_ 1 0.3762 -0.0161 -0.056 -0.0093 0.0189
x2_ 1 0.0027 0.0214 0.0647 0.0268
z1_ 1 0.624 0.4602 0.3961
z2_ 1 0.4999 0.3399
z3_ 1 0.4875
z4_ 1
クロス集計
y
1 0
x1
1 369 0
0 131 0
x2
1 334 0
0 166 0
z1
1 248 0
0 252 0
z2
1 252 0
0 248 0
z3
1 259 0
0 241 0
z4
1 257 0
0 243 0
 y=‘1’のデータのみなので、x1,x2
変数では’1’の水準が多くなり、
z1,z2,z3では、’0’,’1’の割合は約
半々と元のデータとほぼ変わら
ない。
Experiment by Simulation 2 (2)
 y=‘1’のデータのみだが、クラスターはz変数の影
響を強く影響受けており、x変数はクラスター分
類を行う上での有効な変数となっていない。
(2) x,z変数両方でのクラスター分析結果 - N(Cluster 1)=317, N(Cluster 2)=183
x1,x2,z1,z2,z3,z4でクラスタリング
Cluster 1 Cluster 2
sum 0 1 % of 1 sum 0 1 % of 1
y 317 0 317 100.0% 183 0 183 100.0%
x1 317 69 248 78.2% 183 62 121 66.1%
x2 317 105 212 66.9% 183 61 122 66.7%
z1 317 244 73 23.0% 183 8 175 95.6%
z2 317 247 70 22.1% 183 1 182 99.5%
z3 317 230 87 27.4% 183 11 172 94.0%
z4 317 195 122 38.5% 183 48 135 73.8%
→ ビジネス目標を達成したデータ(y=‘1’)を集めてきて、適当な変数を用いてクラスタリングしても、意味のある
結果は得られないと考えられる。
いずれにせよ、ビジネス目標に無関係な要因は、データが取得可能だからといって安易にクラスター分析の
変数に用いるべきではない。
Better Approach of Clustering Analysis
分析の目的変数が明確でデータの取得が可能な場合、教師あり学習(GLM、Decision Tree等)を用い、クラ
スター分析に用いる変数をスクリーニングする。 ⇒ 数学的根拠の担保
ビジネスチームの仮説から来る要望(データとして取得が可能な場合)をクラスター分析の変数に含めるこ
とを検討する。 ⇒ ビジネスチームの分析に対する合意を取る
実証検証する。実際にテストを行い、各クラスターの反応をデータとして取る。分析の仮説とあっているか
を考察。各クラスターの反応率とクラスターを構成する変数の関連を再分析。

More Related Content

Recently uploaded

Recently uploaded (8)

Hyperledger Fabricコミュニティ活動体験& Hyperledger Fabric最新状況ご紹介
Hyperledger Fabricコミュニティ活動体験& Hyperledger Fabric最新状況ご紹介Hyperledger Fabricコミュニティ活動体験& Hyperledger Fabric最新状況ご紹介
Hyperledger Fabricコミュニティ活動体験& Hyperledger Fabric最新状況ご紹介
 
MPAなWebフレームワーク、Astroの紹介 (その1) 2024/05/17の勉強会で発表されたものです。
MPAなWebフレームワーク、Astroの紹介 (その1) 2024/05/17の勉強会で発表されたものです。MPAなWebフレームワーク、Astroの紹介 (その1) 2024/05/17の勉強会で発表されたものです。
MPAなWebフレームワーク、Astroの紹介 (その1) 2024/05/17の勉強会で発表されたものです。
 
ネットワーク可視化 振る舞い検知(NDR)ご紹介_キンドリル202405.pdf
ネットワーク可視化 振る舞い検知(NDR)ご紹介_キンドリル202405.pdfネットワーク可視化 振る舞い検知(NDR)ご紹介_キンドリル202405.pdf
ネットワーク可視化 振る舞い検知(NDR)ご紹介_キンドリル202405.pdf
 
LoRaWAN無位置ロープ型水漏れセンサー WL03A-LB/LSカタログ ファイル
LoRaWAN無位置ロープ型水漏れセンサー WL03A-LB/LSカタログ ファイルLoRaWAN無位置ロープ型水漏れセンサー WL03A-LB/LSカタログ ファイル
LoRaWAN無位置ロープ型水漏れセンサー WL03A-LB/LSカタログ ファイル
 
2024年5月17日 先駆的科学計算フォーラム2024 機械学習を用いた新たなゲーム体験の創出の応用
2024年5月17日 先駆的科学計算フォーラム2024 機械学習を用いた新たなゲーム体験の創出の応用2024年5月17日 先駆的科学計算フォーラム2024 機械学習を用いた新たなゲーム体験の創出の応用
2024年5月17日 先駆的科学計算フォーラム2024 機械学習を用いた新たなゲーム体験の創出の応用
 
情報を表現するときのポイント
情報を表現するときのポイント情報を表現するときのポイント
情報を表現するときのポイント
 
Keywordmap overview material/CINC.co.ltd
Keywordmap overview material/CINC.co.ltdKeywordmap overview material/CINC.co.ltd
Keywordmap overview material/CINC.co.ltd
 
LoRaWAN無位置ロープ式水漏れセンサーWL03A 日本語マニュアル
LoRaWAN無位置ロープ式水漏れセンサーWL03A 日本語マニュアルLoRaWAN無位置ロープ式水漏れセンサーWL03A 日本語マニュアル
LoRaWAN無位置ロープ式水漏れセンサーWL03A 日本語マニュアル
 

Featured

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

Clustering2

  • 2. Problem of Clustering Analysis on Business Application クラスター分析は、放り込んだ変数を使って、ただオブザベーションを任意のクラスター数に分けてみるだ け。分けた後、分析者が主観的に各クラスターに意味づけを行う。 分析としては非常に説得力が低い…。分けたことによって「何か気づくことはあるかな?」といった程度。 クラスター分析に用いた変数はどれがビジネス目標の達成に重要?といった質問(コンバージョンへの寄与 度など)にはもちろん答えられない。 あくまでも、クラスターを分類するのに大きく/小さく寄与しているかのみ把握可能。 ⇒ 教師なし学習なのであたりまえ。  クラスター分析は、投入される変数の影響をいかに受けるか?  意味のある分類(ビジネス目標に役立つ分類)を行うことができるか?
  • 3. Experiment by Simulation 1 (1) (1) 多変量正規分布(下左の“分散共分散行列”を指定)から7列、1,000行の乱数を作成。 指定した分散共分散行列 y_ x1_ x2_ z1_ z2_ z3_ z4_ y_ 1 0.7 0.5 0 0 0 0 x1_ 0.7 1 0.6 0 0 0 0 x2_ 0.5 0.6 1 0 0 0 0 z1_ 0 0 0 1 0.8 0.6 0.4 z2_ 0 0 0 0.8 1 0.7 0.5 z3_ 0 0 0 0.6 0.7 1 0.6 z4_ 0 0 0 0.4 0.5 0.6 1 (2) すべての変数を中央値 で’0’, ’1’にカテゴリー 化。’0’群、’1’群共に N=500。 相関係数(N=1,000) y_ x1_ x2_ z1_ z2_ z3_ z4_ y_ 1 0.69074 0.47568 -0.00511 -0.00287 0.03206 0.05079 x1_ 1 0.58115 -0.04483 -0.02678 -0.01121 0.01509 x2_ 1 -0.02166 -0.01382 0.01712 0.00952 z1_ 1 0.79107 0.60812 0.42767 z2_ 1 0.70814 0.5107 z3_ 1 0.60694 z4_ 1 カッパ係数(N=1,000) y_ x1_ x2_ z1_ z2_ z3_ z4_ y_ 1 0.476 0.336 -0.008 0.008 0.036 0.028 x1_ 1 0.444 -0.028 -0.056 -0.016 0.008 x2_ 1 0.004 0.008 0.032 0.056 z1_ 1 0.592 0.44 0.312 z2_ 1 0.492 0.332 z3_ 1 0.472 z4_ 1 クロス集計 y 1 0 x1 1 369 131 0 131 369 x2 1 334 166 0 166 334 z1 1 248 252 0 252 248 z2 1 252 248 0 248 252 z3 1 259 241 0 241 259 z4 1 257 243 0 243 257
  • 4. Experiment by Simulation 1 (2) (3) yを目的変数(ビジネス目標)とし、その他の変数をクラスター分析の変数とする。(yはクラスター分析の変数に使用 せず、その他の変数( x1, x2, z1, z2, z3, z4 )でクラスター分析後、yとクラスターとの関連性を見る。) 階層型クラスター分析(Ward法)で2クラスター(”Cluster 1, “Cluster 2”)作成。 x1,x2,z1,z2,z3,z4でクラスタリング Cluster 1 Cluster 2 sum 0 1 % of 1 sum 0 1 % of 1 y 584 284 300 51.4% 416 216 200 48.1% x1 584 260 324 55.5% 416 240 176 42.3% x2 584 271 313 53.6% 416 229 187 45.0% z1 584 500 84 14.4% 416 0 416 100.0% z2 584 463 121 20.7% 416 37 379 91.1% z3 584 408 176 30.1% 416 92 324 77.9% z4 584 372 212 36.3% 416 128 288 69.2% (4) 結果 - N(Cluster 1)=584, N(Cluster 2)=416  クラスターは、yをほぼ判別しない結果となる。  数が多いz変数(z1, z2, z3, z4)の影響を強く受け て、クラスター分けされている。  yと関連の強いx変数(x1, x2)のクラスターへの 影響は小さい。 → クラスターは、相関の強い変数の塊の影響を強く受ける傾向があると考えられる。 → もし、yが変数z( z1, z2, z3, z4 )と相関が強いデータであれば、クラスターはyを変別できると考えられる。
  • 5. Experiment by Simulation 1 (3) (5) yと相関の強い、x変数(x1, x2)のみでクラスター分析。  x変数(x1)でクラスタリングされるので、結果、 関連の強いyも判別されやすい。 → ビジネス目標(y)と関連の強い変数を集めることができれば、クラスター分析で、意味のあるセグメンテーショ ンが実行できるのではないかと考えられる。 x1,x2でクラスタリング Cluster 1 Cluster 2 sum 0 1 % of 1 sum 0 1 % of 1 y 500 131 369 73.8% 500 369 131 26.2% x1 500 0 500 100.0% 500 500 0 0.0% x2 500 139 361 72.2% 500 361 139 27.8% z1 500 257 243 48.6% 500 243 257 51.4% z2 500 264 236 47.2% 500 236 264 52.8% z3 500 254 246 49.2% 500 246 254 50.8% z4 500 248 252 50.4% 500 252 248 49.6% (6) 結果 - N(Cluster 1)=500, N(Cluster 2)=500 x1変数のみでクラスター分けされた結果となる。
  • 6. Experiment by Simulation 2 (1) Simulation 1のデータから、y=‘1’のみ抽出して、クラスター分析を実施。(コンバージョンした客のみ取り出して、クラ スター分析を実施し、各変数のクラスターへの影響を観察する。) (1) y=‘1’のデータ - N=500 相関係数 y_ x1_ x2_ z1_ z2_ z3_ z4_ y_ 1 0.49583 0.3363 -0.02466 -0.03196 0.00285 0.05941 x1_ 1 0.50623 -0.0787 -0.04527 -0.03326 0.01275 x2_ 1 -0.01126 -0.0037 0.04586 0.00227 z1_ 1 0.79667 0.61595 0.47558 z2_ 1 0.72039 0.55442 z3_ 1 0.62006 z4_ 1 カッパ係数 y_ x1_ x2_ z1_ z2_ z3_ z4_ y_ x1_ 1 0.3762 -0.0161 -0.056 -0.0093 0.0189 x2_ 1 0.0027 0.0214 0.0647 0.0268 z1_ 1 0.624 0.4602 0.3961 z2_ 1 0.4999 0.3399 z3_ 1 0.4875 z4_ 1 クロス集計 y 1 0 x1 1 369 0 0 131 0 x2 1 334 0 0 166 0 z1 1 248 0 0 252 0 z2 1 252 0 0 248 0 z3 1 259 0 0 241 0 z4 1 257 0 0 243 0  y=‘1’のデータのみなので、x1,x2 変数では’1’の水準が多くなり、 z1,z2,z3では、’0’,’1’の割合は約 半々と元のデータとほぼ変わら ない。
  • 7. Experiment by Simulation 2 (2)  y=‘1’のデータのみだが、クラスターはz変数の影 響を強く影響受けており、x変数はクラスター分 類を行う上での有効な変数となっていない。 (2) x,z変数両方でのクラスター分析結果 - N(Cluster 1)=317, N(Cluster 2)=183 x1,x2,z1,z2,z3,z4でクラスタリング Cluster 1 Cluster 2 sum 0 1 % of 1 sum 0 1 % of 1 y 317 0 317 100.0% 183 0 183 100.0% x1 317 69 248 78.2% 183 62 121 66.1% x2 317 105 212 66.9% 183 61 122 66.7% z1 317 244 73 23.0% 183 8 175 95.6% z2 317 247 70 22.1% 183 1 182 99.5% z3 317 230 87 27.4% 183 11 172 94.0% z4 317 195 122 38.5% 183 48 135 73.8% → ビジネス目標を達成したデータ(y=‘1’)を集めてきて、適当な変数を用いてクラスタリングしても、意味のある 結果は得られないと考えられる。 いずれにせよ、ビジネス目標に無関係な要因は、データが取得可能だからといって安易にクラスター分析の 変数に用いるべきではない。
  • 8. Better Approach of Clustering Analysis 分析の目的変数が明確でデータの取得が可能な場合、教師あり学習(GLM、Decision Tree等)を用い、クラ スター分析に用いる変数をスクリーニングする。 ⇒ 数学的根拠の担保 ビジネスチームの仮説から来る要望(データとして取得が可能な場合)をクラスター分析の変数に含めるこ とを検討する。 ⇒ ビジネスチームの分析に対する合意を取る 実証検証する。実際にテストを行い、各クラスターの反応をデータとして取る。分析の仮説とあっているか を考察。各クラスターの反応率とクラスターを構成する変数の関連を再分析。