AIF-C01 · Question #121
An AI practitioner wants to predict the classification of flowers based on petal length, petal width, sepal length, and sepal width. Which algorithm meets these requirements?
The correct answer is A. K-nearest neighbors (k-NN). Explanation K-nearest neighbors (k-NN) is correct because it is a supervised classification algorithm that predicts which category (class) a new data point belongs to by comparing it to its closest neighbors using multiple input features - perfectly suited for classifying…
Question
An AI practitioner wants to predict the classification of flowers based on petal length, petal width, sepal length, and sepal width. Which algorithm meets these requirements?
Options
- AK-nearest neighbors (k-NN)
- BK-mean
- CAutoregressive Integrated Moving Average (ARIMA)
- DLinear regression
How the community answered
(28 responses)- A89% (25)
- C7% (2)
- D4% (1)
Explanation
Explanation
K-nearest neighbors (k-NN) is correct because it is a supervised classification algorithm that predicts which category (class) a new data point belongs to by comparing it to its closest neighbors using multiple input features - perfectly suited for classifying flower species (like Iris) based on four measurements. K-means (B) is wrong because it is an unsupervised clustering algorithm that groups unlabeled data, not one that predicts predefined classifications. ARIMA (C) is a time-series forecasting model used for sequential/temporal data (e.g., stock prices), making it completely irrelevant to flower classification. Linear regression (D) predicts a continuous numerical output (e.g., a price or temperature), not a discrete category label like a flower species.
Memory Tip: Think of k-NN as "asking your nearest neighbors what they are" - if the flowers around you are mostly roses, you're probably a rose. Whenever you see classification + labeled categories, think k-NN, not k-means (which has no labels).
Topics
Community Discussion
No community discussion yet for this question.