Order ID:89JHGSJE83839 | Style:APA/MLA/Harvard/Chicago | Pages:5-10 |
Instructions:
Using LASSO regression to build parsimonious model in R
Using LASSO regression to build parsimonious model in R:
The purpose of this assignment is to use Least Absolute Shrinkage and Selection Operator (LASSO) to perform regularization and variable selection on a given model.
Depending on the size of the penalty term, LASSO shrinks less relevant predictors to (possibly) zero. Thus, it enables us to consider a more parsimonious model.
Please refer to questions and reference solutions with R codes (open the attached file for it) in which you will see how to use R for diabetes dataset (see the reference websites). Then use the NewYorkHousing.csv as attached we have used in assignment 1 and slightly modify the R codes you will be able to answer the following questions:
1. Load the lars package and the New York Housing dataset (as in the attached file for download).
2. Next, load the glmnet package that will be used to implement LASSO.
3. Save the MEDV as y and only use the first 12 variables (i.e., columns in New York Housing dataset) as x. While x is a set of independent variables, y is the dependent variable which is a quantitative measure of the median housing values. (Hints: can assign matrix format to the variable x).
4. Generate separate scatterplots with the line of best fit for all the predictors in x with y on the vertical axis.
5. Regress y on the predictors in x using OLS (Ordinary Least Square Regression). We will use this result as benchmark for comparison.
6. Use the glmnet function to plot the path of each of x’s variable coefficients against the L1 norm of the beta vector. This graph indicates at which stage each coefficient shrinks to zero.
7. Use the cv.glmnet function to get the cross validation curve and the value of lambda that minimizes the mean cross validation error.
8. Using the minimum value of lambda from the previous exercise, get the estimated beta matrix.
9. To get a more parsimonious model we can use a higher value of lambda that is within one standard error of the minimum.
10. Use this value of lambda to get the beta coefficients. Note that more coefficients are now shrunk to zero.
11. Please include Introudction, R codes with outputs, Figures and explanations with cover and reference pages. A good conclusion to wrap up the assignment is also expected.
12. Please refer to Example 6.1 and 6.2 of Chapter 6 in our textbook for details regarding how LASSO works so you know how to explain your results in this assignment.
References:
https://www.r-exercises.com/2017/06/12/lasso-regression-in-r-solutions/
https://www.r-exercises.com/2017/06/12/lasso-regression-in-r-exercises/
Please copy/paste screen images of your work in R, and put into a Word document for submission. Be sure to provide narrative of your answers (i.e., do not just copy/paste your answers without providing some explanation of what you did or your findings).
Using LASSO regression to build parsimonious model in R
RUBRIC |
||||||
Excellent Quality 95-100%
|
Introduction
45-41 points The background and significance of the problem and a clear statement of the research purpose is provided. The search history is mentioned. |
Literature Support 91-84 points The background and significance of the problem and a clear statement of the research purpose is provided. The search history is mentioned. |
Methodology 58-53 points Content is well-organized with headings for each slide and bulleted lists to group related material as needed. Use of font, color, graphics, effects, etc. to enhance readability and presentation content is excellent. Length requirements of 10 slides/pages or less is met. |
|||
Average Score 50-85% |
40-38 points More depth/detail for the background and significance is needed, or the research detail is not clear. No search history information is provided. |
83-76 points Review of relevant theoretical literature is evident, but there is little integration of studies into concepts related to problem. Review is partially focused and organized. Supporting and opposing research are included. Summary of information presented is included. Conclusion may not contain a biblical integration. |
52-49 points Content is somewhat organized, but no structure is apparent. The use of font, color, graphics, effects, etc. is occasionally detracting to the presentation content. Length requirements may not be met. |
|||
Poor Quality 0-45% |
37-1 points The background and/or significance are missing. No search history information is provided. |
75-1 points Review of relevant theoretical literature is evident, but there is no integration of studies into concepts related to problem. Review is partially focused and organized. Supporting and opposing research are not included in the summary of information presented. Conclusion does not contain a biblical integration. |
48-1 points There is no clear or logical organizational structure. No logical sequence is apparent. The use of font, color, graphics, effects etc. is often detracting to the presentation content. Length requirements may not be met |
|||
You Can Also Place the Order at www.collegepaper.us/orders/ordernow or www.crucialessay.com/orders/ordernow |
Using LASSO regression to build parsimonious model in R