CSI436/536 Homework 5 Machine Learning
Order Number
|
636738393092 |
Type of Project
|
ESSAY
|
Writer Level
|
PHD VERIFIED
|
Format
|
APA
|
Academic Sources
|
10
|
Page Count
|
3-12 PAGES
|
Instructions/Descriptions
CSI436/536 Homework 5 Machine Learning
[Order Now]
Requirement:
- You need to submit your homework as a .py or an. ipynb file.
- You need to test your code to make sure it runs with no bugs. Code that cannot run will lose all points.
Logistic Regression
Consider the objective function in logistic regression problem (π) =
π
β (π¦π log(πππ₯π) + (1 β π¦π) log (1 β π(πππ₯π))),
π=1
where π(π§) = (1 + πβπ§) β1 is the logistic function.
[Order Now]
The given hwX.txt and hwY.txt contain the inputs π₯π β π
2 and outputs π¦π β {0,1} respectively for a binary classification problem, with one training example per row.
- (30 points) Implement the gradient descent method for optimizing (π), and apply it to fit a logistic regression model to the data. Initialize gradient descent method with π = 0 (the vector of all zeros). What are the coefficients π resulting from your fit? (Remember to include the intercept term.)
- (40 points) Implement Newton’s method to maximize (π), and compare the overall running time and number of iterations needed to converge to the same precision.
- (10 points) Plot the training data (your axes should correspond to the two coordinates of the inputs, and you should use a different symbol for each point plotted to indicate whether that example had label 1 or 0).
- (20 points) Also plot on the same figure the decision boundary fit by logistic regression. (i.e., this should be a straight line showing the boundary separating the region where (πππ₯) > 0.5 from whereπ(πππ₯) < 0.5.)
CSI436/536 Homework 5 Machine Learning
PLACE THE ORDER WITH US TODAY AND GET A PERFECT SCORE!!!