Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, below are the assignment details, it is written in Python. Any help would be appreciated. Thank you. Directions: For this assignment, you need to

Hello, below are the assignment details, it is written in Python. Any help would be appreciated. Thank you.

image text in transcribed

Directions: For this assignment, you need to build a linear regression model from scratch. Below is a detailed instruction of what you may need to do. - Dataset Preparation - You need to load the dataset using skearn.datasets. load_diabetes. After loading the dataset, randomly shuffle the dataset to split the dataset to train/dev/test sets. - Use the 70% of data for the train set, 15% for the dev set, and 15% for the test set - You need to make sure that the labels and features are still matching after shuffling the data. - You may want to use the random shuffle function provided by Numpy. - Univariate Linear Regression Development You need to implement a univariate linear regression model from scratch. - You need to use a gradient descent algorithm to solve the optimal parameters for the univariate linear regression model. - You need to implement the gradient descent algorithm from scratch. - The dataset contains 10 features; however for a univariate linear regression model, you may only use one feature. Thus, to build the linear regression model, you need to decide which feature to you. There are three approaches you may use: - You may train 10 univariate linear regression models, one model for each feature, and select the one with the best performance on the dev set. - You may run a feature selection algorithm to select a feature. There are plenty of feature selection algorithms available. Feel free to search on the internet and use a method at your choice. - You may use PCA for dimension reduction to reduce the number of features to 1 . There are many python libraries that provide PCA algorithms you may use. In fact, scikit-learn also has a function. Feel free to search on the internet and choose one at your choice. - Test the Model

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

Database Design Query Formulation And Administration Using Oracle And PostgreSQL

Authors: Michael Mannino

8th Edition

1948426951, 978-1948426954

More Books

Students also viewed these Databases questions

Question

Why would you customize a COA to a specific business?

Answered: 1 week ago

Question

Describe three other types of visual aids.

Answered: 1 week ago