photo

Nesara S R


Last seen: 3 years ago Active since 2019

Followers: 0   Following: 0

Statistics

MATLAB Answers

2 Questions
0 Answers

RANK
149,924
of 301,433

REPUTATION
0

CONTRIBUTIONS
2 Questions
0 Answers

ANSWER ACCEPTANCE
0.0%

VOTES RECEIVED
0

RANK
 of 21,272

REPUTATION
N/A

AVERAGE RATING
0.00

CONTRIBUTIONS
0 Files

DOWNLOADS
0

ALL TIME DOWNLOADS
0

RANK

of 174,520

CONTRIBUTIONS
0 Problems
0 Solutions

SCORE
0

NUMBER OF BADGES
0

CONTRIBUTIONS
0 Posts

CONTRIBUTIONS
0 Public Channels

AVERAGE RATING

CONTRIBUTIONS
0 Discussions

AVERAGE NO. OF LIKES

Feeds

View by

Question


To compute cost and gradient for a logistic regression problem:the function returns only zeroes even though the correct value is being computed(I know it because I executed the function body separately in command line and checked)
function [J,grad]=costFunction(theta, X, y) m = length(y); z=X*theta; h=sigmoid(z); H=h.'; h1=log(H)*(-y); h2=(log(1-H)...

7 years ago | 1 answer | 0

1

answer

Question


In the following gradient Descent code, theta values are not changing at all( but the for loop is running cz J_history is getting updated). And also even though i have given fprintf no value is being displayed:
function [theta,J_history]=gradientDescent(X, y, theta, alpha, num_iters) %GRADIENTDESCENT Performs gradient descent to learn t...

7 years ago | 0 answers | 0

0

answers