머신러닝,딥러닝/Andrew Ng 머신러닝 코세라 강의 노트

Week 2 lecture ML : quiz/ submitting lecture assignments

mcdn 2020. 8. 7. 01:28
반응형

답 0.52 ( 94 - 81 / 25 )
답 1
답 1 
답 4 

 

답 only 2

Basic Operations

 

 

 

save v to the file named hello.mat

 

 

Computing on Data

 

 

 

 

 

magic : 랜덤으로 만들때 ㅋㅋㅋ 가로 세로 대각선 합이 같다 

Plotting Data

 

 

Control Statements: for, while, if statement

 

 

 

 

 

Vectorization

 

, here's how you would write a vectorized implementation,  which is that you would think of a x and theta as vectors.  You just said prediction = theta' * x.  You're just computing like so.  So instead of writing all these lines of code with a for loop,  you instead just have one line of code.  And what this line of code on the right will do is,  it will use Octaves highly optimized numerical linear algebra routines to  compute this inner product between the two vectors, theta and X, and not only is  the vectorized implementation simpler, it will also run much more efficiently.
And concretely, the three elements of delta correspond if n = 2,  the three elements of delta correspond exactly to this thing,  to the second thing, and this third thing.  Which is why when you update theta according to theta- alpha delta,  we end up carrying exactly the same simultaneous updates  as the update rules that we have up top.
We said that in order to vectorize this code we will instead said u = 2v + 5w.  So we're saying that the vector u is equal to two times the vector v  plus five times the vector w.  So this is an example of how to add different vectors and  this summation's the same thing.  This is saying that the summation over here is just some real number, right?  That's kinda like the number two or some other number times the vector, x1.  So it's kinda like 2v or say some other number times x1, and  then plus instead of 5w we instead have some other real number,  plus some other vector, and then you add on other vectors, plus dot,  dot, dot, plus the other vectors, which is why, over all,  this thing over here, that whole quantity, that delta is just some vector.
1 2 3
check all! 1 도 된다. 

 

반응형