- Deep Learning By Example
- Ahmed Menshawy
- 176字
- 2021-06-24 18:52:45
Feature transformations
In the previous two sections, we covered reading the train and test sets and combining them. We also handled some missing values. Now, we will use the random forest classifier of scikit-learn to predict the survival of passengers. Different implementations of the random forest algorithm accept different types of data. The scikit-learn implementation of random forest accepts only numeric data. So, we need to transform the categorical features into numerical ones.
There are two types of features:
Quantitative: Quantitative features are measured in a numerical scale and can be meaningfully sorted. In the Titanic data samples, the Age feature is an example of a quantitative feature.
- Qualitative: Qualitative variables, also called categorical variables, are variables that are not numerical. They describe data that fits into categories. In the Titanic data samples, the Embarked (indicates the name of the departure port) feature is an example of a qualitative feature.
We can apply different kinds of transformations to different variables. The following are some approaches that one can use to transform qualitative/categorical features.
- Hands-On Deep Learning with Apache Spark
- 商戰(zhàn)數(shù)據(jù)挖掘:你需要了解的數(shù)據(jù)科學與分析思維
- TIBCO Spotfire:A Comprehensive Primer(Second Edition)
- 空間傳感器網(wǎng)絡(luò)復雜區(qū)域智能監(jiān)測技術(shù)
- 物聯(lián)網(wǎng)與云計算
- 深度學習中的圖像分類與對抗技術(shù)
- 工業(yè)機器人入門實用教程(KUKA機器人)
- Photoshop CS3圖像處理融會貫通
- 基于32位ColdFire構(gòu)建嵌入式系統(tǒng)
- Learning C for Arduino
- Grome Terrain Modeling with Ogre3D,UDK,and Unity3D
- 走近大數(shù)據(jù)
- 零起點學西門子S7-200 PLC
- ADuC系列ARM器件應用技術(shù)
- 手把手教你學Photoshop CS3