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



Reply
 
Thread Tools Search this Thread Display Modes
  #131  
Old 12-05-2018, 05:16 PM
DoMathNotMeth's Avatar
DoMathNotMeth DoMathNotMeth is offline
Member
SOA
 
Join Date: Jun 2016
Location: USA
Studying for PA
College: BU Alumnus
Posts: 109
Default

Quote:
Originally Posted by Adapt and Chill View Post
Congrats!

You'll have enough time to review. The student success RMD has code chunks in it already (compared to the term life sample project, which has nothing) so you'll probably find that you don't need to review R code/programming concepts as much as you anticipate and can focus on the communication/reporting aspect instead.
Thanks!

Awesome. I feel pretty confident in my written communication skills, so if this exam emphasizes communication as much as it seems it will I'm more optimistic about the outcome.
__________________
Exams: P FM MFE MLC C PA

FAP: 1 2 3 4 5 IA 6 7 8 FA

VEE: Econ Finance Stats
Reply With Quote
  #132  
Old 12-05-2018, 06:43 PM
Adapt and Chill's Avatar
Adapt and Chill Adapt and Chill is offline
Member
SOA AAA
 
Join Date: Sep 2017
College: Davidson College
Posts: 121
Default

Quote:
Originally Posted by Squeenasaurus View Post
I've been messing around with practice datasets lately. I'm getting pretty good at writing code without googling anything now. I think it will be crucial on test day to know what to do when your code breaks and how to fix it. I have code that I believe is important to know for the exam and I've been memorizing it too.

Starting this weekend I plan on re-doing modules 6, 7 and 8. Then with whatever time I have left I might sit down for 5 hours and write a full practice report and RMD. We'll see; in my mind that seems a little unnecessary.

Just today I was practicing with the CEO dataset here: http://instruction.bus.wisc.edu/jfre...2010/data.html

I was using COMP as my target and could not for the life of me come up with a good model. All my models were just down right terrible. I guess if that happens on exam day just address that your models are garbage and why and some potential ways to fix them. Not sure but that's probably my biggest fear at this point.
Try OJ or Carseats from the ISLR package (data = ISLR::OJ). You can make some reasonable models from either of these data sets.

I tried to practice by predicting:
1. Which brand of orange juice the customer purchased
2. Number of sales
Reply With Quote
  #133  
Old 12-06-2018, 08:43 PM
NchooseK NchooseK is offline
Member
SOA
 
Join Date: Nov 2012
Location: Philly area
Studying for PA, FAP
College: Swarthmore College (BA Mathematics), Villanova University (MS Applied Stat)
Posts: 258
Default

Quote:
Originally Posted by DoMathNotMeth View Post
That's good to hear!

I had originally planned to do my practice exam last weekend as well so I'd have more time to review and strengthen any weak spots. The wife wanted to throw a small gender reveal party (plus some other family stuff) however so I pushed it to this weekend. I think I'll still have enough time for review, but cutting it close!

And we're having a girl by the way.
Mazel Tov! What a blessing!
__________________
Exams: P | FM | C | MFE | LTAM (Confident) | SRM Credit | PA

VEE: Statistics | Finance | Economics

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

Conferences: APC
Reply With Quote
  #134  
Old 12-06-2018, 08:57 PM
Infelix13 Infelix13 is offline
SOA
 
Join Date: Aug 2015
Studying for Exam PA
Posts: 17
Default

Someone may have asked this elsewhere but I couldn't find it:

When you are using trainControl in a random forest and use the argument sampling = up or down, how do you determine which class is being over/under sampled?

I can see it intuitively by trying both that one performs way better. However don't have any real visibility on the data/making sure its doing what I'm intending it to do.

Thanks.
Reply With Quote
  #135  
Old 12-06-2018, 09:15 PM
Squeenasaurus Squeenasaurus is offline
Member
SOA
 
Join Date: Jul 2016
College: Illinois State University
Favorite beer: Lagunitas
Posts: 113
Default

Quote:
Originally Posted by Infelix13 View Post
Someone may have asked this elsewhere but I couldn't find it:

When you are using trainControl in a random forest and use the argument sampling = up or down, how do you determine which class is being over/under sampled?

I can see it intuitively by trying both that one performs way better. However don't have any real visibility on the data/making sure its doing what I'm intending it to do.

Thanks.
Not sure if there's a way to visually see it from that function but I believe it's the target variable. You would use "up" if it's under-represented in the data and "down" if it's over-represented.
Reply With Quote
  #136  
Old 12-06-2018, 09:46 PM
yahoowizard yahoowizard is offline
Member
 
Join Date: Mar 2011
Posts: 155
Default

Quote:
Originally Posted by Squeenasaurus View Post
Not sure if there's a way to visually see it from that function but I believe it's the target variable. You would use "up" if it's under-represented in the data and "down" if it's over-represented.
Connected to this, what happens if you input both?

There's a code snippet which states:

Quote:
ctrl <- trainControl(method="cv", number=4,
classProbs = TRUE,
sampling = c("down", "up")) # sample unbalanced sample up and down
In Module 7, RMD 7.3, Chunk E11b. Is it creating a balanced set by oversampling the minority and undersampling the majority?
Reply With Quote
  #137  
Old 12-07-2018, 12:24 PM
DoMathNotMeth's Avatar
DoMathNotMeth DoMathNotMeth is offline
Member
SOA
 
Join Date: Jun 2016
Location: USA
Studying for PA
College: BU Alumnus
Posts: 109
Default

Does anyone know how to compute the residuals for a lasso model? Or how to generate diagnostic plots (e.g. Q-Q plot, residuals vs. fitted) for the model?

I've tried the methods that the modules show for non-regularized regression, but I can't figure out anything for the lasso. Google wasn't much help as it showed me how to get plots using packages we will not have at the exam.
__________________
Exams: P FM MFE MLC C PA

FAP: 1 2 3 4 5 IA 6 7 8 FA

VEE: Econ Finance Stats
Reply With Quote
  #138  
Old 12-07-2018, 01:14 PM
Whoaminoneofyourbusiness's Avatar
Whoaminoneofyourbusiness Whoaminoneofyourbusiness is online now
Member
SOA
 
Join Date: Jan 2017
Location: The Grand Tournament
Studying for PA
Posts: 313
Default

I noticed that too, I've decided that if given the option I'll perform stepwise over LASSO because of that and other reasons. If we have to use regularized I'm hoping they'll help with sample code.
__________________
Spoiler:
Reply With Quote
  #139  
Old 12-07-2018, 01:20 PM
DoMathNotMeth's Avatar
DoMathNotMeth DoMathNotMeth is offline
Member
SOA
 
Join Date: Jun 2016
Location: USA
Studying for PA
College: BU Alumnus
Posts: 109
Default

Quote:
Originally Posted by Whoaminoneofyourbusiness View Post
I noticed that too, I've decided that if given the option I'll perform stepwise over LASSO because of that and other reasons. If we have to use regularized I'm hoping they'll help with sample code.
Would you accomplish this just by using the step and/or stepAIC functions? I don't recall seeing stepwise regression come up in the modules (at least by that name).
__________________
Exams: P FM MFE MLC C PA

FAP: 1 2 3 4 5 IA 6 7 8 FA

VEE: Econ Finance Stats
Reply With Quote
  #140  
Old 12-07-2018, 01:30 PM
Adapt and Chill's Avatar
Adapt and Chill Adapt and Chill is offline
Member
SOA AAA
 
Join Date: Sep 2017
College: Davidson College
Posts: 121
Default

Quote:
Originally Posted by DoMathNotMeth View Post
Would you accomplish this just by using the step and/or stepAIC functions? I don't recall seeing stepwise regression come up in the modules (at least by that name).
Yep. It was somewhere in the GLM module.

library(MASS)
stepAIC(modelobject, direction="backward")

You can do "forward" as well.
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 12:21 PM.


Powered by vBulletin®
Copyright ©2000 - 2018, 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 1.10622 seconds with 12 queries