The information shown below records the age (in years) and the weight of their first molar (in grams) of asample of 78 stags of a herd of deer. The data was collected on the Invermark...






















The information shown below records the age (in years) and the weight of their first molar (in grams) of a









sample of 78 stags of a herd of deer. The data was collected on the Invermark estate in Scotland.






Source


: A handbook of small data sets by D.J. Hand, F. Daly et al. Springer, 1994.






For this assignment:






1)








create an Excel spreadsheet with the given values and save them as a .csv file






2)








read the .csv file using the functions read.csv(file.choose()) into a dataframe called deerDF.






3)








Clean the data frame by eliminating all rows with NAs.






4)








Create a scatterplot of Weight as a function of Age and explain if there is an indication of a






relationship between these two variables.






5)








Create the corresponding the best fitted line (abline)






6)








Determine the value of the slope and intercept obtained from the linear model. Do the values obtained






agree with the information provided by the plot?






7)








How strong is the relationship as determined by the R squared value?






The data give the age in years and the weight of the first molar tooth (in g) for a sample of 78 stags shot on the Invermark estate in Scotland.






The columns alternate in the order Age and Weight.






Age








Weight






4.4








2.42








4.45








5.24








3.19








3.90








3.26








3.07






4.8








4.48








3.18






5.4








3.36








3.61








3.71








3.57








3.33








2.72








3.64








2.61






3.89








3.30








2.62








3.10






5.8








4.03






6.4








3.36








3.19








3.32








2.78








3.38








3.07








3.22








3.05






3.79








3.15








2.69






7.4








3.92








3.07








2.54








3.82








3.10








3.56








2.60








3.56






7.8








3.80








3.49






8.4








3.25








1.84








2.41








2.86








2.88








2.35








2.94








2.99






2.76








2.40








2.67








2.97








2.61






9.4








1.89








1.80








2.62








1.92








3.75








4.60








2.31








2.26






3.48








2.86








2.38






9.8








2.82






10.4








1.09








2.69








2.48








2.72






11.4








2.10






12.4








2.73






1


2


.


8








1.71






13.4








2.14








2.76






14.4








1.57






Create a markdown document with all required information and send it as an HTML file. Make sure






that you document your program and that all code and required explanation are clearly shown in your






document.




































































Decision Tree






Given the following historical data, predict the outcome for the new condition not present in the table.






Age








Job








House








Credit








Loan Approved






Young








FALSE








FALSE








Fair








FALSE






Young








FALSE








FALSE








Good








FALSE






Young








TRUE








FALSE








Good








TRUE






Young








TRUE








TRUE








Fair








TRUE






Young








FALSE








FALSE








Fair








FALSE






Middle








FALSE








FALSE








Fair








FALSE






Middle








FALSE








FALSE








Good








FALSE






Middle








TRUE








TRUE








Good








TRUE






Middle








FALSE








TRUE








Excellent








TRUE






Middle








FALSE








TRUE








Excellent








TRUE






Old








FALSE








TRUE








Excellent








TRUE






Old








FALSE








TRUE








Good








TRUE






Old








TRUE








FALSE








Good








TRUE






Old








TRUE








FALSE








Excellent








TRUE






Old








FALSE








FALSE








Fair








FALSE






Age








Job








House








Credit








Loan






Approved






Young








FALSE








FALSE








Good








??






For this assignment:






1)








Create a spreadsheet and save the data as a .csv file






2)








read the .csv file using read.csv(file.choose()) into a data frame called LoanDF






3)








Clean the data frame is necessary by making the appropriate changes.






4)








Create the corresponding 1R tables showing Total Misses






5)








Based upon your table, draw the corresponding decision tree






6)








Using the C50 R package and its functions build the tree. Make sure that you "pipe" the data frame into






the C5.0() function.






7)








Plot your decision tree and compare it to the one you obtained by hand. If there are differences explain






some of the possible reasons.














Apr 17, 2023
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here