“Help with these orders” is too vague. Do we want a category, a number, a useful grouping, or a way to choose actions? Different questions lead to different learning problems.
Learning with recorded answers
Supervised learning learns from examples that include input features and recorded targets. The learning procedure compares a prediction with the attached answer and uses the difference to improve the model.
It resembles practicing with an answer sheet, although no person needs to stand beside the computer during every calculation. Labels can come from measurements or software as well as people.
Classification predicts membership in categories. A fruit sorter might choose apple, pear, or orange. Some classifiers first produce scores or probabilities for the categories, then use a decision rule to choose one. A printed category can hide uncertainty.
Regression predicts a numerical quantity. Estimating 8 minutes of preparation time is regression. The number is an estimate, not a promise that the sandwich will be ready at exactly that instant.
If the output is “short wait” or “long wait,” we have turned waiting time into classification. If it is minutes, it is regression. The same receipts can support either question, but we must define the target accordingly.
Finding groups without an answer sheet
Unsupervised learning looks for structure in data without a supplied target answer for each example. One method is clustering, which groups examples according to a chosen notion of similarity.
Put orders with similar contents near each other. We might discover a group of small drink orders and another of large lunch orders. The method finds groupings; a person interprets them. It has not proved that those are the only meaningful groups, or that every customer in one group wants the same thing.
Learning from what happens after an action
Reinforcement learning learns how to choose actions through feedback from an environment. A simulated cafe might try different preparation schedules, observe the resulting queues, and improve its choices over many trials.
A reward is the numerical feedback used to encourage outcomes during that learning. A policy is a rule or model for choosing actions from the current situation. The policy might choose which waiting order to prepare next.
The reward is like a scoreboard. If the scoreboard only rewards finishing many orders, the policy might keep postponing large ones. Writing a good score is part of defining the task. Getting more reward does not automatically mean behaving helpfully or fairly.
The learning trials should happen in an appropriate controlled setting. A useful explanation of reinforcement learning is not permission to experiment on real customers.
- Situation and policyA queue is observed; the policy chooses which order goes next.
- Environment changesThe simulated preparation step changes the queue.
- Reward and learningFeedback helps update the policy over trials. Check for neglected goals.
These are not three rungs on a ladder
A system can combine several approaches. It might classify an order, predict its preparation time, and follow a human-written scheduling rule. It does not need reinforcement learning merely because that name sounds more advanced.
Later we will meet a way to create training targets from text itself. That lets a model practice without a person labeling every next piece of a sentence. The important question stays the same: where does the feedback come from?
Choose the task: group similar orders without naming groups first
Clustering is a reasonable candidate. Choosing between already named “drink” and “meal” categories from labeled examples would instead be classification.