Paper writing templete - the usage of colon

Paper writing templete

In this section we develop two simple but powerful prediction methods: the linear model fit by least squres and the KNN prediction rule. The linear model makes huge assumptions about structure and yields stable but possibly inaccurate predictions. The method of knn makes very mild structural assumptions: its predictions are often accurate but can be unstable.

  • The usage of colon.
  • Section description.
  • Punctuation in equation.
  • Context above the equation.
    Given a vector of inputs X T = ( X 1 , X 2 , . . . , X p ) X^T=(X_1,X_2,...,X_p) XT=(X1,X2,...,Xp), we predict the ouput Y Y Y via the model
    Y ^ = β ^ 0 + ∑ j = 1 p X j β ^ j \hat Y = \hat \beta_0 + \sum_{j=1}^p X_j \hat \beta_j Y^=β^0+j=1pXjβ^j
    The term β ^ 0 \hat\beta_0 β^0 is the intercept, also known as the bias in machine learning. Often it is convenient to include the constant variable 1 in X X X, include β ^ 0 \hat\beta_0 β^0 in the vector of coefficients β ^ \hat\beta β^, and then write the linear model in vector form as an inner product
    Y ^ = X T β ^ , \hat Y = X^T\hat\beta, Y^=XTβ^,
    where X T X^T XT denotes vector or matrix transpose ( X X X being a column vector) .

In this approach, we pick the coefficients β \beta β to minimize the residual sum of squares
R S S ( β ) = ∑ i = 1 N ( y i − x i T β ) 2 RSS(\beta)=\sum_{i=1}^N(y_i-x_i^T\beta)^2 RSS(β)=i=1N(yixiTβ)2
R S S ( β ) RSS(\beta) RSS(β) is a quadratic function of the parameters, and hence its minimum always exists, but may not be unique. The solution is easiest to characterize in matrix notation. We can write
R S S ( β ) = ( y − X ) T ( y − X ) RSS(\beta)=(\mathbf y-\mathbf X)^T(\mathbf y-\mathbf X) RSS(β)=(yX)T(yX)
where X \mathbf X X is an N × p N\times p N×p matrix with each row an input vector, and y \mathbf y y is an N -vector N\text{-vector} N-vector of the outputs in the training set. Differentiating w.r.t. β \beta β we get the normal equations
X T ( y − X β ) = 0. \mathbf{X^T(y-X}\beta)=0. XT(yXβ)=0.
If T T X \mathbf T^T\mathbf X TTX is nonsingular, then the unique solution is given by
β ^ = ( X T X ) − 1 X T y , \hat\beta = \mathbf{(X^TX)^{-1}X^Ty}, β^=(XTX)1XTy,
and the fitted value at the i i ith input x i x_i xi is y ^ i = y ^ ( x i ) = x i T β ^ \hat y_i=\hat y(x_i)=x_i^T\hat\beta y^i=y^(xi)=xiTβ^.

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值