AI-900 Question 113
Select 2You are tasked with building a machine learning model to predict house prices based on various characteristics of the houses. The dataset includes columns: 'SquareFootage', 'NumberOfBedrooms', 'Neighborhood', 'Price', and 'YearBuilt'. Which columns in the dataset should be considered as features and which should be considered as the label for this machine learning task?
- A
'SquareFootage', 'NumberOfBedrooms', 'Neighborhood', and 'YearBuilt' as features; 'Price' as the label
- B
'SquareFootage', 'Price', and 'YearBuilt' as features; 'NumberOfBedrooms' as the label
- C
'SquareFootage', 'Neighborhood', and 'YearBuilt' as features; 'Price' as the label
- D
'Price' as a feature; 'SquareFootage', 'NumberOfBedrooms', and 'YearBuilt' as labels
- E
'Price' as the label; all other columns as features
Show answer and explanation
Correct answers: A, E
Explanation
In a supervised machine learning task, the features are the input data used to make predictions, and the label is the target variable being predicted. Here, 'Price' is the target variable (label) because the goal is to predict house prices, and the other columns ('SquareFootage', 'NumberOfBedrooms', 'Neighborhood', 'YearBuilt') provide the input data (features) for the model.
- A. Correct.
Correct. In a supervised learning task to predict house prices, 'Price' is the target variable (label), and the other attributes ('SquareFootage', 'NumberOfBedrooms', 'Neighborhood', 'YearBuilt') are the features used to make predictions.
- B. Incorrect.
Incorrect. 'Price' is the target variable (label), not a feature, and 'NumberOfBedrooms' is not the label in this context.
- C. Incorrect.
Incorrect. While 'SquareFootage', 'Neighborhood', and 'YearBuilt' are valid features, excluding 'NumberOfBedrooms' as a feature is not appropriate unless specified otherwise.
- D. Incorrect.
Incorrect. 'Price' should not be considered a feature since it is the target variable (label) in this machine learning task. Similarly, 'SquareFootage', 'NumberOfBedrooms', and 'YearBuilt' are not labels.
- E. Correct.
Correct. This correctly identifies 'Price' as the label and all other columns ('SquareFootage', 'NumberOfBedrooms', 'Neighborhood', 'YearBuilt') as features for the machine learning task.