Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

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

4,069 views

Published on

第63回発表資料です。

Published in: Marketing
  • Hello! Get Your Professional Job-Winning Resume Here - Check our website! https://vk.cc/818RFv
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

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

  1. 1. 1
  2. 2.      
  3. 3. ü  ü 
  4. 4. LTV LTV LTV
  5. 5.      
  6. 6. 1. 2. 1 3. 4.
  7. 7. A B C 0.9 0.7 0.4 2.0 2
  8. 8. P |
  9. 9. 1.  λ 2.  µ 3.  λ 4.  µ 3 5.  Λ µ 5
  10. 10. 0 Tt X × τ
  11. 11. 0 Tt X × τ
  12. 12. 0 Tt X × τ
  13. 13. 0 Tt X × τ
  14. 14. 0 Tt X × τ
  15. 15. 0 Tt X × τ
  16. 16. 0 Tt X × τ λ, µ
  17. 17. 0 Tt X × τ r, s, α, β
  18. 18. 0 Tt X × τ T
  19. 19.      
  20. 20. 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
  21. 21. > 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
  22. 22. > nrow(elog) [1] 6919 > elog<-dc.MergeTransactionsOnSameDate(elog); Started merging same-date transactions... ... Finished merging same-date transactions. > nrow(elog) [1] 6696
  23. 23. > 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
  24. 24. > 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
  25. 25. > pnbd.PlotTransactionRateHeterogeneity(params) > pnbd.PlotDropoutRateHeterogeneity(params)
  26. 26. > 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 ←
  27. 27. > pnbd.PlotFrequencyInCalibration(params, cal.cbs, 7)
  28. 28. > comp<-bgnbd.PlotFreqVsConditionalExpectedFrequency(params, T.star,cal.cbs, x.star, censor)
  29. 29. •  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
  30. 30. Thank you!

×