Suppose you are a Business Analyst, please use SVM as a binary
classifier to predict the outcome of a user clicking on an online
advertisement.
Download the Advertising dataset from LEO (advertising.csv) and
load it into your jupyter notebook.
Task 1: Data Analysis [1’]
Step 1: Remove two text variables 'Ad Topic Line' and
'Timestamp' from the dataframe. Step 2: Use one-hot encoding to
convert 'Country' and 'City' variables to numeric values.
Task 2: Machine Learning with SVM [5’]
Step 1: Assign training data and labels.
Make 'Click on Ad' as labels; use the remaining variables as
data.
Step 2: Train Test Split.
Split the training data into training and test sets with
train_test_split().
Set parameter test_size = 0.3, random_state to the last two
digits of your student ID. (e.g., suppose your student id is
S00123410, then, set random_state = 10)
Please attach your name and student id in a separate markdown
cell as a proof. Step 3: Training and Fitting the model.
Predictions from the trained model.
Set up the classification model, SVM, with Scikit-learn. Train
the model with training data. Make predictions on the test set.
Step 4: Model Evaluation
Evaluate your prediction with confusion_matrix() and
classification_report()
Step 5: Analysis Report.
Create a new markdown cell and provide analysis of your
evaluation results: what's the FP, TP, FN, TN of your prediction?
How about the precision, recall, and f1-score of your model? How
will you evaluate the skills of your trained model based on these
evaluation criteria? (Within 200 words)
Suppose you are a Business Analyst, please use SVM as a binary classifier to predict the outcome of a user clicking on a
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Suppose you are a Business Analyst, please use SVM as a binary classifier to predict the outcome of a user clicking on a
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!