AI-900 Question 114
Single answerYou are tasked with building a machine learning model to predict the price of houses based on a dataset. The dataset contains the following columns: 'SquareFootage', 'NumberOfBedrooms', 'Neighborhood', 'HousePrice'. Which columns should be used as features, and which column should be used as the label?
- A
'SquareFootage', 'NumberOfBedrooms', and 'Neighborhood' as features; 'HousePrice' as the label
- B
'SquareFootage', 'NumberOfBedrooms', and 'HousePrice' as features; 'Neighborhood' as the label
- C
'SquareFootage' and 'NumberOfBedrooms' as features; 'Neighborhood' as the label
- D
'SquareFootage', 'NumberOfBedrooms', 'Neighborhood', and 'HousePrice' as features; No label is selected
Show answer and explanation
Correct answer: A
Explanation
In supervised machine learning, features are the input variables that help predict the label, which is the target output variable. For a house price prediction scenario, the features would typically include attributes like size, number of bedrooms, and neighborhood, while the label would be the actual house price.
- A. Correct.
'SquareFootage', 'NumberOfBedrooms', and 'Neighborhood' are independent variables (features) that influence the dependent variable (label), which is 'HousePrice'. This is the correct setup for predicting house prices.
- B. Incorrect.
This option incorrectly uses 'HousePrice' as a feature, even though it is the variable being predicted. Additionally, 'Neighborhood' is mistakenly assigned as the label.
- C. Incorrect.
'Neighborhood' cannot be used as the label in this scenario because it is not the target variable being predicted. The label should be 'HousePrice'.
- D. Incorrect.
This option incorrectly uses all columns as features and does not designate a label, which is required for supervised learning tasks like price prediction.