Question: USING PYTHON 1)Use logistic regression to create a predictive model: Use 70% of data for tarining and consider 30% of data for testing. (Use random_state=0)

USING PYTHON

1)Use logistic regression to create a predictive model:

Use 70% of data for tarining and consider 30% of data for testing. (Use random_state=0)

Use all features to create your predictive model

"target" is your dependent variable. It shows whether the subject suffers form a heart disease or not.

2)Use similar structure as above to create a naive bayes predictive model.

3) Use in-sample data (train data) and out-of-sample data (test data) to check the accuracy of your naive bayes model: What is the general expectation? should we expect to get higher accuray on in-sample data or out-of-sample data What is the result in your case?

4)Find precision, recall and F1 scores for both logistic regression and naive bayes models using out-of-sample data (test data) and explain which one works better than the other?

Sorry I couldn't attach excel file. Could you please use the data in the pics below to solve questions

USING PYTHON 1)Use logistic regression to create a predictive model: Use 70%

1222212332222222222232223222 0000000000000000000200000200 0022211222222121202212212222 3548643056226816065854014466 2310001 011001-21100 1010 0000100000000100000001011000 3324 6 4111 878 1000000010000010000000010010 6139 679 363 2112222 2 2 2 331 0 p111 1e 3211001122021332230302023122 2 5 1 1 2 5 123456789 012345678901 4 8

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!