Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Read diabetes.csv into a Jupyter notebook. Differentiate between the independent variables and the dependent variable and assign them to variables x and y. Generate training

Read diabetes.csv into a Jupyter notebook. Differentiate between the independent variables and the dependent variable and assign them to variables x and y. Generate training and test sets comprising 80% and 20% of the data respectively. Use a MinMaxScaler and StandardScaler from sklearn.preprocessing. Fit these scalers on the train set and use these fit scalers to transform the train and test sets. Generate a multiple linear regression model using the training set. Use all of the independent variables. Print out the intercept and coefficients of the trained model Generate predictions for the test set . For these predictions, set all predicted values below 0.5 to 0 and all predicted values of 0.5 or above to 1. Compute the accuracy_score of your model on the test set. You can get the accuracy_score from sklearn.metrics.

Note. Ensure your notebook is well commented with topics and comments on what your code is accomplishing.

image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts Of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

4th Edition

ISBN: 0619064625, 978-0619064624

More Books

Students also viewed these Databases questions

Question

2. What are your challenges in the creative process?

Answered: 1 week ago