An AI practitioner needs an algorithm to classify flower species using features: petal length, petal width, sepal length, and sepal width. Which algorithm is suitable for this classification task?
Choose an answer
Tap an option to check your answer.
Correct answer: K-nearest neighbors (k-NN).
Why this is the answer
K-nearest neighbors (k-NN) is suitable because it's a non-parametric, instance-based learning algorithm commonly used for classification tasks. Given the labeled features (petal length, petal width, etc.), k-NN classifies a new data point by finding the 'k' closest data points in the training set and assigning the most frequent class among them. K-means clustering is incorrect because it's an unsupervised learning algorithm used for grouping data, not classifying based on known species. ARIMA is incorrect as it's a time-series forecasting model. Linear regression is incorrect because it's used for predicting continuous values, not for categorical classification.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed