Information Technology > QUESTIONS & ANSWERS > Week 1 Homework ISYE 6501 5/21/2020, Georgia Tech, Questions and answers, Rated A+ (All)

Week 1 Homework ISYE 6501 5/21/2020, Georgia Tech, Questions and answers, Rated A+

Document Content and Description Below

Question 2.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. https://www.forbes.com/sites/shaharziv/2020/05/14/exclusive-proposal-dont-give-americans-equal-1200-second-stimulus-checks-save-35- billion/#55f2eb9056ec If the US federal government wants to more efficiently distribute stimulus funds, they could vary the amount of money that goes to each household. Residents of states with a higher cost of living would get more money, and residents of states with a lower cost of living would get less money. In addition, families with more children would still get more money. Finally, people who have filed for unemployment would get a larger stimulus than people who are currently employed. In summary, here are the predictors that could be used to determine the amount of stimulus issued by the government: 1. Yearly Income 2. Cost of Living in State of Residence 3. Number of Dependents Question 2.2 Part 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.) Loading libraries needed and reading the table: library(kernlab) ccd221 <- read.table("./credit_card_data_2.2.txt", stringsAsFactors = FALSE, header = FALSE) Setting up the model: modelksvm <- ksvm(as.matrix(ccd221[,1:10]), as.factor(ccd221[,11]), type="C-svc", kernel = "vanilladot", C=5 00, scaled=TRUE) ## Setting default kernel parameters Calculate a1 through am (coefficients): a <- colSums(modelksvm@xmatrix[[1]] * modelksvm@coef[[1]]) a # # V1 V2 V3 V4 V5 ## -6.306278e-04 -1.994861e-04 -3.750699e-04 1.615496e-03 1.003398e+00 ## V6 V7 V8 V9 V10 ## -3.814784e-04 6.761309e-05 -3.621798e-05 -1.272743e-04 1.057258e-01 Calculate a0: a0 <- -modelksvm@b a0 ## [1] 0.08534036 See what the model predicts: pred <- predict(modelksvm,ccd221[,1:10]) pred This study source was downloaded by 100000842525582 from CourseHero.com on 05-13-2022 04:13:58 GMT -05:00 https://www.coursehero.com/file/63700779/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 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ## [482] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ## [519] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 ## [556] 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 ## [593] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 ## [630] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ## Levels: 0 1 See what fraction of the model’s predictions match the actual classification: sum(pred == ccd221[,11]) / nrow(ccd221) ## [1] 0.8639144 modelksvm@error ## [1] 0.1360856 Conclusions: A. Since most of the values in the equation of the classifier were close to zero, I will leave them out. The equation of the classifier would approximate to 1.0049x + 0.8639 (scaled) B. Several values of C got the prediction up to 0.86391. Those C values ranged from 0.01 up to about 500. C. This is potentially an example of overfitting, similar to the birth date example in the lecture videos. The reason for that is that we are using the same dataset for the model’s predictions and the actual classification. Question 2.2 Part 2: You are welcome, but not required, to try other (nonlinear) kernels as well; we’re not covering them in this course, but they can sometimes be useful and might provide better predictions than vanilladot. If lambda is left at 100, which is in the range of acceptable values, rbfdot (0.953), polydot (0.865), laplacedot (1.0), besseldot (0.925), anovadot (0.907), and splinedot (0.979) have higher accuracy than vanilladot (0.864). However, tanhdot (0.722) does not. Stringdot throws an error, obviously. Question 2.2 Part 3: Using the k-nearest-neighbors classification function kknn contained in the R kknn package, suggest a good value of k, and show how well it classifies that data points in the full data set. Don’t forget to scale the data (scale=TRUE in kknn). Loading libraries and reading the table: library(kknn) ccd223 <- read.table("./credit_card_data_2.2.txt", stringsAsFactors = FALSE, header = FALSE) Testing multiple k’s: This study source was downloaded by 100000842525582 from CourseHero.com on 05-13-2022 04:13:58 GMT -05:00 https://www.coursehero.com/file/63700779/ISYE-6501-Week-1-Homeworkpdf/library(kknn) set.seed(1) modelaccuracy <- function(K){ predknn <- array(0,nrow(ccd223)) for (i in 1:nrow(ccd223)) { modelknn <- kknn(V11~V1+V2+V3+V4+V5+V6+V7+V8+V8+V9+V10, ccd223[-i,], ccd223[i,], k=K, scale = TRUE) predknn[i] <- as.integer(fitted.values(modelknn) + 0.5) } accuracy <- sum(predknn == ccd223[,11]) / nrow(ccd223) return (accuracy) }f or(i in 1:20){ m <- modelaccuracy(i) print(paste("For k=", i,", accuracy is", m)) Question 2.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. https://www.forbes.com/sites/shaharziv/2020/05/14/exclusive-proposal-dont-give-americans-equal-1200-second-stimulus-checks-save-35- billion/#55f2eb9056ec If the US federal government wants to more efficiently distribute stimulus funds, they could vary the amount of money that goes to each household. Residents of states with a higher cost of living would get more money, and residents of states with a lower cost of living would get less money. In addition, families with more children would still get more money. Finally, people who have filed for unemployment would get a larger stimulus than people who are currently employed. In summary, here are the predictors that could be used to determine the amount of stimulus issued by the government: 1. Yearly Income 2. Cost of Living in State of Residence 3. Number of Dependents Question 2.2 Part 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.) Loading libraries needed and reading the table: library(kernlab) ccd221 <- read.table("./credit_card_data_2.2.txt", stringsAsFactors = FALSE, header = FALSE) Setting up the model: modelksvm <- ksvm(as.matrix(ccd221[,1:10]), as.factor(ccd221[,11]), type="C-svc", kernel = "vanilladot", C=5 00, scaled=TRUE) ## Setting default kernel parameters Calculate a1 through am (coefficients): a <- colSums(modelksvm@xmatrix[[1]] * modelksvm@coef[[1]]) a # # V1 V2 V3 V4 V5 ## -6.306278e-04 -1.994861e-04 -3.750699e-04 1.615496e-03 1.003398e+00 ## V6 V7 V8 V9 V10 ## -3.814784e-04 6.761309e-05 -3.621798e-05 -1.272743e-04 1.057258e-01 Calculate a0: a0 <- -modelksvm@b a0 ## [1] 0.08534036 See what the model predicts: pred <- predict(modelksvm,ccd221[,1:10]) pred This study source was downloaded by 100000842525582 from CourseHero.com on 05-13-2022 04:13:58 GMT -05:00 https://www.coursehero.com/file/63700779/ISYE-6501-Week-1-Homeworkpdf/## [1] 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ## [38] 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 ## [75] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ## [112] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ## [149] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ## [186] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 ## [223] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 ## [260] 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 ## [297] 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 ## [334] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ## [371] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ## [408] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ## [445] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ## [482] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ## [519] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 ## [556] 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 ## [593] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 ## [630] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ## Levels: 0 1 See what fraction of the model’s predictions match the actual classification: sum(pred == ccd221[,11]) / nrow(ccd221) ## [1] 0.8639144 modelksvm@error ## [1] 0.1360856 Conclusions: A. Since most of the values in the equation of the classifier were close to zero, I will leave them out. The equation of the classifier would approximate to 1.0049x + 0.8639 (scaled) B. Several values of C got the prediction up to 0.86391. Those C values ranged from 0.01 up to about 500. C. This is potentially an example of overfitting, similar to the birth date example in the lecture videos. The reason for that is that we are using the same dataset for the model’s predictions and the actual classification. Question 2.2 Part 2: You are welcome, but not required, to try other (nonlinear) kernels as well; we’re not covering them in this course, but they can sometimes be useful and might provide better predictions than vanilladot. If lambda is left at 100, which is in the range of acceptable values, rbfdot (0.953), polydot (0.865), laplacedot (1.0), besseldot (0.925), anovadot (0.907), and splinedot (0.979) have higher accuracy than vanilladot (0.864). However, tanhdot (0.722) does not. Stringdot throws an error, obviously. Question 2.2 Part 3: Using the k-nearest-neighbors classification function kknn contained in the R kknn package, suggest a good value of k, and show how well it classifies that data points in the full data set. Don’t forget to scale the data (scale=TRUE in kknn). Loading libraries and reading the table: library(kknn) ccd223 <- read.table("./credit_card_data_2.2.txt", stringsAsFactors = FALSE, header = FALSE) Testing multiple k’s: This study source was downloaded by 100000842525582 from CourseHero.com on 05-13-2022 04:13:58 GMT -05:00 https://www.coursehero.com/file/63700779/ISYE-6501-Week-1-Homeworkpdf/library(kknn) set.seed(1) modelaccuracy <- function(K){ predknn <- array(0,nrow(ccd223)) for (i in 1:nrow(ccd223)) { modelknn <- kknn(V11~V1+V2+V3+V4+V5+V6+V7+V8+V8+V9+V10, ccd223[-i,], ccd223[i,], k=K, scale = TRUE) predknn[i] <- as.integer(fitted.values(modelknn) + 0.5) } accuracy <- sum(predknn == ccd223[,11]) / nrow(ccd223) return (accuracy) }f or(i in 1:20){ m <- modelaccuracy(i) print(paste("For k=", i,", accuracy is", m)) [Show More]

Last updated: 1 year ago

Preview 1 out of 5 pages

Also available in bundle (1)

GEORGIA TECH BUNDLE, ALL ISYE 6501 EXAMS, HOMEWORKS, QUESTIONS AND ANSWERS, NOTES AND SUMMARIIES, ALL YOU NEED

GEORGIA TECH BUNDLE, ALL ISYE 6501 EXAMS, HOMEWORKS, QUESTIONS AND ANSWERS, NOTES AND SUMMARIIES, ALL YOU NEED

By bundleHub Solution guider 1 year ago

$60

59  

Reviews( 0 )

Recommended For You

 *NURSING> QUESTIONS & ANSWERS > Basic Life Support Exam A (25 questions). Questions and answers, Graded A+. 2022 /2023 update. (All)

preview
Basic Life Support Exam A (25 questions). Questions and answers, Graded A+. 2022 /2023 update.

Basic Life Support Exam A (25 questions) Please do not mark on this exam. Record the best answer on the separate answer sheet. 1. While performing high-quality CPR on an adult, what action should y...

By bundleHub Solution guider , Uploaded: Aug 30, 2022

$9.5

 Health Care> QUESTIONS & ANSWERS > Christopher Parrish Documentation Assignments; questions and answers, complete solution (All)

preview
Christopher Parrish Documentation Assignments; questions and answers, complete solution

Christopher Parrish Documentation Assignments 1. Document your focused gastrointestinal and dietary assessment of Christopher Parrish. o Obtain vital signs o Assess bowel sounds and when last bowe...

By QuizGuider82 , Uploaded: Feb 01, 2022

$9

 Health Care> QUESTIONS & ANSWERS > Xcel Final Exam Questions and answers, 2022/2023 predictor questions. Graded A+ (All)

preview
Xcel Final Exam Questions and answers, 2022/2023 predictor questions. Graded A+

Xcel Final Exam Questions and answers, 2022/2023 predictor questions. Graded A+ Typically, Long-Term Disability benefits are coordinated with which benefit plan? - ✔✔Social Security The focus...

By bundleHub Solution guider , Uploaded: Sep 01, 2022

$11.5

 English> QUESTIONS & ANSWERS > Kaplan LSAT Prep. LSAT Prep Courses. Top questions and answers, Verified for Exam Revision (All)

preview
Kaplan LSAT Prep. LSAT Prep Courses. Top questions and answers, Verified for Exam Revision

Kaplan LSAT Prep, top questions and answers, Verified for Exam Revision Question Stem: "Which one of the following must be true?" - ✔✔-Correct answer: must be true Wrong answers: Must be false Qu...

By Topmark , Uploaded: Mar 12, 2023

$12.5

 Linguistics> QUESTIONS & ANSWERS > LETRS Units 5 - 8 Pre & Post Test, Questions and answers, rated A. 2022/2023. Latest updates (All)

preview
LETRS Units 5 - 8 Pre & Post Test, Questions and answers, rated A. 2022/2023. Latest updates

LETRS Units 5 - 8 Pre & Post Test, Questions and answers, rated A. 2022/2023. Latest updates Once students decode well, which statement describes the relationship between vocabulary and reading c...

By Topmark , Uploaded: Oct 07, 2022

$7

 *NURSING> QUESTIONS & ANSWERS > NREMT Exam_National Registry of Emergency Medical Technicians Exam. 150 Questions and Answers, 2022/2023 update, GRADED A (All)

preview
NREMT Exam_National Registry of Emergency Medical Technicians Exam. 150 Questions and Answers, 2022/2023 update, GRADED A

150 NREMT Exam Questions and Answers Which of the following is an example of an unsafe scene for an EMT-Basic to enter? A. Fifty-four-year old male with difficulty breathing B. Twenty-three-year o...

By bundleHub Solution guider , Uploaded: Sep 19, 2022

$11.5

 *NURSING> QUESTIONS & ANSWERS > NASM CPT EXAM, Questions and answers, 2022 update, Graded A+. (All)

preview
NASM CPT EXAM, Questions and answers, 2022 update, Graded A+.

NASM CPT EXAM, Questions and answers, 2022 update, Graded A+. Name the structures that make up the lumbo-pelvic-hip complex (LPHC). - ✔✔Lumbar spine, pelvic girdle, abdomen, and hip joint...

By bundleHub Solution guider , Uploaded: Sep 01, 2022

$16.5

 General Science> QUESTIONS & ANSWERS > Board of Cosmetology (PSI) Written Exam Prep Questions and answers, 2022, graded A (All)

preview
Board of Cosmetology (PSI) Written Exam Prep Questions and answers, 2022, graded A

Board of Cosmetology (PSI) Written Exam Prep Questions and answers, 2022, graded A The federal agency that regulates & enforces safety & health standards in the workplace? - ✔✔OSHA if implem...

By bundleHub Solution guider , Uploaded: Aug 20, 2022

$15.5

 Management> QUESTIONS & ANSWERS > WGU D080 Managing in a Global Business Environment, Top Exam Questions and answers, rated A+ (All)

preview
WGU D080 Managing in a Global Business Environment, Top Exam Questions and answers, rated A+

WGU D080 Managing in a Global Business Environment, Top Exam Questions and answers, rated A+ The key element of globalization is interdependence and interconnectedness among companies and count...

By Topmark , Uploaded: Mar 14, 2023

$13

 Health Care> QUESTIONS & ANSWERS > HESI Version 4(2021), (A Grade), Questions and Answers, All Correct Study Guide, Download to Score A (All)

preview
HESI Version 4(2021), (A Grade), Questions and Answers, All Correct Study Guide, Download to Score A

HESI Version 4(2021), (A Grade), Questions and Answers, All Correct Study Guide, Download to Score A 1. A 26-week gestation primigravida who is carrying twins is seen in the clinic today. Her final h...

By TopScholar , Uploaded: May 14, 2021

$21

$7.00

Add to cart

Instant download

Can't find what you want? Try our AI powered Search

OR

GET ASSIGNMENT HELP
88
0

Document information


Connected school, study & course



About the document


Uploaded On

Sep 03, 2022

Number of pages

5

Written in

Seller


seller-icon
bundleHub Solution guider

Member since 2 years

296 Documents Sold


Additional information

This document has been written for:

Uploaded

Sep 03, 2022

Downloads

 0

Views

 88

Document Keyword Tags

THE BEST STUDY GUIDES

Avoid resits and achieve higher grades with the best study guides, textbook notes, and class notes written by your fellow students

custom preview

Avoid examination resits

Your fellow students know the appropriate material to use to deliver high quality content. With this great service and assistance from fellow students, you can become well prepared and avoid having to resits exams.

custom preview

Get the best grades

Your fellow student knows the best materials to research on and use. This guarantee you the best grades in your examination. Your fellow students use high quality materials, textbooks and notes to ensure high quality

custom preview

Earn from your notes

Get paid by selling your notes and study materials to other students. Earn alot of cash and help other students in study by providing them with appropriate and high quality study materials.

WHAT STUDENTS SAY ABOUT US


What is Browsegrades

In Browsegrades, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Browsegrades · High quality services·