SlideShare a Scribd company logo
Laura Collett
Data science to
improve your life
March 2017
October 2017
The headlines
November 2017
Science
…please forgive the use of a pie chart
How does this apply to me though?
How may it apply to you?
• Use your own data!
My burning questions:
• What makes me happy?
• Am I getting better at running?
• What book should I read next?
/llcollett
/running
/happiness
/recbooks
So, what makes me happy?
• I tracked my mood every day in 2017…
• To see the
effect of
activities on
mood
Dataset
• Outcome is mood as a binary variable
• Binary or categorical predictor variables
• Looking at the effect of predictors on outcome in a
logistic regression model
daylio<-read_csv("daylio_2017.csv")
Descriptive statistics
• Quite optimistic in
general
• Haven’t quite defined
an ‘awful’ day…
• Possibly an upturn
at the weekends?
Check for collinearity of variables
library(GGally)
Results
model3<-glm(moodbin~sophie+friends+stats+outside+swimming+climbing,
family=binomial(link='logit'),data=daylio)
summary(model3)
More results
gmodel3<-glm(moodgreat~sophie+friends+work+outside+hikelessadventure+
hiking+reading+driving,family=binomial(link='logit'),data=daylio)
summary(gmodel3)
But am I getting better at running?
• Maximum Aerobic
Function (MAF) method
• In a nutshell: train at your
maximum aerobic heart rate in
order to build aerobic base fitness
and thus get faster at the same
heart rate
• Multilevel regression of the effect of heart
rate, slope and distance, on pace, for
multiple runs over time
Data runlist<-list(aug16,aug17,aug18,aug22,aug24,aug26,
aug28,aug30,sep13,sep15,sep16,sep17)
Model
Random effects:
Groups Name Variance Std.Dev. Corr
date (Intercept) 108.50 10.416
km 81.75 9.042 0.18
Residual 10.17 3.188
Fixed effects:
Estimate Std. Error t value
(Intercept) 414.805250 3.262865 127.13
hr -0.145002 0.008496 -17.07
slope -0.100876 0.010536 -9.57
km 5.988389 2.611040 2.29
km2 0.296926 0.011730 25.31
km3 -0.017167 0.000499 -34.40
library(lme4)
m1<-lmer(pace~hr+slope+km+km2+km3+(1+km|date),data=maf)
summary(m1)
Results
Two steps forward, one step back possibly…
Now, please recommend me a book
• Accessed reviews of the books I had on my
list, using the Goodreads API
• Created a dataset of ratings for multiple
books from multiple users (including me)
• Built a
recommender
system to
recommend
me a top 5
Goodreads API…
• Create booklist from my read (rated) and
shelved (would like a recommendation on)
books<-read_csv("goodreads_library_export.csv")
library(rgoodreads)
Sys.setenv(GOODREADS_KEY="7U8VDuR3phc4vD1WQF1g")
for (i in 1:n) {
for (j in 1:m){
ri<-j+(i-1)*m
tryCatch({
c1<-review(ri)
c2<-book(gsub(".*:","",c1$book))
c2$id<-as.numeric(c2$id)
if (c2$id %in% booklist$id) {
id[i,j]<-c2$id
rrating[i,j]<-c1$rating
rbooks<-data.frame(rrating[,j],id[,j])
}
}, error=function(e){cat("ERROR :",conditionMessage(e), "n")})
}
}
• Used rgoodreads package to request reviews from
API then save them if they are on the booklist
You can tell what books are popular already…
Who doesn’t rate The Catcher in the Rye 5/5???
…actually Liz didn’t
Recommender system
library(recommenderlab)
results<-
evaluate(scheme,algor
ithms,type="topNList"
,n=c(1,3,5,10,15,20))
scheme<-
evaluationScheme(subreal[1:9
00],method="split",train=0.9
,k=1,given=3,goodRating=5)
Results
r_ubcf<-Recommender(real[1:200],method="UBCF")
rec_ubcf<-predict(r_ubcf,real[388],n=5)
recbooks_ubcf<-as.data.frame(as(rec_ubcf,"list"))
recbooks_ubcf$id<-as.numeric(gsub("[b]","",recbooks_ubcf$u388))
recbooks_ubcf<-recbooks_ubcf[c("id")]
recbooks_ubcf<-merge(booklist,recbooks_ubcf)
User based collaborative filtering Popular items
• Both algorithms will be influenced heavily with what other people do,
so will not find “hidden gems” so to speak with this method
Summary
Data science to improve your life

More Related Content

Similar to Data science to improve your life

#1NWebinar: Digital Blindspots - A Q&A on Common Marketing Analytics Hurdles
#1NWebinar: Digital Blindspots - A Q&A on Common Marketing Analytics Hurdles#1NWebinar: Digital Blindspots - A Q&A on Common Marketing Analytics Hurdles
#1NWebinar: Digital Blindspots - A Q&A on Common Marketing Analytics Hurdles
One North
 
Multimodal Learning Analytics
Multimodal Learning AnalyticsMultimodal Learning Analytics
Multimodal Learning Analytics
Xavier Ochoa
 
Data mining 8 estimasi linear regression
Data mining 8   estimasi linear regressionData mining 8   estimasi linear regression
Data mining 8 estimasi linear regression
IrwansyahSaputra1
 
Agile Analysis 101: Agile Stats v Command & Control Maths
Agile Analysis 101: Agile Stats v Command & Control MathsAgile Analysis 101: Agile Stats v Command & Control Maths
Agile Analysis 101: Agile Stats v Command & Control Maths
Axelisys Limited
 
Counting and Sequences
Counting and SequencesCounting and Sequences
Counting and Sequences
Dan Stewart
 
Estimation Games – Pascal Van Cauwenberghe
Estimation Games – Pascal Van CauwenbergheEstimation Games – Pascal Van Cauwenberghe
Estimation Games – Pascal Van Cauwenberghe
Agile Tour Beirut
 
Ensemble Learning: The Wisdom of Crowds (of Machines)
Ensemble Learning: The Wisdom of Crowds (of Machines)Ensemble Learning: The Wisdom of Crowds (of Machines)
Ensemble Learning: The Wisdom of Crowds (of Machines)Lior Rokach
 
Essentials of machine learning algorithms
Essentials of machine learning algorithmsEssentials of machine learning algorithms
Essentials of machine learning algorithms
Arunangsu Sahu
 
Constant velocity presentation
Constant velocity presentationConstant velocity presentation
Constant velocity presentationsmithnj
 
Statistics for analytics
Statistics for analyticsStatistics for analytics
Statistics for analytics
deepika4721
 
데이터 과학 입문 5장
데이터 과학 입문 5장데이터 과학 입문 5장
데이터 과학 입문 5장
HyeonSeok Choi
 
Graphics with r
Graphics with rGraphics with r
Graphics with r
andyroberts89
 
Quettra Design Problem Solution - Deepti Chafekar
Quettra Design Problem Solution - Deepti ChafekarQuettra Design Problem Solution - Deepti Chafekar
Quettra Design Problem Solution - Deepti Chafekar
quettra
 
Coaching teams in creative problem solving
Coaching teams in creative problem solvingCoaching teams in creative problem solving
Coaching teams in creative problem solving
Flowa Oy
 
Dowhy: An end-to-end library for causal inference
Dowhy: An end-to-end library for causal inferenceDowhy: An end-to-end library for causal inference
Dowhy: An end-to-end library for causal inference
Amit Sharma
 
Data mining 7 klasifikasi k nearest neighbor and pseudo k nn
Data mining 7   klasifikasi k nearest neighbor and pseudo k nnData mining 7   klasifikasi k nearest neighbor and pseudo k nn
Data mining 7 klasifikasi k nearest neighbor and pseudo k nn
IrwansyahSaputra1
 
Finding Leverage with System Dynamics
Finding Leverage with System DynamicsFinding Leverage with System Dynamics
Finding Leverage with System Dynamics
Foundation for Healthy Generations
 
Data based segmentation @ vsco
Data based segmentation @ vscoData based segmentation @ vsco
Data based segmentation @ vsco
Ruben Kogel
 
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Simplilearn
 
10 Lessons Learned from Building Machine Learning Systems
10 Lessons Learned from Building Machine Learning Systems10 Lessons Learned from Building Machine Learning Systems
10 Lessons Learned from Building Machine Learning Systems
Xavier Amatriain
 

Similar to Data science to improve your life (20)

#1NWebinar: Digital Blindspots - A Q&A on Common Marketing Analytics Hurdles
#1NWebinar: Digital Blindspots - A Q&A on Common Marketing Analytics Hurdles#1NWebinar: Digital Blindspots - A Q&A on Common Marketing Analytics Hurdles
#1NWebinar: Digital Blindspots - A Q&A on Common Marketing Analytics Hurdles
 
Multimodal Learning Analytics
Multimodal Learning AnalyticsMultimodal Learning Analytics
Multimodal Learning Analytics
 
Data mining 8 estimasi linear regression
Data mining 8   estimasi linear regressionData mining 8   estimasi linear regression
Data mining 8 estimasi linear regression
 
Agile Analysis 101: Agile Stats v Command & Control Maths
Agile Analysis 101: Agile Stats v Command & Control MathsAgile Analysis 101: Agile Stats v Command & Control Maths
Agile Analysis 101: Agile Stats v Command & Control Maths
 
Counting and Sequences
Counting and SequencesCounting and Sequences
Counting and Sequences
 
Estimation Games – Pascal Van Cauwenberghe
Estimation Games – Pascal Van CauwenbergheEstimation Games – Pascal Van Cauwenberghe
Estimation Games – Pascal Van Cauwenberghe
 
Ensemble Learning: The Wisdom of Crowds (of Machines)
Ensemble Learning: The Wisdom of Crowds (of Machines)Ensemble Learning: The Wisdom of Crowds (of Machines)
Ensemble Learning: The Wisdom of Crowds (of Machines)
 
Essentials of machine learning algorithms
Essentials of machine learning algorithmsEssentials of machine learning algorithms
Essentials of machine learning algorithms
 
Constant velocity presentation
Constant velocity presentationConstant velocity presentation
Constant velocity presentation
 
Statistics for analytics
Statistics for analyticsStatistics for analytics
Statistics for analytics
 
데이터 과학 입문 5장
데이터 과학 입문 5장데이터 과학 입문 5장
데이터 과학 입문 5장
 
Graphics with r
Graphics with rGraphics with r
Graphics with r
 
Quettra Design Problem Solution - Deepti Chafekar
Quettra Design Problem Solution - Deepti ChafekarQuettra Design Problem Solution - Deepti Chafekar
Quettra Design Problem Solution - Deepti Chafekar
 
Coaching teams in creative problem solving
Coaching teams in creative problem solvingCoaching teams in creative problem solving
Coaching teams in creative problem solving
 
Dowhy: An end-to-end library for causal inference
Dowhy: An end-to-end library for causal inferenceDowhy: An end-to-end library for causal inference
Dowhy: An end-to-end library for causal inference
 
Data mining 7 klasifikasi k nearest neighbor and pseudo k nn
Data mining 7   klasifikasi k nearest neighbor and pseudo k nnData mining 7   klasifikasi k nearest neighbor and pseudo k nn
Data mining 7 klasifikasi k nearest neighbor and pseudo k nn
 
Finding Leverage with System Dynamics
Finding Leverage with System DynamicsFinding Leverage with System Dynamics
Finding Leverage with System Dynamics
 
Data based segmentation @ vsco
Data based segmentation @ vscoData based segmentation @ vsco
Data based segmentation @ vsco
 
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
 
10 Lessons Learned from Building Machine Learning Systems
10 Lessons Learned from Building Machine Learning Systems10 Lessons Learned from Building Machine Learning Systems
10 Lessons Learned from Building Machine Learning Systems
 

Recently uploaded

一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
ukgaet
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
ocavb
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
ewymefz
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
enxupq
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
slg6lamcq
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
ahzuo
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
nscud
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
haila53
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
nscud
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
Oppotus
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
Opendatabay
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
benishzehra469
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
Tiktokethiodaily
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
John Andrews
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
yhkoc
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
ArpitMalhotra16
 

Recently uploaded (20)

一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
 

Data science to improve your life