Top Machine Learning Algorithms

Suppose a help desk wants to predict how long a ticket will stay open. That calls for a number. If the same team wants to flag urgent tickets, it needs a category instead. The two…

Blueprint comparing regression, classification, and clustering through a fitted line, labeled groups, and clusters of points.

Suppose a help desk wants to predict how long a ticket will stay open. That calls for a number. If the same team wants to flag urgent tickets, it needs a category instead. The two questions can use the same records but need different algorithms and different tests of success.

Read the chart by the output you need

If past examples have a known answer, you can train a model to predict that answer for a new case. This is supervised learning: regression predicts a number, and classification predicts a category. Without past answers, you might instead look for groups of similar cases. The visual guide to the branches of machine learning shows where these tasks fit.

The chart identifies what each algorithm can do; it does not rank their performance. Use the task to narrow the field, then compare a few candidates on the same held-out examples.

Choose a first model and a comparison

Predict a number: linear regression. For ticket resolution time, start with the median resolution time from your training data as a no-model baseline. Try linear regression if factors such as queue length seem to have roughly additive effects. Compare mean absolute error (MAE) in hours: an MAE of 3 means the prediction is off by three hours on average, not that every estimate is within three hours.

Predict a category: logistic regression. Despite its name, logistic regression is a classifier. For an urgent/not-urgent label, it estimates the probability that a ticket is urgent. The threshold you choose determines which tickets a reviewer sees. If urgency depends on a combination of conditions, try a shallow decision tree as a comparison. It can split first by outage type and then by customer impact; limiting its depth helps keep it from memorizing rare cases. Trees can also predict numbers.

Use similarity when distance means something. K-nearest neighbors (KNN) uses nearby labeled examples to vote on a class or average a numeric answer. Scale numeric features first so that a change of units, such as hours to minutes, does not change which cases count as neighbors. A support vector machine (SVM) is another candidate for scaled features: its classification form seeks a separating boundary with a wide margin, and its regression form predicts numbers.

Consider a neural network when the inputs warrant it. If the input is a recording of a support call rather than a few ticket fields, learning patterns in the audio may be worth the extra training and evaluation work. Neural networks support both classification and regression. See how neural networks learn features before choosing one over a simpler baseline.

Find groups without labels: k-means. To explore ticket patterns, group cases using numeric features such as the number of affected accounts and the backlog at intake. Scale the features and try several cluster counts. A silhouette score measures how well separated the groups are, but inspect actual tickets from each group before naming it. A well-separated cluster is not necessarily an urgency category.

Worked example: which urgent tickets reach a reviewer?

Imagine a validation week with 100 tickets, 10 of them urgent. Calling every ticket routine gives 90% accuracy but catches none of the urgent cases. Suppose a logistic regression model flags 15 tickets and 8 of those are urgent. Its precision is 8/15 (about 53%): seven routine tickets enter the review queue. Its recall is 8/10 (80%): two urgent tickets are missed.

If a reviewer can handle only 15 tickets a week, compare models by how many urgent cases they catch in their top 15. If that limit can change and missed cases are more costly than extra reviews, test a lower threshold and count how many additional tickets it sends. The scikit-learn guide to evaluation metrics gives the definitions for precision, recall, and regression errors.

Test the choice on tickets the model has not seen

For a queue that changes over time, train on older tickets, use a later period to select the model and threshold, and reserve the newest period for one final test. Use only fields available at intake: a resolution note written two days later would leak the answer. Fit preprocessing steps such as scaling on the training set alone. If a more complex model does not catch more urgent tickets at the same review capacity, keep the simpler one.