Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Query regarding vector transpose in hypothesis function (Stanford Machine Learning Video Lecture 2)

I was looking at lecture 2 of the stanford machine learning lecture series taught by professor Andrew NG and had a question about something that I think might be quite rudimentary but is just not clicking in my head. So let us consider two vectors θ and x where both vectors contain real numbers.

Let h(x) be a function (in this specific case called the hypothesis) but let it be some function denoted by :

h(x) = "summation from i = 0 to i = n" of θ(i)*x(i) = θ(transpose)*x

I dont understand the last part where he says h(x) is also equal to θ(transpose)*x.

If someone could clarify this concept for my I would be very grateful.

like image 407
anonuser0428 Avatar asked Oct 15 '25 00:10

anonuser0428


1 Answers

It's just basic linear algebra, it follows from the definition of matrix vector multiplication:

enter image description here

So if θ and x are both n+1 x 1 matrices, then

(θ' * x) = Sum over i  θ'(1,i) * x(i,1) = Sum over i  θ(i,1)*x(i,1)

like image 185
Niki Avatar answered Oct 18 '25 05:10

Niki