anirudhjayaraman / Machine-Learning

Repo cataloging my coursework for Andrew Ng's ML MOOC
143 stars 192 forks source link

This should be the sigmoid function #5

Open zakir8251 opened 6 years ago

zakir8251 commented 6 years ago

https://github.com/anirudhjayaraman/Machine-Learning/blob/348fa773c2a7fa56c76d71645c15d9e6840a8be4/Andrew%20Ng%20Stanford%20Coursera/Week%2004/ex3/predictOneVsAll.m#L35

Hey shouldn't this be the sigmoid fn ... logistic regression vs linear? [~,p]=max(sigmoid(X*all_theta'),[],2);

swapnil0070 commented 4 years ago

g=1./(1+exp(-z)) sigmoid.zip

SenthilVikram commented 4 years ago

In nnCostFunction.m It's showing an error when I write

y_matrix = eye(num_labels)(y,:);

But not showing an error when I rewrite -

I = eye(num_labels); y_matrix = I(y,:);

Vasukapoor07 commented 4 years ago

It is easy to understand. m = length(y) g = ones(m,1) ./ ((ones(m,1) + exp(-z))