[Solved] MachineLearning Assignment 1 Linear Regression & Logistic Regression

$25

File Name: MachineLearning_Assignment_1__Linear_Regression_&_Logistic_Regression.zip
File Size: 649.98 KB

SKU: [Solved] MachineLearning Assignment 1 – Linear Regression & Logistic Regression Category: Tag:
5/5 - (1 vote)

Assignment 1 Linear Regression & Logistic Regression

Part A:

The attached dataset house_data.csv contains 21613 records of house sale prices. It includes homes sold between May 2014 and May 2015.

  • Apply Simple Linear regression with gradient descent to predict the price based on sqft_living (Square footage of the apartments interior living space).

Given the hypothesis function: Y = C1 + C2 X

  • (target variable) = Price, X (predictor) = sqft_living, C1 and C2 are the parameters of the function.
  • Apply Multiple Linear regression with gradient descent to predict price based on 5 predictors (grade, bathrooms, lat, sqft_living, view).

Given the hypothesis function: Y = C1 + C2 X2 + C3 X3 + C4 X4 + C5 X5 + C6 X6

  • (target variable) = Price, X (predictor) = (grade, bathrooms, lat, sqft_living, view), C1, C2, C3, C4, C5 and C6 are the parameters of the function.
  1. Implement the gradient descent function to optimize parameters of the function.
  2. Calculate error function to see how the error of the hypothesis function changes with every iteration of gradient descent (hint: you will need to calculate error in every iteration) .
  3. Use optimized hypothesis function to make predictions on new data.
  4. Try different values of learning rate and see how this changes the accuracy of the model.

Part B:

The attached dataset heart.csv contain 303 records of patients have heart disease or not according to features in it. You are required to build Logistic Regression model using gradient descent to predict whether patient have heart disease or not (target) based on 4 predictors (trestbps, chol, thalach, oldpeak).

  1. Implement the gradient descent function to optimize parameters of the function.
  2. Calculate error function to see how the error of the hypothesis function changes with every iteration of gradient descent(hint: you will need to calculate error in every iteration). c) Use optimized hypothesis function to make predictions on new data.
  3. d) Try different values of learning rate and see how this changes the accuracy of the model.

Machine Learning [Fall 2020]

Important Notes:

  • You can only use pandas, numpy and matplotlib libraries. (Dont use sklearn)
  • The maximum number of students in a team is 3 and the minimum is 2.
  • No late submission is allowed.
  • Cheating students will take negative grades and no excuses will be accepted.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] MachineLearning Assignment 1 Linear Regression & Logistic Regression
$25