Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 3 out of 21 pages
Exam (elaborations)

CSE6040_SP20_Final_Exam_Problem0_Main_solutions 2020.

Document preview thumbnail
Preview 3 out of 21 pages

Problem 0: Click-through Balancing Act (5 points) Version 1.1 This notebook is a (hopefully) simple one about two common data preprocessing issues in practical machine learning, namely, imputing missing values and “balancing” training data. Here, you’ll see these ideas in the context of analyzing advertising click-through data, where you wish to predict when a user will click on an ad using logistic regression. This problem will make use of some basic Python, pandas, and Numpy. The problem is worth a total of 5 points, broken up into 3 exercises. They are independent, so you can complete them in any order. (However, they do build on one another so read them in sequence.) Their points values are as follows. •Exercise 0: 2 points •Exercise 1: 2 points •Exercise 2: 1 point Pro-tips. - If your program behavior seem strange, try resetting the kernel and rerunning ev- erything. - If you mess up this notebook or just want to start from scratch, save copies of all your partial responses and use Actions Reset Assignment to get a fresh, original copy of this notebook. (Resetting will wipe out any answers you’ve written so far, so be sure to stash those somewhere safe if you intend to keep or reuse them!) - If you generate excessive output (e.g., from a ill-placed print statement), causing the notebook to load slowly or not at all, use Actions Clear Notebook Output to get a clean copy. The clean copy will retain your code but remove any generated output. However, it will also rename the notebook to . Since the autograder expects a notebook file with the original name, you’ll need to rename the clean notebook accordingly. Revision history. * Version 1.1 - Added more hints, fixed a missing link [Th Apr 23, 2020] * Version 1.0 - Initial release 1.1Setup Here are some of the basic modules you’ll need for this problem. [2]: * Python version: 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)] *Numpy version: 1.18.2 *pandas version 1.0.3 1.2Get to know the dataset: Click-through data The dataset consists of click-through data collected from mobile users about whether they clicked on ads. Run this code cell to load the data into a pandas DataFrame named df_train_0 and inspect a small sample. Reading ./resource/asnlib/publicdata/train-4M.csv … Done! Cleaning… Done cleaning! First five data points (rows): click x_pixels y_pixels dev0 dev1 dev2 dev4 dev5 c1001 c1002 c1005 c1007 c1008 c1010 c1012 0 0 0 0 1 0 0 0 2 0 0 0 3 0 0 0 4 0 0 0 Last five data points (rows): click x_pixels y_pixels dev0 dev1 dev2 dev4 dev5 c1001 c1002 c1005


Document information

Uploaded on
December 14, 2022
Number of pages
21
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers
$10.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Nechemia17
3.9
(20)
Sold
142
Followers
125
Items
1877
Last sold
3 weeks ago


Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions

Whoops! We can’t load your doc right now. Try again or contact support.