Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE R Studio 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,

USE R Studio

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).

Split the data into training (75% of the data) and testing set (25% of data left)

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.

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Logics For Databases And Information Systems

Authors: Jan Chomicki ,Gunter Saake

1st Edition

1461375827, 978-1461375821

More Books

Students also viewed these Databases questions