Learning paradigms
Quick answer
Learning paradigms describe the source and form of learning feedback. Supervised learning uses labeled examples; unsupervised learning finds structure without task labels. Semi-supervised learning combines labeled and unlabeled examples. Self-supervised learning constructs learning targets from data itself. Reinforcement learning learns behavior using feedback from interactions.
Supervised and unsupervised learning
With labeled historical parcel records, supervised learning can predict a binary late outcome (classification) or a numerical travel duration (regression). Without those outcomes, an unsupervised clustering task can group parcels by similarities in weight and distance. The following program only illustrates the difference in available data; it does not train either kind of model.
labeled = [([2, 10], 0), ([4, 80], 1)]unlabeled = [[2, 10], [4, 80]]print(labeled[0][1])print(unlabeled[0])Expected output:
0[2, 10]The labeled row provides an outcome; the unlabeled row provides inputs alone. Clusters do not automatically mean late or on time.
Semi-supervised and self-supervised learning
If only 100 of 1,000 historical parcels have verified outcomes, a semi-supervised approach may use both groups during training. It does not guarantee that the unlabeled examples help. Self-supervised learning instead creates targets from the original data. For example, hide one distance token in a fictional sequence and ask a model to recover it.
sequence = [10, 20, 30]target = sequence[1]masked = [sequence[0], None, sequence[2]]print(masked)print(target)Expected output:
[10, None, 30]20The target 20 comes from the original sequence, not a manually added outcome. None marks the missing input. This is a target-construction demonstration, not a trained model.
Reinforcement learning
Imagine a toy grid where a robot chooses left or right and receives a reward for reaching a goal. The learning problem is to choose actions that improve cumulative reward, possibly over several steps. A reward is not necessarily a label telling the robot which exact action to choose. Actions can affect future observations and rewards.
Paradigms can be combined: a system might first learn from masked data, then train on labeled examples. Identify the feedback at the particular learning stage rather than forcing the entire system into one category.
Common mistake
Unsupervised does not mean untrained, and self-supervised does not mean the model invents correct labels for every task. Each approach needs a well-defined training objective and suitable evaluation.
Practice and next steps
Match these scenarios to paradigms: predict labeled travel duration; group unlabeled parcels; learn using some verified labels plus unverified rows; reconstruct masked tokens; learn grid navigation from rewards. Next, define precisely what a prediction means and what errors cost.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Learning paradigms — knowledge check
Apply the concepts from this lesson to small fictional scenarios.
Train a travel-time predictor from measured durations. Which paradigm?
Group unlabeled parcels by weight and distance. Which paradigm?
Train using verified outcomes for some rows and unlabeled rows as well. Which paradigm?
Hide a token and train to recover its original value. Which paradigm?
A grid agent learns actions from rewards across steps. Which paradigm?