Open zakir8251 opened 6 years ago
g=1./(1+exp(-z)) sigmoid.zip
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,:);
It is easy to understand. m = length(y) g = ones(m,1) ./ ((ones(m,1) + exp(-z))
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);