Question
Use R programming [60 points] The file Social_Network_Ads.csv is a dataset about how effective the ads on social media are. The data has three variables
Use R programming
[60 points]
The file Social_Network_Ads.csv is a dataset about how effective 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) (Lets 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 the response value for the testing set. Report your confusion matrix for the prediction and plot the decision tree.
C)Build a random forest model for the training set. Predict the response value for the testing set. Report your confusion matrix for the prediction. Compare the result with part b? Is there any difference? Explain?
Data sources:
http://archive.ics.uci.edu/ml/datasets/Wine+Quality
https://www.superdatascience.com/
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