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

Derived features

In the previous section, we applied some transformations to the Titanic data in order to be able to use the random forest classifier of scikit-learn (which only accepts numerical data). In this section, we are going to define another type of variable, which is derived from one or more other features.

Under this definition, we can say that some of the transformations in the previous section are also called derived features. In this section, we will look into other, complex transformations.

In the previous sections, we mentioned that you need to use your feature engineering skills to derive new features to enhance the model's predictive power. We have also talked about the importance of feature engineering in the data science pipeline and why you should spend most of your time and effort coming up with useful features. Domain knowledge will be very helpful in this section.

Very simple examples of derived features will be something like extracting the country code and/or region code from a telephone number. You can also extract the country/region from the GPS coordinates.

The Titanic data is a very simple one and doesn't contain a lot of variables to work with, but we can try to derive some features from the text feature that we have in it.

主站蜘蛛池模板: 长沙县| 琼结县| 达州市| 渑池县| 淮南市| 兴化市| 诸暨市| 平南县| 泗水县| 广饶县| 屏南县| 阿克| 武威市| 宜都市| 鞍山市| 阿拉尔市| 吴旗县| 云安县| 奎屯市| 宁远县| 茶陵县| 达拉特旗| 呈贡县| 乌拉特中旗| 晋江市| 克拉玛依市| 江西省| 鹤峰县| 台湾省| 西吉县| 仁怀市| 呼伦贝尔市| 昌乐县| 平顶山市| 三原县| 九寨沟县| 容城县| 营口市| 阿克| 洛扎县| 双流县|