linear regression(1)-multiple features

来源:互联网 发布:如何传软件 编辑:程序博客网 时间:2024/04/28 16:15

PS.used to taking notes on papers.

summary:hθ(X)=θTX

Multiple FeaturesGradient(variables

xj(i)=value of feature j in the ith training example

x(i)=the column vector of all the feature inputs of the ith training example

m=the number of training examples

n=x(i);(the number of features)

The multivariable form of the hypothesis function accommodating these multiple features is as follows:

hθ(x)=θ0+θ1x1+θ2x2+θ3x3+⋯+θnxn

Using the definition of matrix multiplication, our multivariable hypothesis function can be concisely represented as

hθ(x)=θ0θ1...θnx0x1⋮xn=θTx


The following example shows us the reason behind setting x0(i)=1 :

X=x0(1)x0(2)x0(3)x1(1)x1(2)x1(3),θ=θ0θ1

As a result, you can calculate the hypothesis as a vector with:

hθ(X)=θTX


0 0
原创粉丝点击