ISYE 6501 WEEK 1 HOMEWORK – SAMPLE SOLUTIONS
IMPORTANT NOTE
These homework solutions show multiple approaches and some optional extensions for most of the questions in the assignment. You don’t need to submit all this in your assignments; they’re included here just to help you learn...
isye 6501 week 1 homework – sample solutions important note these homework solutions show multiple approaches and some optional extensions for most of the questions in the assignment you don’t ne
Geschreven voor
ISYE 6501
Alle documenten voor dit vak (598)
Verkoper
Volgen
NURSEREP
Ontvangen beoordelingen
Voorbeeld van de inhoud
ISYE 6501 WEEK 1 HOMEWORK – SAMPLE SOLUTIONS
IMPORTANT NOTE
These homework solutions show multiple approaches and some optional extensions for most of
the questions in the assignment. You don’t need to submit all this in your assignments; they’re
included here just to help you learn more – because remember, the main goal of the homework
assignments, and of the entire course, is to help you learn as much as you can, and develop
your analytics skills as much as possible!
Question 1
Describe a situation or problem from your job, everyday life, current events, etc., for which
a classification model would be appropriate. List some (up to 5) predictors that you might
use.
One possible answer:
Being students at Georgia Tech, the Teaching Assistants for the course suggested the following
example. A college admissions officer has a large pool of applicants must decide who will make
up the next incoming class. The applicants must be put into different categories – admit,
waitlist, and deny – so a classification model is appropriate. Some common factors used in
college admissions classification are high school GPA, rank in high school class, SAT and/or ACT
score, number of advanced placement courses taken, quality of written essay(s), quality of
letters of recommendation, and quantity and depth of extracurricular activities.
If the goal of the model was to automate a process to make decisions that are similar to those
made in the past, then previous admit/waitlist/deny decisions could be used as the response.
Alternatively, if the goal of the model was to make better admissions decisions, then a different
, measure could be used as the response – for example, if the goal is to maximize the academic
success of students, then each admitted student’s college GPA could be the response; if the
goal is to maximize the post-graduation success of admitted students, then some measure of
career success could be the response; etc.
Question 2
The file credit_card_data.txt contains a dataset with 654 data points, 6 continuous and 4 binary
predictor variables. It has anonymized credit card applications with a binary response variable
(last column) indicating if the application was positive or negative. The dataset is the “Credit
Approval Data Set” from the UCI Machine Learning Repository
(https://archive.ics.uci.edu/ml/datasets/Credit+Approval ) without the categorial variables and
without data points that have missing values.
1. Using the support vector machine function ksvm contained in the R package kernlab, find a
good classifier for this data. Show the equation of your classifier, and how well it classifies
the data points in the full data set. (Don’t worry about test/validation data yet; we’ll cover
that topic soon.)
Notes on ksvm
• You can use scaled=TRUE to get ksvm to scale the data as part of calculating a classifier.
• The term λ we used in the SVM lesson to trade off the two components of correctness and
margin is called C in ksvm. One of the challenges of this homework is to find a value of C
that works well; for many values of C, almost all predictions will be “yes” or almost all
predictions will be “no”.
• ksvm does not directly return the coefficients a0 and a1...am. Instead, you need to do the last
step of the calculation yourself. Here’s an example of the steps to take (assuming your data
is
1
stored in a matrix called data):
# call ksvm. Vanilladot is a simple linear kernel.
model <-
ksvm(as.matrix(data[,1:10]),as.factor(data[,11]),type=”C-
svc”,kernel=”vanilladot”,C=100,scaled=TRUE)
# calculate a1...am
# a <- colSums(data[model@SVindex,1:10] * model@coef[[1]]) # for unscaled
data a <- colSums(data[model@xmatrix[[1]]] * model@coef[[1]]) # for scaled data
Voordelen van het kopen van samenvattingen bij Stuvia op een rij:
Verzekerd van kwaliteit door reviews
Stuvia-klanten hebben meer dan 700.000 samenvattingen beoordeeld. Zo weet je zeker dat je de beste documenten koopt!
Snel en makkelijk kopen
Je betaalt supersnel en eenmalig met iDeal, creditcard of Stuvia-tegoed voor de samenvatting. Zonder lidmaatschap.
Focus op de essentie
Samenvattingen worden geschreven voor en door anderen. Daarom zijn de samenvattingen altijd betrouwbaar en actueel. Zo kom je snel tot de kern!
Veelgestelde vragen
Wat krijg ik als ik dit document koop?
Je krijgt een PDF, die direct beschikbaar is na je aankoop. Het gekochte document is altijd, overal en oneindig toegankelijk via je profiel.
Tevredenheidsgarantie: hoe werkt dat?
Onze tevredenheidsgarantie zorgt ervoor dat je altijd een studiedocument vindt dat goed bij je past. Je vult een formulier in en onze klantenservice regelt de rest.
Van wie koop ik deze samenvatting?
Stuvia is een marktplaats, je koop dit document dus niet van ons, maar van verkoper NURSEREP. Stuvia faciliteert de betaling aan de verkoper.
Zit ik meteen vast aan een abonnement?
Nee, je koopt alleen deze samenvatting voor €15,13. Je zit daarna nergens aan vast.