经济代写 | econ 代写 | report | Machine learning代做 – ECON 178 S2 2022: Problem Set

ECON 178 S2 2022: Problem Set

Instructions:

• The homework has a total of 120 points. The TA will randomly pick two problems (one from the conceptual questions and one from the applied questions) to grade and these problems are worth 90 points (you will get 90 points if your answers are correct or almost correct). The remaining 30 points will be graded on completion of this assignment.
• There will be two separate submissions: one for your R code and one for your writeup.Please submitbothon Canvas (more details for the submission of the R part are given in Applied questions).
• You must read, understand, agree and sign the integrity pledge (https://academicintegrity.ucsd.edu/forms/form-pledge.html) before completing any assign- ment for ECON178. After you sign the pledge form, a receipt will be emailed to you.Please includethisreceiptinthesubmissionofyourassignmenton Canvas.

Conceptual questions

Conceptual question 1

In the textbook: 5.4.3b(ii) (p.198); 6.8.4 (p.260) parts a,b,c,d only (Recall that RSS is the Sum of Squared Residuals, training RSS is the RSS for the training set and test RSS is the RSS for the test set). Please find these questions in textbook.pdf under Modules -> Assignments.

Conceptual question 2

In the textbook: 6.8.1c (p.259), 6.8.2a (p.259), 6.8.3a,b,c,d (p.260). Please find these questions in textbook.pdf under Modules -> Assignments.

Applied questions (with the use of R)

For this question you will be asked to use tools from R for coding.

Installation

• To install R, please seehttps://www.r-project.org/.
• You will need to use R Studio to solve the problem set.

In addition to the lectures provided by the instructor and the TA, you might find the following readings useful:

• Chapter 2.3 and 3.6 in the textbook An introduction to statistical learning with applications in R.

Applied question 1

This exercise helps you get familiar with basic commands in R by working with the Forest Fires data set (Dua, D. and Graff, C., 2019, UCI Machine learning Repository;^1 see: https://archive.ics.uci.edu/ml/datasets/Forest+Fires). This data set is available on Canvas Assignments.

2. Open the data and report how many columns and rows the dataset has;
3. See the names of the variables (see online the command names);
4. Run a linear regression with area as a function of temp using the command lm;
5. Report the summary of your results (see online the command summary)
6. Plot a scatter plot of the regression (Hint: use abline() to draw the regression line)
7. Write down the interpretation of the coefficients as a comment in your .R script (Hint: see template file).

Please write all your answer and code in template_ps1.R file and submit that file on Canvas as described in the Submission section below.

from CanvasAssignments

• data_ps1.csv;
• template_ps1.R

Submission

• Open the template_ps1.R file that we provided on CanvasAssignments.
• All your solutions and code need to be saved in a single file named template_ps1_YOURFIRSTANDLASTNAME.R file. Please use the template_ps1.R pro- vided in Canvas to structure your answers.
• Any file that is not an .R will not be accepted, and the grade for this exercise will be zero.

(^1) Dua, D. and Graff, C. (2019). UCI Machine Learning Repository [http://archive.ics.uci.edu/ml]. Irvine, CA: University of California, School of Information and Computer Science.

Applied question 2

Please find AppliedQuestion_2.pdf under Modules -> Assignments, and complete the exercises in AppliedQuestion_2.pdf. Please write all your answer and code in template_ps2.R file and submit that file on Canvas similarly as Applied question 1.

from CanvasAssignments

• wine_red.txt;
• student.matG.txt;
• template_ps2.R

Applied question 3

Please find AppliedQuestion_3.pdf under Modules -> Assignments, and complete the exercises in AppliedQuestion_3.pdf. Please write all your answer and code in template_ps3.R file and submit that file on Canvas similarly as Applied question 1.