Question
USE RSTUDIO FOR THIS TASK. PLEASE PROVIDE THE R CODE AND RESULTS IN A SCREENSHOT. Please assign the corresponding number to the answer data set:
USE RSTUDIO FOR THIS TASK. PLEASE PROVIDE THE R CODE AND RESULTS IN A SCREENSHOT. Please assign the corresponding number to the answer
data set: https://drive.google.com/file/d/1kNDzawK606UOPFnS5uEojKMwXP6MddtG/view?usp=sharing
Predicting Prices of Used Cars (Regression Trees). The file ToyotaCorolla.csv contains the data on used cars (Toyota Corolla) on sale during late summer of 2004 in the Netherlands. It has 1436 records containing details on 38 attributes, including Price, Age, Kilometers, HP, and other specifications. The goal is to predict the price of a used Toyota Corolla based on its specifications. (The example in Section 9.7 is a subset of this dataset).
Use Neural Networks method with 1 hidden layer with 3 nodes; to answer the following questions. (A neural network is a series of algorithms that endeavors to recognize underlying relationships in a set of data through a process that mimics the way the human brain operates. In this sense, neural networks refer to systems of neurons, either organic or artificial in nature..)
1. Data Preprocessing. Split the data into training (60%), and validation (40%) datasets. 2. . Run a regression tree (RT) with outcome variable Price and predictors Age_08_04, KM, Fuel_Type, HP, Automatic, Doors, Quarterly_Tax, Mfg_Guarantee, Guarantee_Period, Airco, Automatic_Airco, CD_Player, Powered_Windows, Sport_Model, and Tow_Bar. Keep the minimum number of records in a terminal node to 1, maximum number of tree levels to 100, and cp = 0:001, to make the run least restrictive. 2.1 . Which appear to be the three or four most important car specifications for predicting the car's price? 2.2 . Compare the prediction errors of the training and validation sets by examining their RMS error and by plotting the two boxplots. What is happening with the training set predictions? How does the predictive performance of the validation set compare to the training set? Why does this occur? 2.3 . How can we achieve predictions for the training set that are not equal to the actual prices?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started