Actuarial Outpost
 
Go Back   Actuarial Outpost > Exams - Please Limit Discussion to Exam-Related Topics > SoA/CAS Preliminary Exams > Exam PA: Predictive Analytics
FlashChat Actuarial Discussion Preliminary Exams CAS/SOA Exams Cyberchat Around the World Suggestions

Search Actuarial Jobs by State @ DWSimpson.com:
AL AK AR AZ CA CO CT DE FL GA HI ID IL IN IA KS KY LA
ME MD MA MI MN MS MO MT NE NH NJ NM NY NV NC ND
OH OK OR PA RI SC SD TN TX UT VT VA WA WV WI WY

Reply
 
Thread Tools Search this Thread Display Modes
  #101  
Old 04-13-2019, 07:23 PM
NchooseK NchooseK is offline
Member
SOA Non-Actuary
 
Join Date: Nov 2012
Location: Philly area
College: Swarthmore College (BA Mathematics), Villanova University (MS Applied Stat)
Posts: 353
Default

Quote:
Originally Posted by TranceBrah View Post
  • there is no analog. we would only use confusion matrixes for classifaction problems. the accuracy assessment would be the same as a linear model - simplest is MSE
  • what are some things you feel are inadequate? It seems to answer everything fine to me?
If this is an offer to answer some of my questions, consider me quite appreciative.

1) We first fit the most complex regression tree (within constraints such as max depth, etc) by specifying CP=0. rpart uses x-validation to determine the prediction error for each level of the complexity parameter investigated.

2) Prune the tree by capturing the CP that minimizes the cross-validation error, xerror. (Is this cost complexity pruning??). The following output shoudl do this:
Code:
pdt2 <- prune(dt2, cp = dt2$cptable[which.min(dt2$cptable[, "xerror"]), "CP"])
Summarize and plot?
MSE values emerge in the output? Do anything with these yet?
Pruned tree plot shown and summarized with summary().
Estimates given for each split.

Next chunk uses 6-fold cross-validation folds and expands the grid to search for cp from 0, 0.05, 0.005.

3) The final model is fitted:
Code:
caret1 <-train(dt2.f, 
               data = AutoClaim.training,
               method = "rpart",
               trControl = fitControl,
               metric="RMSE",
               tuneGrid = Grid,
               na.action = na.pass)
NO USE OR MENTION OF TEST/VALIDATION DATA SETS :/

Appropriate--I believe-- the *full* model runs the entire data set. Final model tree shown, along with CP vs RMSE (CV) plot.
I wish the validation/testing set(s) we not ignored in the only regression tree example.

I also didn't see any predict() functions; how do we determine the RMSE that "we report."

THANK YOU
__________________
Exams: P | FM | C | MFE | LTAM | SRM Credit | PA

VEE: Statistics | Finance | Economics

FAP: 1 | 2 | 3 | 4 | IA | 6 | 7 | FA

Conferences: APC
Reply With Quote
  #102  
Old 04-13-2019, 08:25 PM
TranceBrah's Avatar
TranceBrah TranceBrah is offline
Member
SOA
 
Join Date: Mar 2014
Location: Best Coast
Posts: 255
Default

Quote:
Originally Posted by NchooseK View Post
I wish the validation/testing set(s) we not ignored in the only regression tree example.

I also didn't see any predict() functions; how do we determine the RMSE that "we report."
Are you referring to the sample Student project or a module? They didn't use regression trees for that since it was a classification problem (pass or fail).

You can calculate ur own RMSE using ur predictions.
Get ur predictions from pred <- predict(tree.model, newdata = "testdata")
rmse <- sqrt(sum((pred - testdata$target)^2)/length(testdata$target))
Reply With Quote
  #103  
Old 04-13-2019, 10:02 PM
NchooseK NchooseK is offline
Member
SOA Non-Actuary
 
Join Date: Nov 2012
Location: Philly area
College: Swarthmore College (BA Mathematics), Villanova University (MS Applied Stat)
Posts: 353
Default

Quote:
Originally Posted by TranceBrah View Post
Are you referring to the sample Student project or a module? They didn't use regression trees for that since it was a classification problem (pass or fail).

You can calculate ur own RMSE using ur predictions.
Get ur predictions from pred <- predict(tree.model, newdata = "testdata")
rmse <- sqrt(sum((pred - testdata$target)^2)/length(testdata$target))
What you are written is helpful--so thank you.

FWIW, I am referring to ASA 7.2, which devotes as much time to the regression as secondary schools do to important black history figures not named MLK, Parks or Tubman.
__________________
Exams: P | FM | C | MFE | LTAM | SRM Credit | PA

VEE: Statistics | Finance | Economics

FAP: 1 | 2 | 3 | 4 | IA | 6 | 7 | FA

Conferences: APC
Reply With Quote
  #104  
Old 04-14-2019, 08:19 PM
Alec R - Davos Analytics Alec R - Davos Analytics is offline
Non-Actuary
 
Join Date: Mar 2019
Posts: 7
Default

Quote:
Originally Posted by gaudettj View Post
I'm debating doing this in June. I studied GLMs at University, did pretty well on top of finding it interesting, so I'm not overly concerned about the technical side of it. Anybody think this is too short of a time frame to get through the modules and absorb the material?
We think it's doable. When making our study manual we spoke with multiple students who were successful in the first sitting and only started studying for it after writing LTAM.
Reply With Quote
  #105  
Old 04-15-2019, 01:11 PM
ActuariallyDecentAtBest ActuariallyDecentAtBest is offline
Member
SOA
 
Join Date: Dec 2016
Posts: 409
Default

Quote:
Originally Posted by ShannonB1 View Post
Thanks!
Reply With Quote
  #106  
Old 04-16-2019, 07:23 AM
RiskyBusiness7 RiskyBusiness7 is offline
Member
SOA
 
Join Date: Apr 2018
Posts: 56
Default

anyone know where 1.12% is coming from on slide 75 of mod 6?
Reply With Quote
  #107  
Old 04-16-2019, 11:46 AM
DukeSilver's Avatar
DukeSilver DukeSilver is offline
Member
SOA
 
Join Date: Dec 2018
Location: Boise, ID
Favorite beer: Black Butte Porter
Posts: 112
Default

Thank you NchooseK and avocado for the response, I appreciate it. Talked with my manager and am going to start studying after writing LTAM in 2 weeks! Oh boy.
Reply With Quote
  #108  
Old 04-16-2019, 01:13 PM
KarimZ's Avatar
KarimZ KarimZ is offline
Member
SOA
 
Join Date: May 2015
Location: Pakistan
College: Graduate, Bsc Accounting and Finance
Posts: 210
Default

Anyone came across some video tutorials for R that are free and helpful?

Using the book R for Everyone and progressing very slowly. Still on Module 1 and Chapter 7 of the book, dont think Ill make it in time for the exam in June.
__________________
P FM MFE C LTAM PA

VEEs

FAP

APC

ERM Module

Reply With Quote
  #109  
Old 04-16-2019, 01:22 PM
ActuariallyDecentAtBest ActuariallyDecentAtBest is offline
Member
SOA
 
Join Date: Dec 2016
Posts: 409
Default

Quote:
Originally Posted by KarimZ View Post
Anyone came across some video tutorials for R that are free and helpful?

Using the book R for Everyone and progressing very slowly. Still on Module 1 and Chapter 7 of the book, dont think Ill make it in time for the exam in June.
Seems pretty doable.
Reply With Quote
  #110  
Old 04-16-2019, 08:05 PM
Mancusian23 Mancusian23 is offline
SOA
 
Join Date: Oct 2017
Studying for PA
College: Drake
Posts: 5
Default Section 8.2

In section 8.2, the module keeps referring to the "elbow" in the attached graph and it goes on to say "they form three easily identified groups." Can someone help me find the elbow in the graph and how they got to the "easily identified" groups and the value conditions? I appreciate the help!
Attached Images
 
__________________
__________________
P FM MFE C LTAM SRM PA FAP
ECON Finance Stats
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -4. The time now is 11:44 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
*PLEASE NOTE: Posts are not checked for accuracy, and do not
represent the views of the Actuarial Outpost or its sponsors.
Page generated in 0.46972 seconds with 10 queries