|
From: | Ed Meyer |
Subject: | Re: how to vectorize in the octave |
Date: | Mon, 12 Nov 2012 11:45:18 -0800 |
yes, it is from professor Andrew Ng the on-line coursesa class about machine learning.I am doing the ex3 now. I started the class a little late.
On Mon, Nov 12, 2012 at 2:27 PM, Ed Meyer <address@hidden> wrote:On Mon, Nov 12, 2012 at 9:39 AM, Herier chen <address@hidden> wrote:
_______________________________________________Hi, all, I am new for the octave, and I want to know how to vectorize the following code, I have tried lots of time ,but failed. would anybody do me a favor to help. thanks.
grad = zeros(size(theta));
m1 = size(grad);
h = sigmoid(X*theta);
for i=1:m1,
grad(i) = (1.0/m)X(:,i)'(h-y);
end
and another question about the octave.
what is the difference between "/" and "./" . and how to find these operators definition in the octave help document. I have not find these all kinds of operators in octave.
thanks a lot/
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave
which exercise is this? (I assume it is from Dr. Ng's ML class)
--
Ed Meyer
[Prev in Thread] | Current Thread | [Next in Thread] |