SlideShare a Scribd company logo
1
 
 
 
ü  	
ü 
LTV
LTV
LTV
 
 
 
1.
2. 1
3.
4.
A
B
C
0.9
0.7
0.4
2.0
2
P |
1.  λ
2.  µ
3.  λ
4.  µ 3
5.  Λ µ
5
0 Tt
X
×
τ
0 Tt
X
×
τ
0 Tt
X
×
τ
0 Tt
X
×
τ
0 Tt
X
×
τ
0 Tt
X
×
τ
0 Tt
X
×
τ
λ, µ
0 Tt
X
×
τ
r, s, α, β
0 Tt
X
×
τ
T
 
 
 
ID
1 19970101 2 29.33
1 19970118 2 29.73
1 19970802 1 14.96
1 19971212 2 26.48
2 19970101 3 63.34
2 19970113 1 11.77
3 19970101 1 6.79
4 19970101 1 13.97
> library(dplyr)
> library(BTYD)
> cdnowElog<-system.file("data/cdnowElog.csv",package="BTYD")
> elog<-dc.ReadLines(cdnowElog,cust.idx=2,date.idx=3,sales.idx=5)
> elog$date<-as.Date(elog$date,"%Y%m%d")
> head(elog)
cust date sales
1 1 1997-01-01 29.33
2 1 1997-01-18 29.73
3 1 1997-08-02 14.96
4 1 1997-12-12 26.48
5 2 1997-01-01 63.34
6 2 1997-01-13 11.77
> nrow(elog)
[1] 6919
> elog<-dc.MergeTransactionsOnSameDate(elog);
Started merging same-date transactions...
... Finished merging same-date transactions.
> nrow(elog)
[1] 6696
> elog.cal<-elog[which(elog$date<= as.Date("1997-09-30"), ]
> split.data<-dc.SplitUpElogForRepeatTrans(elog.cal);
> freq.cbt<-dc.CreateFreqCBT(split.data$repeat.trans.elog);
> tot.cbt<-dc.CreateFreqCBT(elog)
> cal.cbt<-dc.MergeCustomers(tot.cbt, freq.cbt)
> birth.periods<-split.data$cust.data$birth.per
> last.dates<-split.data$cust.data$last.date
> cal.cbs.dates<-data.frame(birth.periods, last.dates,end.of.cal.period)
> cal.cbs<-dc.BuildCBSFromCBTAndDates(cal.cbt,cal.cbs.dates,per="week")
> head(cal.cbs)
x t.x T.cal
1 2 30.428571 38.85714
2 1 1.714286 38.85714
3 0 0.000000 38.85714
4 0 0.000000 38.85714
5 0 0.000000 38.85714
6 7 29.428571 38.85714
X, t, T
> params<-pnbd.EstimateParameters(cal.cbs);
> params
[1] 0.5533971 10.5801985 0.6060625 11.6562237
> LL<-pnbd.cbs.LL(params, cal.cbs);
> p.matrix<-c(params, LL);
> for(i in 1:2){
+ params<-pnbd.EstimateParameters(cal.cbs, params);
+ LL<-pnbd.cbs.LL(params, cal.cbs);
+ p.matrix.row<-c(params, LL);p.matrix<-rbind(p.matrix, p.matrix.row);
+ }
> colnames(p.matrix)<-c("r","alpha","s","beta","LL");
> rownames(p.matrix)<-1:3;p.matrix;
r alpha s beta LL
1 0.5533971 10.58020 0.6060625 11.65622 -9594.976
2 0.5534354 10.57952 0.6060276 11.65666 -9594.976
3 0.5533710 10.57952 0.6059074 11.65812 -9594.976
> pnbd.PlotTransactionRateHeterogeneity(params)
> pnbd.PlotDropoutRateHeterogeneity(params)
> pnbd.Expectation(params,t=52);
[1] 1.473434
> cal.cbs["1516",]
x t.x T.cal
26.00000 30.85714 31.00000
> x<-cal.cbs["1516","x"]
> t.x<-cal.cbs["1516","t.x"]
> T.cal<-cal.cbs["1516","T.cal"]
> pnbd.ConditionalExpectedTransactions(params,T.star=52,x, t.x, T.cal)
[1] 25.45647
> pnbd.PAlive(params, x, t.x, T.cal)
[1] 0.997874
← 52
←
← 52
←
> pnbd.PlotFrequencyInCalibration(params, cal.cbs, 7)
> comp<-bgnbd.PlotFreqVsConditionalExpectedFrequency(params,
T.star,cal.cbs, x.star, censor)
•  Counting Your Customers: Who Are They and What Will They Do Next?
David C. Schmittlein, Donald G. Morrison and Richard Colombo, 1987)
•  Buy ’Til You Die - A Walkthrough Daniel McCarthy, Edward Wadsworth,
2014
Thank you!

More Related Content

What's hot

Uplift Modelling 入門(1)
Uplift Modelling 入門(1)Uplift Modelling 入門(1)
Uplift Modelling 入門(1)
Yohei Sato
 
状態空間モデルの考え方・使い方 - TokyoR #38
状態空間モデルの考え方・使い方 - TokyoR #38状態空間モデルの考え方・使い方 - TokyoR #38
状態空間モデルの考え方・使い方 - TokyoR #38
horihorio
 
Jmrx 時系列データを用いた広告効果測定の実際20150529公開版
Jmrx 時系列データを用いた広告効果測定の実際20150529公開版Jmrx 時系列データを用いた広告効果測定の実際20150529公開版
Jmrx 時系列データを用いた広告効果測定の実際20150529公開版
MROC Japan
 

What's hot (20)

ベイズファクターとモデル選択
ベイズファクターとモデル選択ベイズファクターとモデル選択
ベイズファクターとモデル選択
 
ノンパラベイズ入門の入門
ノンパラベイズ入門の入門ノンパラベイズ入門の入門
ノンパラベイズ入門の入門
 
機械学習と主成分分析
機械学習と主成分分析機械学習と主成分分析
機械学習と主成分分析
 
協調フィルタリング入門
協調フィルタリング入門協調フィルタリング入門
協調フィルタリング入門
 
PRML輪読#1
PRML輪読#1PRML輪読#1
PRML輪読#1
 
Visual Studio CodeでRを使う
Visual Studio CodeでRを使うVisual Studio CodeでRを使う
Visual Studio CodeでRを使う
 
Uplift Modelling 入門(1)
Uplift Modelling 入門(1)Uplift Modelling 入門(1)
Uplift Modelling 入門(1)
 
なぜ統計学がビジネスの 意思決定において大事なのか?
なぜ統計学がビジネスの 意思決定において大事なのか?なぜ統計学がビジネスの 意思決定において大事なのか?
なぜ統計学がビジネスの 意思決定において大事なのか?
 
Prophet入門【理論編】Facebookの時系列予測ツール
Prophet入門【理論編】Facebookの時系列予測ツールProphet入門【理論編】Facebookの時系列予測ツール
Prophet入門【理論編】Facebookの時系列予測ツール
 
数学カフェ 確率・統計・機械学習回 「速習 確率・統計」
数学カフェ 確率・統計・機械学習回 「速習 確率・統計」数学カフェ 確率・統計・機械学習回 「速習 確率・統計」
数学カフェ 確率・統計・機械学習回 「速習 確率・統計」
 
最近のKaggleに学ぶテーブルデータの特徴量エンジニアリング
最近のKaggleに学ぶテーブルデータの特徴量エンジニアリング最近のKaggleに学ぶテーブルデータの特徴量エンジニアリング
最近のKaggleに学ぶテーブルデータの特徴量エンジニアリング
 
Juliaで並列計算
Juliaで並列計算Juliaで並列計算
Juliaで並列計算
 
Stan超初心者入門
Stan超初心者入門Stan超初心者入門
Stan超初心者入門
 
一般化線形混合モデル入門の入門
一般化線形混合モデル入門の入門一般化線形混合モデル入門の入門
一般化線形混合モデル入門の入門
 
状態空間モデルの考え方・使い方 - TokyoR #38
状態空間モデルの考え方・使い方 - TokyoR #38状態空間モデルの考え方・使い方 - TokyoR #38
状態空間モデルの考え方・使い方 - TokyoR #38
 
Dimensionality reduction with t-SNE(Rtsne) and UMAP(uwot) using R packages.
Dimensionality reduction with t-SNE(Rtsne) and UMAP(uwot) using R packages. Dimensionality reduction with t-SNE(Rtsne) and UMAP(uwot) using R packages.
Dimensionality reduction with t-SNE(Rtsne) and UMAP(uwot) using R packages.
 
Stanでガウス過程
Stanでガウス過程Stanでガウス過程
Stanでガウス過程
 
Jmrx 時系列データを用いた広告効果測定の実際20150529公開版
Jmrx 時系列データを用いた広告効果測定の実際20150529公開版Jmrx 時系列データを用いた広告効果測定の実際20150529公開版
Jmrx 時系列データを用いた広告効果測定の実際20150529公開版
 
マハラノビス距離とユークリッド距離の違い
マハラノビス距離とユークリッド距離の違いマハラノビス距離とユークリッド距離の違い
マハラノビス距離とユークリッド距離の違い
 
最適輸送の計算アルゴリズムの研究動向
最適輸送の計算アルゴリズムの研究動向最適輸送の計算アルゴリズムの研究動向
最適輸送の計算アルゴリズムの研究動向
 

Viewers also liked

マーケティングサイエンス徹底入門と実践Part2
マーケティングサイエンス徹底入門と実践Part2マーケティングサイエンス徹底入門と実践Part2
マーケティングサイエンス徹底入門と実践Part2
宏喜 佐野
 
『ビッグデータ時代を勝ち抜くデータマネジメント』 セミナー資料
『ビッグデータ時代を勝ち抜くデータマネジメント』 セミナー資料『ビッグデータ時代を勝ち抜くデータマネジメント』 セミナー資料
『ビッグデータ時代を勝ち抜くデータマネジメント』 セミナー資料
Akihiko Uchino
 

Viewers also liked (8)

マーケティングサイエンス徹底入門と実践Part2
マーケティングサイエンス徹底入門と実践Part2マーケティングサイエンス徹底入門と実践Part2
マーケティングサイエンス徹底入門と実践Part2
 
みどりぼん第11回 前半
みどりぼん第11回 前半みどりぼん第11回 前半
みどりぼん第11回 前半
 
#みどりぼん 11章「空間構造のある階層ベイズモデル」後半
#みどりぼん 11章「空間構造のある階層ベイズモデル」後半#みどりぼん 11章「空間構造のある階層ベイズモデル」後半
#みどりぼん 11章「空間構造のある階層ベイズモデル」後半
 
『ビッグデータ時代を勝ち抜くデータマネジメント』 セミナー資料
『ビッグデータ時代を勝ち抜くデータマネジメント』 セミナー資料『ビッグデータ時代を勝ち抜くデータマネジメント』 セミナー資料
『ビッグデータ時代を勝ち抜くデータマネジメント』 セミナー資料
 
分析のビジネス展開を考える―状態空間モデルを例に @TokyoWebMining #47
分析のビジネス展開を考える―状態空間モデルを例に @TokyoWebMining #47分析のビジネス展開を考える―状態空間モデルを例に @TokyoWebMining #47
分析のビジネス展開を考える―状態空間モデルを例に @TokyoWebMining #47
 
データ解析のための統計モデリング入門10章前半
データ解析のための統計モデリング入門10章前半データ解析のための統計モデリング入門10章前半
データ解析のための統計モデリング入門10章前半
 
はじめよう多変量解析~主成分分析編~
はじめよう多変量解析~主成分分析編~はじめよう多変量解析~主成分分析編~
はじめよう多変量解析~主成分分析編~
 
【3時間で学ぶ! スモールサクセス型 『カスタマージャーニー分析』】 slideshare公開用
【3時間で学ぶ! スモールサクセス型『カスタマージャーニー分析』】 slideshare公開用【3時間で学ぶ! スモールサクセス型『カスタマージャーニー分析』】 slideshare公開用
【3時間で学ぶ! スモールサクセス型 『カスタマージャーニー分析』】 slideshare公開用
 

Similar to Rを用いたLTV(Life Time Value)の推定

Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
Hailey_Database_Performance_Made_Easy_through_Graphics.pdfHailey_Database_Performance_Made_Easy_through_Graphics.pdf
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
cookie1969
 
03 - Average Rates of Changec Cameron 1 Sara Hill.pdf
03 - Average Rates of Changec Cameron 1 Sara Hill.pdf03 - Average Rates of Changec Cameron 1 Sara Hill.pdf
03 - Average Rates of Changec Cameron 1 Sara Hill.pdf
Dr Robert Craig PhD
 
1425655.pptffffffffffffffffffffffffffffffffffffffffffff
1425655.pptffffffffffffffffffffffffffffffffffffffffffff1425655.pptffffffffffffffffffffffffffffffffffffffffffff
1425655.pptffffffffffffffffffffffffffffffffffffffffffff
mhosn627
 
Manifold learning for bankruptcy prediction
Manifold learning for bankruptcy predictionManifold learning for bankruptcy prediction
Manifold learning for bankruptcy prediction
Armando Vieira
 
MMseqs NGS 2014
MMseqs NGS 2014MMseqs NGS 2014
MMseqs NGS 2014
Martin Steinegger
 

Similar to Rを用いたLTV(Life Time Value)の推定 (20)

Standard deviation and variance
Standard deviation and varianceStandard deviation and variance
Standard deviation and variance
 
Regression and Classification with R
Regression and Classification with RRegression and Classification with R
Regression and Classification with R
 
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
Hailey_Database_Performance_Made_Easy_through_Graphics.pdfHailey_Database_Performance_Made_Easy_through_Graphics.pdf
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
 
Bioinformatics life sciences_v2015
Bioinformatics life sciences_v2015Bioinformatics life sciences_v2015
Bioinformatics life sciences_v2015
 
Managing MariaDB Server operations with Percona Toolkit
Managing MariaDB Server operations with Percona ToolkitManaging MariaDB Server operations with Percona Toolkit
Managing MariaDB Server operations with Percona Toolkit
 
A Course in Fuzzy Systems and Control Matlab Chapter Four
A Course in Fuzzy Systems and Control Matlab Chapter FourA Course in Fuzzy Systems and Control Matlab Chapter Four
A Course in Fuzzy Systems and Control Matlab Chapter Four
 
EKON22 Introduction to Machinelearning
EKON22 Introduction to MachinelearningEKON22 Introduction to Machinelearning
EKON22 Introduction to Machinelearning
 
Cluto presentation
Cluto presentationCluto presentation
Cluto presentation
 
Distributed Multi-Level Matrix Completion for Medical Databases by Julie Josse
Distributed Multi-Level Matrix Completion for Medical Databases by Julie JosseDistributed Multi-Level Matrix Completion for Medical Databases by Julie Josse
Distributed Multi-Level Matrix Completion for Medical Databases by Julie Josse
 
Parameter estimation
Parameter estimationParameter estimation
Parameter estimation
 
03 - Average Rates of Changec Cameron 1 Sara Hill.pdf
03 - Average Rates of Changec Cameron 1 Sara Hill.pdf03 - Average Rates of Changec Cameron 1 Sara Hill.pdf
03 - Average Rates of Changec Cameron 1 Sara Hill.pdf
 
Complex models in ecology: challenges and solutions
Complex models in ecology: challenges and solutionsComplex models in ecology: challenges and solutions
Complex models in ecology: challenges and solutions
 
Julia: The language for future
Julia: The language for futureJulia: The language for future
Julia: The language for future
 
SQC Project 01
SQC Project 01SQC Project 01
SQC Project 01
 
Biostat_Chapter6_Part3.pdf Bio Statistics
Biostat_Chapter6_Part3.pdf Bio StatisticsBiostat_Chapter6_Part3.pdf Bio Statistics
Biostat_Chapter6_Part3.pdf Bio Statistics
 
1425655.pptffffffffffffffffffffffffffffffffffffffffffff
1425655.pptffffffffffffffffffffffffffffffffffffffffffff1425655.pptffffffffffffffffffffffffffffffffffffffffffff
1425655.pptffffffffffffffffffffffffffffffffffffffffffff
 
Overprov a tool for cluster overprovisioning detection
Overprov  a tool for cluster overprovisioning detectionOverprov  a tool for cluster overprovisioning detection
Overprov a tool for cluster overprovisioning detection
 
R_Proficiency.pptx
R_Proficiency.pptxR_Proficiency.pptx
R_Proficiency.pptx
 
Manifold learning for bankruptcy prediction
Manifold learning for bankruptcy predictionManifold learning for bankruptcy prediction
Manifold learning for bankruptcy prediction
 
MMseqs NGS 2014
MMseqs NGS 2014MMseqs NGS 2014
MMseqs NGS 2014
 

Recently uploaded

Unlocking Success: The Leading SEO Reseller Services in India
Unlocking Success: The Leading SEO Reseller Services in IndiaUnlocking Success: The Leading SEO Reseller Services in India
Unlocking Success: The Leading SEO Reseller Services in India
PitchPineMedia1
 
Digital Commerce Lecture for Advanced Digital & Social Media Strategy at UCLA...
Digital Commerce Lecture for Advanced Digital & Social Media Strategy at UCLA...Digital Commerce Lecture for Advanced Digital & Social Media Strategy at UCLA...
Digital Commerce Lecture for Advanced Digital & Social Media Strategy at UCLA...
Valters Lauzums
 
Relatório da OMS / Unicef / IBFAN sobre a situação do Código Internacional de...
Relatório da OMS / Unicef / IBFAN sobre a situação do Código Internacional de...Relatório da OMS / Unicef / IBFAN sobre a situação do Código Internacional de...
Relatório da OMS / Unicef / IBFAN sobre a situação do Código Internacional de...
Prof. Marcus Renato de Carvalho
 

Recently uploaded (20)

How to Run Landing Page Tests On and Off Paid Social Platforms
How to Run Landing Page Tests On and Off Paid Social PlatformsHow to Run Landing Page Tests On and Off Paid Social Platforms
How to Run Landing Page Tests On and Off Paid Social Platforms
 
Taking The Guesswork Out of Your Lead Generation Campaign
Taking The Guesswork Out of Your Lead Generation CampaignTaking The Guesswork Out of Your Lead Generation Campaign
Taking The Guesswork Out of Your Lead Generation Campaign
 
Metropolis of Dreams metaverse virtual city
Metropolis of Dreams metaverse virtual cityMetropolis of Dreams metaverse virtual city
Metropolis of Dreams metaverse virtual city
 
Snapshot of Consumer Behaviors of April 2024-EOLiSurvey (EN).pdf
Snapshot of Consumer Behaviors of April 2024-EOLiSurvey (EN).pdfSnapshot of Consumer Behaviors of April 2024-EOLiSurvey (EN).pdf
Snapshot of Consumer Behaviors of April 2024-EOLiSurvey (EN).pdf
 
The Impact of Technological Advancements on Elastic Webbing Production in Chi...
The Impact of Technological Advancements on Elastic Webbing Production in Chi...The Impact of Technological Advancements on Elastic Webbing Production in Chi...
The Impact of Technological Advancements on Elastic Webbing Production in Chi...
 
Mastering Topical Authority for SEO Success
Mastering Topical Authority for SEO SuccessMastering Topical Authority for SEO Success
Mastering Topical Authority for SEO Success
 
Digital Marketing Training In Bangalore
Digital Marketing Training In BangaloreDigital Marketing Training In Bangalore
Digital Marketing Training In Bangalore
 
Unleashing Digital Marketing's Potential: Faith Cheltenham's Insights
Unleashing Digital Marketing's Potential: Faith Cheltenham's InsightsUnleashing Digital Marketing's Potential: Faith Cheltenham's Insights
Unleashing Digital Marketing's Potential: Faith Cheltenham's Insights
 
SAUDI ARABIA MARKET OVERVIEW-PARTICLE BOARD.docx.pdf
SAUDI ARABIA MARKET OVERVIEW-PARTICLE BOARD.docx.pdfSAUDI ARABIA MARKET OVERVIEW-PARTICLE BOARD.docx.pdf
SAUDI ARABIA MARKET OVERVIEW-PARTICLE BOARD.docx.pdf
 
Unlocking Success: The Leading SEO Reseller Services in India
Unlocking Success: The Leading SEO Reseller Services in IndiaUnlocking Success: The Leading SEO Reseller Services in India
Unlocking Success: The Leading SEO Reseller Services in India
 
All Over Conclusion Digital Marketing / Digital Marketing Benefits
All Over Conclusion Digital Marketing / Digital Marketing BenefitsAll Over Conclusion Digital Marketing / Digital Marketing Benefits
All Over Conclusion Digital Marketing / Digital Marketing Benefits
 
BLOOM_May2024. Balmer Lawrie Online Monthly Bulletin
BLOOM_May2024. Balmer Lawrie Online Monthly BulletinBLOOM_May2024. Balmer Lawrie Online Monthly Bulletin
BLOOM_May2024. Balmer Lawrie Online Monthly Bulletin
 
How Your Platform Can Achieve a 90% Demo-to-Customer CVR
How Your Platform Can Achieve a 90% Demo-to-Customer CVRHow Your Platform Can Achieve a 90% Demo-to-Customer CVR
How Your Platform Can Achieve a 90% Demo-to-Customer CVR
 
A chronological journey of jobs and responsibilities.
A chronological journey of jobs and responsibilities.A chronological journey of jobs and responsibilities.
A chronological journey of jobs and responsibilities.
 
The Wealth of a Homeonwers association is analogous to the wealth of a Nation
The Wealth of a Homeonwers association is analogous to the wealth of a NationThe Wealth of a Homeonwers association is analogous to the wealth of a Nation
The Wealth of a Homeonwers association is analogous to the wealth of a Nation
 
Link Building in 2024: What Works, What Doesn't, and What's Next
Link Building in 2024: What Works, What Doesn't, and What's NextLink Building in 2024: What Works, What Doesn't, and What's Next
Link Building in 2024: What Works, What Doesn't, and What's Next
 
Digital Commerce Lecture for Advanced Digital & Social Media Strategy at UCLA...
Digital Commerce Lecture for Advanced Digital & Social Media Strategy at UCLA...Digital Commerce Lecture for Advanced Digital & Social Media Strategy at UCLA...
Digital Commerce Lecture for Advanced Digital & Social Media Strategy at UCLA...
 
Relatório da OMS / Unicef / IBFAN sobre a situação do Código Internacional de...
Relatório da OMS / Unicef / IBFAN sobre a situação do Código Internacional de...Relatório da OMS / Unicef / IBFAN sobre a situação do Código Internacional de...
Relatório da OMS / Unicef / IBFAN sobre a situação do Código Internacional de...
 
Top 3 Ways to Align Sales and Marketing Teams for Rapid Growth
Top 3 Ways to Align Sales and Marketing Teams for Rapid GrowthTop 3 Ways to Align Sales and Marketing Teams for Rapid Growth
Top 3 Ways to Align Sales and Marketing Teams for Rapid Growth
 
Ash By Ash Benson Rebrand Creative Direction
Ash By Ash Benson Rebrand Creative DirectionAsh By Ash Benson Rebrand Creative Direction
Ash By Ash Benson Rebrand Creative Direction
 

Rを用いたLTV(Life Time Value)の推定