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

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.

主站蜘蛛池模板: 桓仁| 溆浦县| 应城市| 临颍县| 衢州市| 乌什县| 治县。| 伊通| 富阳市| 灌阳县| 新宁县| 塔河县| 揭西县| 商南县| 嘉峪关市| 阳朔县| 镇赉县| 潼南县| 和静县| 景谷| 墨江| 常州市| 沈阳市| 高雄县| 浦北县| 闸北区| 南皮县| 汨罗市| 松潘县| 应城市| 马山县| 南平市| 张家港市| 襄樊市| 昌宁县| 阿图什市| 天气| 安达市| 高唐县| 万源市| 京山县|