Polynomial Regression

choosing your features
Polynomial Regression_第1张图片
defining new features you might actually get a better model
1. combine multiple features into one.
to predict the price of a house
there’s two features:
the frontage of house x1
the depth of the house x2
however we can use X=x1*x2 as the only feature

2.Polynomial Regression
we can fit a quadratic model for it
however this function comes back down against the fact (housing prices won’t go down when the size goes up too high).
then we might choose a cubic function
to realize it
compared with multivariant linear regression we find similarity.(back to the picture)
so choosing three features this way
by the way feature scaling becomes increasingly important
eg. if x1 has range 1 - 1000 then range of x21 becomes 1 - 1000000 and that of x31 becomes 1 - 1000000000

你可能感兴趣的:(机器学习)