- 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.
- Ansible Configuration Management
- 人工免疫算法改進(jìn)及其應(yīng)用
- Learning Apache Spark 2
- Visual FoxPro 6.0數(shù)據(jù)庫(kù)與程序設(shè)計(jì)
- 微型計(jì)算機(jī)控制技術(shù)
- 最后一個(gè)人類
- PHP開發(fā)手冊(cè)
- 大學(xué)C/C++語(yǔ)言程序設(shè)計(jì)基礎(chǔ)
- 完全掌握AutoCAD 2008中文版:機(jī)械篇
- Enterprise PowerShell Scripting Bootcamp
- 奇點(diǎn)將至
- 筆記本電腦電路分析與故障診斷
- Photoshop CS4數(shù)碼照片處理入門、進(jìn)階與提高
- 工業(yè)機(jī)器人應(yīng)用系統(tǒng)三維建模
- 仿蛛機(jī)器人的設(shè)計(jì)與制作