Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

data science and machine learning ( r-studio) need help with lab #4 and 6. please use r-studio and provide me the code with the answer

data science and machine learning ( r-studio)

image text in transcribed

image text in transcribed

need help with lab #4 and 6. please use r-studio and provide me the code with the answer so i can learn from it. thank you.

edit:thats all the question is about. what else do you need? the usual way i do it is to install the package, import library(ISLR) and then work on the problem.

whether customer proceeds to P urchase the insurance depending on 85 variables. (a) What trees are appropriate for this problem - regression or classification? Why? (b) Split the data set half and half into a training set and a test set, respectively. Use the following code (after having loaded the required packages): set.seed(1) train

6. This problem involves the Hitters data set (a part of the ISLR package) on salaries of baseball hitters. (a) Dispose of NA observations and perform log-transformation on Salary variable. Then create a training set containing a random sample of 200 observations. library(ISLR) Hitters$LogSalary 4. We will apply tree-based models for Caravan insurance data. We will seek to predict whether customer proceeds to Purchase the insurance depending on 85 variables. (a) What trees are appropriate for this problem regression or classification? Why? (b) Split the data set half and half into a training set and a test set, respectively. Use the following code (after having loaded the required packages): set.seed(1) train

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Explain the cost of capital.

Answered: 1 week ago

Question

Define capital structure.

Answered: 1 week ago

Question

List out some inventory management techniques.

Answered: 1 week ago