- Python Machine Learning By Example
- Yuxi (Hayden) Liu
- 165字
- 2021-07-02 12:41:35
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 choice—it 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.
- 大數據導論:思維、技術與應用
- Mastering Mesos
- Mastering Matplotlib 2.x
- Linux Mint System Administrator’s Beginner's Guide
- 圖解PLC控制系統梯形圖和語句表
- 微型計算機控制技術
- Expert AWS Development
- 小型電動機實用設計手冊
- 基于Xilinx ISE的FPAG/CPLD設計與應用
- 內模控制及其應用
- INSTANT VMware vCloud Starter
- 青少年VEX IQ機器人實訓課程(初級)
- x86/x64體系探索及編程
- Hands-On Generative Adversarial Networks with Keras
- Flink內核原理與實現