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


Upload your resume securely at https://www.dwsimpson.com
to be contacted when our jobs meet your skills and objectives.


Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-22-2020, 10:51 PM
jtykwok jtykwok is offline
Member
SOA
 
Join Date: Oct 2003
Studying for PA
College: Simon Fraser
Posts: 48
Default The feature matrix X in the glmnet() function

For the function:

glmnet(X, y = df$y,
family = "gaussian",
alpha = 0,
lambda = 0.1

In Module 6, two different ways to construct X was demonstrated. The first time using as.matrix() function (which creates the 6 features) and then the second time using the model.matrix() function (which creates the intercept term). It seems having the intercept term or not would not impact the result. Why is that the case?
__________________
Joseph
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 03:49 AM.


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.11137 seconds with 9 queries