39, State-gov,77516, Bachelors,13, Never-married, Adm-clerical, Not-in-family, White, Male,2174,0,40, United-States, 50K 31, Private,45781, Masters,14, Never-married, Prof-specialty, Not-in-family,...

For this assignment, use the population.csv file. This file is in the Files section of the course portal. This file contains information about individuals like their age, marital status,education, etc. and the y variable is the income. The cut off value for the income is $50,000.
Run Logistic Regression, Decision Tree and Random forest and compute accuracy for each model.



39, State-gov,77516, Bachelors,13, Never-married, Adm-clerical, Not-in-family, White, Male,2174,0,40, United-States, <=50k 50,="" self-emp-not-inc,83311,="" bachelors,13,="" married-civ-spouse,="" exec-managerial,="" husband,="" white,="" male,0,0,13,="" united-states,=""><=50k 38,="" private,215646,="" hs-grad,9,="" divorced,="" handlers-cleaners,="" not-in-family,="" white,="" male,0,0,40,="" united-states,=""><=50k 53,="" private,234721,="" 11th,7,="" married-civ-spouse,="" handlers-cleaners,="" husband,="" black,="" male,0,0,40,="" united-states,=""><=50k 28,="" private,338409,="" bachelors,13,="" married-civ-spouse,="" prof-specialty,="" wife,="" black,="" female,0,0,40,="" cuba,=""><=50k 37,="" private,284582,="" masters,14,="" married-civ-spouse,="" exec-managerial,="" wife,="" white,="" female,0,0,40,="" united-states,=""><=50k 49,="" private,160187,="" 9th,5,="" married-spouse-absent,="" other-service,="" not-in-family,="" black,="" female,0,0,16,="" jamaica,=""><=50k 52,="" self-emp-not-inc,209642,="" hs-grad,9,="" married-civ-spouse,="" exec-managerial,="" husband,="" white,="" male,0,0,45,="" united-states,="">50K 31, Private,45781, Masters,14, Never-married, Prof-specialty, Not-in-family, White, Female,14084,0,50, United-States, >50K 42, Private,159449, Bachelors,13, Married-civ-spouse, Exec-managerial, Husband, White, Male,5178,0,40, United-States, >50K 37, Private,280464, Some-college,10, Married-civ-spouse, Exec-managerial, Husband, Black, Male,0,0,80, United-States, >50K 30, State-gov,141297, Bachelors,13, Married-civ-spouse, Prof-specialty, Husband, Asian-Pac-Islander, Male,0,0,40, India, >50K 23, Private,122272, Bachelors,13, Never-married, Adm-clerical, Own-child, White, Female,0,0,30, United-States, <=50k 32,="" private,205019,="" assoc-acdm,12,="" never-married,="" sales,="" not-in-family,="" black,="" male,0,0,50,="" united-states,=""><=50k 40,="" private,121772,="" assoc-voc,11,="" married-civ-spouse,="" craft-repair,="" husband,="" asian-pac-islander,="" male,0,0,40,="" ,="">50K 34, Private,245487, 7th-8th,4, Married-civ-spouse, Transport-moving, Husband, Amer-Indian-Eskimo, Male,0,0,45, Mexico, <=50k 25,="" self-emp-not-inc,176756,="" hs-grad,9,="" never-married,="" farming-fishing,="" own-child,="" white,="" male,0,0,35,="" united-states,=""><=50k 32,="" private,186824,="" hs-grad,9,="" never-married,="" machine-op-inspct,="" unmarried,="" white,="" male,0,0,40,="" united-states,=""><=50k 38,="" private,28887,="" 11th,7,="" married-civ-spouse,="" sales,="" husband,="" white,="" male,0,0,50,="" united-states,=""><=50k 43,="" self-emp-not-inc,292175,="" masters,14,="" divorced,="" exec-managerial,="" unmarried,="" white,="" female,0,0,45,="" united-states,="">50K 40, Private,193524, Doctorate,16, Married-civ-spouse, Prof-specialty, Husband, White, Male,0,0,60, United-States, >50K 54, Private,302146, HS-grad,9, Separated, Other-service, Unmarried, Black, Female,0,0,20, United-States, <=50k 35,="" federal-gov,76845,="" 9th,5,="" married-civ-spouse,="" farming-fishing,="" husband,="" black,="" male,0,0,40,="" united-states,=""><=50k 43,="" private,117037,="" 11th,7,="" married-civ-spouse,="" transport-moving,="" husband,="" white,="" male,0,2042,40,="" united-states,=""><=50k 59,="" private,109015,="" hs-grad,9,="" divorced,="" tech-support,="" unmarried,="" white,="" female,0,0,40,="" united-states,=""><=50k 56,="" local-gov,216851,="" bachelors,13,="" married-civ-spouse,="" tech-support,="" husband,="" white,="" male,0,0,40,="" united-states,="">50K 19, Private,168294, HS-grad,9, Never-married, Craft-repair, Own-child, White, Male,0,0,40, United-States, <=50k 54,="" ,180211,="" some-college,10,="" married-civ-spouse,="" ,="" husband,="" asian-pac-islander,="" male,0,0,60,="" south,="">50K 39, Private,367260, HS-grad,9, Divorced, Exec-managerial, Not-in-family, White, Male,0,0,80, United-States, <=50k 49,="" private,193366,="" hs-grad,9,="" married-civ-spouse,="" craft-repair,="" husband,="" white,="" male,0,0,40,="" united-states,=""><=50k 23,="" local-gov,190709,="" assoc-acdm,12,="" never-married,="" protective-serv,="" not-in-family,="" white,="" male,0,0,52,="" united-states,=""><=50k 20,="" private,266015,="" some-college,10,="" never-married,="" sales,="" own-child,="" black,="" male,0,0,44,="" united-states,=""><=50k 45,="" private,386940,="" bachelors,13,="" divorced,="" exec-managerial,="" own-child,="" white,="" male,0,1408,40,="" united-states,=""><=50k 30,="" federal-gov,59951,="" some-college,10,="" married-civ-spouse,="" adm-clerical,="" own-child,="" white,="" male,0,0,40,="" united-states,=""><=50k 22,="" state-gov,311512,="" some-college,10,="" married-civ-spouse,="" other-service,="" husband,="" black,="" male,0,0,15,="" united-states,=""><=50k 48,="" private,242406,="" 11th,7,="" never-married,="" machine-op-inspct,="" unmarried,="" white,="" male,0,0,40,="" puerto-rico,=""><=50k 21,="" private,197200,="" some-college,10,="" never-married,="" machine-op-inspct,="" own-child,="" white,="" male,0,0,40,="" united-states,=""><=50k 19,="" private,544091,="" hs-grad,9,="" married-af-spouse,="" adm-clerical,="" wife,="" white,="" female,0,0,25,="" united-states,=""><=50k 31,="" private,84154,="" some-college,10,="" married-civ-spouse,="" sales,="" husband,="" white,="" male,0,0,38,="" ,="">50K 48, Self-emp-not-inc,265477, Assoc-acdm,12, Married-civ-spouse, Prof-specialty, Husband, White, Male,0,0,40, United-States, <=50k 31,="" private,507875,="" 9th,5,="" married-civ-spouse,="" machine-op-inspct,="" husband,="" white,="" male,0,0,43,="" united-states,=""><=50k 53,="" self-emp-not-inc,88506,="" bachelors,13,="" married-civ-spouse,="" prof-specialty,="" husband,="" white,="" male,0,0,40,="" united-states,=""><=50k 24,="" private,172987,="" bachelors,13,="" married-civ-spouse,="" tech-support,="" husband,="" white,="" male,0,0,50,="" united-states,=""><=50k 49,="" private,94638,="" hs-grad,9,="" separated,="" adm-clerical,="" unmarried,="" white,="" female,0,0,40,="" united-states,=""><=50k 25,="" private,289980,="" hs-grad,9,="" never-married,="" handlers-cleaners,="" not-in-family,="" white,="" male,0,0,35,="" united-states,=""><=50k 57,="" federal-gov,337895,="" bachelors,13,="" married-civ-spouse,="" prof-specialty,="" husband,="" black,="" male,0,0,40,="" united-states,="">50K 53, Private,144361, HS-grad,9, Married-civ-spouse, Machine-op-inspct, Husband, White, Male,0,0,38, United-States, <=50k 44,="" private,128354,="" masters,14,="" divorced,="" exec-managerial,="" unmarried,="" white,="" female,0,0,40,="" united-states,=""><=50k 41,="" state-gov,101603,="" assoc-voc,11,="" married-civ-spouse,="" craft-repair,="" husband,="" white,="" male,0,0,40,="" united-states,=""><=50k 29,="" private,271466,="" assoc-voc,11,="" never-married,="" prof-specialty,="" not-in-family,="" white,="" male,0,0,43,="" united-states,=""><=50k 25,="" private,32275,="" some-college,10,="" married-civ-spouse,="" exec-managerial,="" wife,="" other,="" female,0,0,40,="" united-states,=""><=50k 18,="" private,226956,="" hs-grad,9,="" never-married,="" other-service,="" own-child,="" white,="" female,0,0,30,="" ,=""><=50k 47,="" private,51835,="" prof-school,15,="" married-civ-spouse,="" prof-specialty,="" wife,="" white,="" female,0,1902,60,="" honduras,="">50K 50, Federal-gov,251585, Bachelors,13, Divorced, Exec-managerial, Not-in-family, White, Male,0,0,55, United-States, >50K 47, Self-emp-inc,109832, HS-grad,9, Divorced, Exec-managerial, Not-in-family, White, Male,0,0,60, United-States, <=50k 43,="" private,237993,="" some-college,10,="" married-civ-spouse,="" tech-support,="" husband,="" white,="" male,0,0,40,="" united-states,="">50K 46, Private,216666, 5th-6th,3, Married-civ-spouse, Machine-op-inspct, Husband, White, Male,0,0,40, Mexico, <=50k 35,="" private,56352,="" assoc-voc,11,="" married-civ-spouse,="" other-service,="" husband,="" white,="" male,0,0,40,="" puerto-rico,=""><=50k 41,="" private,147372,="" hs-grad,9,="" married-civ-spouse,="" adm-clerical,="" husband,="" white,="" male,0,0,48,="" united-states,=""><=50k 30,="" private,188146,="" hs-grad,9,="" married-civ-spouse,="" machine-op-inspct,="" husband,="" white,="" male,5013,0,40,="" united-states,=""><=50k 30,="" private,59496,="" bachelors,13,="" married-civ-spouse,="" sales,="" husband,="" white,="" male,2407,0,40,="" united-states,=""><=50k 32,="" ,293936,="" 7th-8th,4,="" married-spouse-absent,="" ,="" not-in-family,="" white,="" male,0,0,40,="" ,=""><=50k 48,="" private,149640,="" hs-grad,9,="" married-civ-spouse,="" transport-moving,="" husband,="" white,="" male,0,0,40,="" united-states,=""><=50k 42,="" private,116632,="" doctorate,16,="" married-civ-spouse,="" prof-specialty,="" husband,="" white,="" male,0,0,45,="" united-states,="">50K 29, Private,105598, Some-college,10, Divorced, Tech-support, Not-in-family, White, Male,0,0,58, United-States, <=50k 36,="" private,155537,="" hs-grad,9,="" married-civ-spouse,="" craft-repair,="" husband,="" white,="" male,0,0,40,="" united-states,=""><=50k 28,="" private,183175,="" some-college,10,="" divorced,="" adm-clerical,="" not-in-family,="" white,="" female,0,0,40,="" united-states,=""><=50k 53,="" private,169846,="" hs-grad,9,="" married-civ-spouse,="" adm-clerical,="" wife,="" white,="" female,0,0,40,="" united-states,="">50K 49, Self-emp-inc,191681, Some-college,10, Married-civ-spouse, Exec-managerial, Husband, White, Male,0,0,50, United-States, >50K 25, ?,200681, Some-college,10, Never-married, ?, Own-child, White, Male,0,0,40, United-States, <=50k 19,="" private,101509,="" some-college,10,="" never-married,="" prof-specialty,="" own-child,="" white,="" male,0,0,32,="" united-states,=""><=50k 31,="" private,309974,="" bachelors,13,="" separated,="" sales,="" own-child,="" black,="" female,0,0,40,="" united-states,=""><=50k 29,="" self-emp-not-inc,162298,="" bachelors,13,="" married-civ-spouse,="" sales,="" husband,="" white,="" male,0,0,70,="" united-states,="">50K 23, Private,211678, Some-college,10, Never-married, Machine-op-inspct, Not-in-family, White, Male,0,0,40, United-States, <=50k 79,="" private,124744,="" some-college,10,="" married-civ-spouse,="" prof-specialty,="" other-relative,="" white,="" male,0,0,20,="" united-states,=""><=50k 27,="" private,213921,="" hs-grad,9,="" never-married,="" other-service,="" own-child,="" white,="" male,0,0,40,="" mexico,=""><=50k 40,="" private,32214,="" assoc-acdm,12,="" married-civ-spouse,="" adm-clerical,="" husband,="" white,="" male,0,0,40,="" united-states,=""><=50k 67,="" ,212759,="" 10th,6,="" married-civ-spouse,="" ,="" husband,="" white,="" male,0,0,2,="" united-states,=""><=50k 18,="" private,309634,="" 11th,7,="" never-married,="" other-service,="" own-child,="" white,="" female,0,0,22,="" united-states,=""><=50k 31,="" local-gov,125927,="" 7th-8th,4,="" married-civ-spouse,="" farming-fishing,="" husband,="" white,="" male,0,0,40,="" united-states,=""><=50k 18,="" private,446839,="" hs-grad,9,="" never-married,="" sales,="" not-in-family,="" white,="" male,0,0,30,="" united-states,=""><=50k 52,="" private,276515,="" bachelors,13,="" married-civ-spouse,="" other-service,="" husband,="" white,="" male,0,0,40,="" cuba,=""><=50k 46,="" private,51618,="" hs-grad,9,="" married-civ-spouse,="" other-service,="" wife,="" white,="" female,0,0,40,="" united-states,=""><=50k 59, private,159937, hs-grad,9, 59,="" private,159937,="">
Apr 27, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here