Polynomial Regression

来源:互联网 发布:淘宝卖家怎样上图 编辑:程序博客网 时间:2024/05/16 08:03

choosing your features
这里写图片描述
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

0 0
原创粉丝点击