how you import and prepare the data for modeling and prediction, that is, Steps 6.1-6.3, with date and time (Screenshot 3). 6.4. Decision Tree model 6.4.1. Build a decision tree model using the party library and store your tree in DT (you do not need to set the pruning arguments). 6.4.2. Apply the model to the prediction dataset and store it in R_DT. # now apply the decision tree model to the prediction dataset to predict competitive values R_DT <- predict(DT, Exam1_predict) 6.4.3. How many auctions are predicted to attract bids? You may use summary() to quickly get the answer.
6.1. Import your datasets and save them as Exam1 and Exam1_predict. 6.2. Check the structure of your datasets using str(). 6.3. Select records and deal with missing values. # filter CURRENCY attribute to limit records of US dollars only Exam1_2 <- Exam1[Exam1$Currency!= 'GBP',] # verify if GBP currency records are removed and missing data issue resolved summary(Exam1_2) str(Exam1_2) # remove the attribute, currency, with one level Exam1New <- subset(Exam1_2, select = -Currency) # Check if the attribute is removed str(Exam1New) # replace the missing data in OpenPrice attribute using the minimal ofOpenPrice Exam1New$OpenPrice[which(is.na(Exam1New$OpenPrice))] <- min(Exam1New$OpenPrice, na.rm=T) #check if missing values are replaced summary(Exam1New) Take a screenshot of your R codes with date and time to show how you import and prepare the data for modeling and prediction, that is, Steps 6.1-6.3, with date and time (Screenshot 3). 6.4. Decision Tree model 6.4.1. Build a decision tree model using the party library and store your tree in DT (you do not need to set the pruning arguments). 6.4.2. Apply the model to the prediction dataset and store it in R_DT. # now apply the decision tree model to the prediction dataset to predict competitive values R_DT <- predict(DT, Exam1_predict) 6.4.3. How many auctions are predicted to attract bids? You may use summary() to quickly get the answer.
Step by step
Solved in 3 steps