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

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.

主站蜘蛛池模板: 锦州市| 张家港市| 蓬安县| 永宁县| 澜沧| 台前县| 云龙县| 滦南县| 郑州市| 思南县| 读书| 乌兰浩特市| 临潭县| 中西区| 台湾省| 石河子市| 安阳县| 华坪县| 江达县| 连江县| 北宁市| 方山县| 额济纳旗| 西城区| 师宗县| 丰城市| 扎鲁特旗| 包头市| 清远市| 大同市| 岑溪市| 马山县| 柏乡县| 资源县| 额尔古纳市| 汉沽区| 固始县| 新竹县| 惠安县| 格尔木市| 政和县|