Nesara S R
Followers: 0 Following: 0
Statistics
2 Questions
0 Answers
RANK
140,567
of 290,008
REPUTATION
0
CONTRIBUTIONS
2 Questions
0 Answers
ANSWER ACCEPTANCE
0.0%
VOTES RECEIVED
0
RANK
of 19,620
REPUTATION
N/A
AVERAGE RATING
0.00
CONTRIBUTIONS
0 Files
DOWNLOADS
0
ALL TIME DOWNLOADS
0
RANK
of 144,389
CONTRIBUTIONS
0 Problems
0 Solutions
SCORE
0
NUMBER OF BADGES
0
CONTRIBUTIONS
0 Posts
CONTRIBUTIONS
0 Public Channels
AVERAGE RATING
CONTRIBUTIONS
0 Highlights
AVERAGE NO. OF LIKES
Feeds
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)...
5 years ago | 1 answer | 0
1
answerQuestion
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...
5 years ago | 0 answers | 0