Topic 1 Question 163
2 つ選択A machine learning specialist is developing a regression model to predict rental rates from rental listings. A variable named Wall_Color represents the most prominent exterior wall color of the property. The following is the sample data, excluding all other variables:
The specialist chose a model that needs numerical input data.
Which feature engineering approaches should the specialist use to allow the regression model to learn from the Wall_Color data?Apply integer transformation and set Red = 1, White = 5, and Green = 10.
Add new columns that store one-hot representation of colors.
Replace the color name string by its length.
Create three columns to encode the color in RGB format.
Replace each color name by its training set frequency.
ユーザの投票
コメント(10)
B, and E (frequency encoding)
👍 11edvardo2022/05/05BD? any thought?
👍 8bluer12022/05/02- 正解だと思う選択肢: BE
B. Add new columns that store one-hot representation of colors. One-hot encoding is a common approach to represent categorical variables as numerical values. This approach creates new binary variables for each category and assigns a value of 1 to the corresponding category and 0 to the others. In this case, the specialist can create three new binary variables, one for each color (Red, White, and Green) and use them as input to the regression model.
E. Replace each color name by its training set frequency. Another approach to convert categorical variables into numerical ones is to replace each category with its frequency of occurrence in the training set. In this case, the specialist can replace the color names with their respective frequencies (1/3 for Red, 1/3 for White, and 1/3 for Green) to represent them numerically.
👍 4AjoseO2023/02/19
シャッフルモード