subject

1. Load the dataset bike. csv into memory. Then split the data into a training set containing 2/3 of the original data (test set containing remaining 1/3 of the original data). a. See Code 2. Build a tree model using function tree(). a. The response is count and the predictors are season, holiday, workingday, temp, atemp, humidity, windspeed, casual, and registered. b. Perform cross-validation to choose the best tree by calling cv. tree(). c. Plot the model results of b) and determine the best size of the optimal tree. d. Prune the tree by calling prune. tree() function with the best size found in c). e. Plot the best tree model. f. Compute the test error using the test data set. 3. Build a random forest model using function randomForest() a. The response is count and the predictors are season, holiday, workingday, temp, atemp, humidity, windspeed, casual, and registered. b. Compute the test error using the test data set. c. Extract variable importance measure using importance() function. d. Plot the variable importance using function varImpPlot(). Which are the top 2 important predictors in this model

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 18:30, naomicervero
What type of weird relationship this is analogy show? dissolve: solidify: : noise: silence
Answers: 2
image
Computers and Technology, 22.06.2019 06:30, Nicki3729
Exchanging which type of data uses the least bandwidth? music photographs video voice bandwidth- the amount of data that can be moved between two points in a set time period
Answers: 1
image
Computers and Technology, 23.06.2019 13:30, juliajordan427
Best laptops for college [$100-$500 range]?
Answers: 2
image
Computers and Technology, 23.06.2019 19:00, brittneyrenae7338
This question involves a class named textfile that represents a text file. public class textfile { private string filename; private string filename; private arraylist words; // constructors not shown // postcondition: returns the number of bytes in this file public int filesize() { } // precondition: 0 < = index < words. size() // postcondition: removes numwords words from the words arraylist beginning at // index. public void deletewords(int index, int numwords) { } // precondition: 0 < = index < = words. size() // postcondition: adds elements from newwords array to words arraylist beginning // at index. pub lic voidaddwords(int index, string[] newwords) { } // other methods not shown } complete the filesize() method. the filesize() is computed in bytes. in a text file, each character in each word counts as one byte. in addition, there is a space in between each word in the words arraylist, and each of those spaces also counts as one byte. for example, suppose the words arraylist stores the following words: { mary had a little lamb; its fleece was white as snow. } the filesize() method would compute 4 + 3 + 1 + 6 + 5 + 4 + 6 + 3 + 5 + 2 + 5 as the sum of the lengths of each string in the arraylist. the value returned would be this sum plus 10, because there would also be 10 spaces in between the 11 words. complete the filesize() method below: // postcondition: returns the number of bytes in this file public int filesize() { }
Answers: 1
You know the right answer?
1. Load the dataset bike. csv into memory. Then split the data into a training set containing 2/3 of...

Questions in other subjects: