Question: Using RStudio Problem 1 ( 1 0 pts ) This problem will use the OJ dataset which is part of the ISLR 2 package. The
Using RStudio
Problem pts
This problem will use the OJ dataset which is part of the ISLR package. The data is tracking two kinds of orange juice purchases. Run the following commands to make this dataset available for use in RStudio.
install.packagesISLR
libraryISLR
install.packagestree
librarytree
attachOJ
ViewOJ
set.seed
a pts Show the command to create a random sample of observations and the command to fit a classifier tree with Purchase as the response variable using the sample as training data.
b pts Show the summary for the tree created. What is the training error rate?
c pts Plot the tree, showing the text for each branch.
d pts Which predictor is the most important in the tree?
In this problem, continue to work with the OJ dataset to answer the questions below.
set.seed
a pts Using the test data from problem predict the response on the test data. Produce a confusion matrix using the table function for the prediction vs the actual Purchase data. What is the test error rate?
b pts Use the cvtree function for the test tree to determine the optimal tree size.
c pts Create a plot with the tree size on the xaxis and the crossvalidated deviance on the yaxis. Show the plot here.
Problem pts
This problem will continue from the trees made on training and test data from the above problems.
set.seed
a pts Prune the tree made from training data in problem using nodes in the prune.misclass function. Show the summary.
b pts Plot the pruned tree with text and paste it here.
c pts Prune the tree made from test data in problem using nodes in the prune.misclass function. Show the summary.
d pts Plot the pruned tree with text and paste it here
Problem pts
This problem will examine components and concepts related to neural networks.
a pts What are the layers that make up a neural network?
b pts What is the purpose of the input layer? What form can the inputs take?
c pts What is the purpose of the output layer?
d pts What is the purpose of the hidden layer?
e pts Why is the hidden layer named so
Problem pts
This problem will focus on deep learning and neural network concepts.
a pts What is the purpose of a convolutional neural network? What does it do
b pts What is the purpose of a recurrent neural network? What does it do
c pts What are the four key ingredients for deep learning? Define each one.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
