Problem Statement:
In this assignment you will be working with a dummy advertising data set, indicating whether or not a particular internet user clicked on an Advertisement on a company website. you will try to create a model that will predict whether or not they will click on an ad based off the features of that user.
This data set contains the following features:
* 'Daily Time Spent on Site': consumer time on site in minutes
* 'Age': customer age in years
* 'Area Income': Avg. Income of geographical area of consumer
* 'Daily Internet Usage': Avg. minutes a day consumer is on the internet
* 'Ad Topic Line': Headline of the advertisement
* 'City': City of consumer
* 'Male': Whether or not consumer was male
* 'Country': Country of consumer
* 'Timestamp': Time at which consumer clicked on Ad or closed window
* 'Clicked on Ad': 0 or 1 indicated clicking on Ad
For the dataset (Advertising dataset), implement the Random Forest classifier using Python.
Dataset: advertising.csv
The marks distribution is as follows
Import the libraries and Load the dataset and Remove/replace missing values (if any) [1M]
Split features and labels
Split train and test data
Implement Random Forest Classifier
Calculate accuracy measures
For the same dataset (Advertising dataset), implement KNN using Python.
Import the libraries and Load the dataset and Remove/replace missing values (if any) [1M]
Split features and labels
Split train and test data
Implement KNNClassifier
Calculate accuracy measures
Compare the results and accuracies for both the algorithms and share your inferences.
Output Screenshot
Get solution of this project at affordable price. please send your query at contact@codersarts.com we'll share you price quote
Comments