官术网_书友最值得收藏!

Polynomial features

If we have two features, a and b, we can suspect that there's a polynomial relation, such as a2 + ab + b2. We can consider each term in the sum to be a feature—in this example, we have three features. The product ab in the middle is called an interaction. An interaction doesn't have to be a product—although this is the most common choiceit can also be a sum, a difference, or a ratio. If we're using a ratio to avoid dividing by zero, we should add a small constant to the divisor and dividend.

The number of features and the order of the polynomial for a polynomial relation aren't limited. However, if we follow Occam's razor, we should avoid higher-order polynomials and interactions of many features. In practice, complex polynomial relations tend to be more difficult to compute and tend to overfit, but if you really need better results, they may be worth considering.

主站蜘蛛池模板: 永济市| 桂平市| 十堰市| 会昌县| 惠来县| 崇文区| 阳春市| 威海市| 霍林郭勒市| 上虞市| 西城区| 茌平县| 安图县| 怀化市| 莱西市| 蓬溪县| 祥云县| 云龙县| 德昌县| 米泉市| 佛教| 灌南县| 顺昌县| 调兵山市| 丽水市| 广昌县| 乌拉特中旗| 满城县| 大新县| 商河县| 左云县| 革吉县| 称多县| 岐山县| 中山市| 濮阳县| 开原市| 五家渠市| 久治县| 武隆县| 阿鲁科尔沁旗|