(Solved) : Use R Programming 60 Points File Socialnetworkadscsv Dataset Effective Ads Social Media D Q26379642 . . .
Use R programming
The file “Social_Network_Ads.csv” is a dataset about howeffective the ads on social media are. The data has three variables(Gender, Age, and Estimated Salary) and one response variable(Purchased). This response variable has two value 0 (no purchased)and 1 (purchased successfully) (Let’s consider 0 and 1 as factor,not number).
A)Split the data into training (75% of the data) and testing set(25% of data left)
B)Build a decision tree model for the training set. Predict theresponse value for the testing set. Report your confusion matrixfor the prediction and plot the decision tree.
C)Build a random forest model for the training set. Predict theresponse value for the testing set. Report your confusion matrixfor the prediction. Compare the result with part b? Is there anydifference? Explain?
. . .