A logistics company is building a forecasting tool that predicts next week's fuel prices using ten years of historical daily price and demand data. The output needed is a continuous numeric value, not a category. Which type of machine learning task should the data science team frame this as?
Select an answer to reveal the explanation.
Short Explanation
The key detail here is the shape of the answer the company wants: a specific number, like 3.42 dollars a gallon, not a label like 'high' or 'low'. Whenever the target is a continuous quantity predicted from past patterns, that is the branch of machine learning built to draw a line, or a curve, through historical data and extend it forward. Sorting things into buckets, which is what happens when you predict a category instead of a number, is a different task entirely and would throw away the precision the logistics team needs. Grouping similar data points together, without predicting anything about the future, does not produce a forecast at all. And catching unusual spikes is about spotting outliers, not projecting a normal expected value forward in time. The numeric-forecast framing points squarely at one technique.
Full Explanation
The correct answer is C. Regression is the machine learning task used when the model must predict a continuous numeric value from historical data, and predicting a future fuel price, which can take on any decimal value within a range, fits that definition exactly. Option A is incorrect because classification assigns inputs to discrete categories, such as 'price will rise' or 'price will fall', which discards the precise numeric value the company actually needs. Option B is incorrect because clustering is an unsupervised technique that groups similar data points together without producing a predicted future value at all, so it cannot forecast a specific price. Option D is incorrect because anomaly detection is designed to flag unusual or outlier data points, such as a sudden price spike, rather than to forecast an expected future value under normal conditions.