Use the sacramento.csv file to complete the following assignment. Create a file, sacramento.py, that loads the .csv file

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Use the sacramento.csv file to complete the following assignment. Create a file, sacramento.py, that loads the .csv file

Post by answerhappygod »

Use the sacramento.csv file to complete the followingassignment. Create a file, sacramento.py, that loads the .csv fileand runs a logistic regression. The regression should predictwhether or not a house has 1 or more than one bathroom based onbeds, sqft, and price, in that order. You will need to create a newvariable from baths, and it should make it such that thoseobservations of 1 bath correspond to a value of 0, and those withmore than 1 bath correspond to a 1. Make sure to add a constantusing sm.add_constant(X) Your file should print the results in thisway: print(mod.params.round(2)) print(mod.pvalues.round(2))print('The smallest p-value is for sqft')
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply