Professional Documents
Culture Documents
Regression PDF
Regression PDF
- Linear
- Non Linear
Price
size of house
𝜕𝐽
= 𝑛𝑖=1 2 𝑦 𝑖 − 𝑤0 +𝑤1 𝑥1 −1 = 0
𝜕𝑤0
𝜕𝐽
= 𝑛𝑖=1 2 𝑦 𝑖 − 𝑤0 +𝑤1 𝑥1 −𝑥1 = 0
𝜕𝑤1
𝛻𝑤 𝐽 𝑊 = 0 ⟹ (𝑋 𝑇 X)W = 𝑋 𝑇 y
𝑊 = (𝑋 𝑇 X)−1 𝑋 𝑇 y
𝑋 † = (𝑋 𝑇 X)−1 𝑋 𝑇
W = 𝑋†y
𝑋 † is pseudo inverse of X
𝑛 𝑖
𝐽(W) = 𝑖=1(𝑦 − 𝑊 𝑇 𝑥 𝑖 )2
𝑛 𝑖
J(W) = 𝑖=1(𝑦 − 𝑊 𝑇 𝑥 𝑖 )2
𝑦 = 𝑓 𝑋 = 𝑤0 + 𝑤1 𝑥 + 𝑤2 𝑥 2 … + 𝑤𝑚 𝑥 𝑚
we define the new variables based on the basis transform functions as :
𝑧𝑖 = ∅𝑖 𝑥 = 𝑥 𝑖 ;
Therefore :
𝑦 = 𝑓 𝑥 = 𝑤0 + 𝑤1 ∅1 (𝑥) + … + 𝑤𝑚 ∅𝑚 (𝑥)
or : 𝑦 = 𝑔 𝑧 = 𝑤0 + 𝑤1 𝑧1 + … + 𝑤𝑚 𝑧𝑚 , 𝑧 = [ 𝑧1 , 𝑧2 , ⋯ , 𝑧𝑚 ]𝑇
we can find the linear relation between y and z, and then by replacing 𝑧𝑖
with ∅𝑖 𝑥 , the non linear relation between y and x, based on the ∅𝑖 𝑥
functions is obtained.
∥𝑥−𝑐𝑗 ∥ 1
∅𝑗 𝑥 = 𝜎 , where 𝜎 𝑎 =
𝜎𝑗 1+exp (−𝑎)
This function grows from zero to one, therefore it can simulate some of
the probabilistic functions such as CMD probability function. Around
zero it is similar to linear functions, and then at the far points from
center (zero) it is strongly non linear with low gradeint.