What problem does machine learning address?

Traditional programming asks a developer to express the decision procedure directly. Given input data and explicit rules, a program computes an output. That approach is effective when the rules are known, stable, testable, and not unreasonably numerous. Calculating tax from a fixed schedule or validating a well-defined message format should generally remain explicit software rather than being replaced merely because ML is available.

Some problems resist complete hand-written specification. Spam changes as senders adapt; the visual appearance of an object varies with lighting and viewpoint; language contains context, ambiguity, humour, and sarcasm; and relationships in markets, traffic, or user behaviour can change over time. Large datasets may also contain predictive relationships that are difficult to enumerate as rules. ML addresses such settings by using data and an optimization procedure to estimate a model whose behaviour generalizes beyond the examples used to fit it.

Generalization is the essential requirement. Memorizing the training examples is not sufficient: a useful model must perform well on relevant, previously unseen cases drawn from the intended operating environment. This immediately raises questions that recur throughout ML:

  • Is the available data representative of deployment?
  • What information is available at prediction time?
  • What kind of error matters in the application?
  • How will performance be estimated without contaminating the evaluation?
  • What happens when the environment or data-generating process changes?

A precise way to describe learning

Mitchell frames learning using three elements: a class of tasks $T$, a performance measure $P$, and experience $E$. Paraphrasing that formulation, a program learns when exposure to $E$ leads to better measured performance $P$ on tasks in $T$ [2, ch. 1]. This definition is valuable because it forces an informal request such as “build an intelligent spam filter” into operational terms.

Accuracy alone may be misleading if almost all messages belong to one class. The performance measure should reflect the relative harm of blocking a valid message and allowing spam through.

For $n$ evaluated properties, with true price $y_i$ and prediction $\hat{y}_i$, MAE is

$$\operatorname{MAE} = \frac{1}{n}\sum_{i=1}^{n}\left|y_i-\hat{y}_i\right|.$$

MAE has the same monetary unit as the target and expresses the average absolute prediction error. Whether it is the right measure still depends on the decision: a lender, seller, and public-policy analyst may assign different costs to underestimation and overestimation [8].

Learning does not mean automatic self-improvement

A deployed model normally has fixed parameters during inference. Merely sending new requests to it does not make it learn. Improvement requires a designed update process: collect suitable new observations and, where applicable, labels, rewards, or other learning signals; validate them; retrain or incrementally update the model; compare the candidate against acceptance criteria; and safely release it. A defective feedback pipeline can make a model worse rather than better.

Thus, “data-driven” should not be confused with “autonomous.” Human choices still determine the objective, labels, features, model family, constraints, evaluation protocol, release policy, and monitoring response.

Traditional programming and ML: a qualified comparison

Qualified comparison of explicit rule-based and machine-learning approaches.
QuestionExplicit rule-based approachMachine-learning approach
Where does behaviour come from?Developers encode the decision logic.An algorithm estimates model parameters from data under a chosen objective and model assumptions.
When is it attractive?Rules are known, stable, auditable, or legally prescribed.The mapping is too complex to specify fully, but informative data and a measurable objective exist.
How does it change?Developers revise rules and release new software.A controlled training or update pipeline uses new data and releases a validated model. It does not improve automatically.
Main failure risksMissing cases, conflicting rules, and maintenance burden.Unrepresentative data, leakage, spurious correlations, drift, metric mismatch, and opaque failure modes.
ExampleReject an email attachment whose file type is prohibited by policy.Estimate the probability that an email is spam from many interacting signals.

Real systems are commonly hybrid. Explicit logic can enforce safety and policy, while an ML component handles uncertain prediction. ML is not inherently more scalable or more appropriate for every task; its benefit must be demonstrated against a simple baseline and weighed against data, compute, maintenance, fairness, privacy, and explainability costs.

Main learning settings

The categories below describe the kind of learning signal and task. They are useful, but practical systems may combine them.

Supervised learning

Supervised learning uses examples containing both input features and target values. A dataset can be written as

$$\mathcal{D}=\{(\mathbf{x}_i,y_i)\}_{i=1}^{n},$$

where $\mathbf{x}_i\in\mathbb{R}^{d}$ is a $d$-dimensional feature vector, $y_i$ is its target, and $n$ is the number of examples. A model $f_{\boldsymbol{\theta}}$ with parameters $\boldsymbol{\theta}$ is fitted so that $f_{\boldsymbol{\theta}}(\mathbf{x})$ predicts $y$ for unseen inputs. A common abstract training objective is empirical risk minimization:

$$\hat{\boldsymbol{\theta}} =\arg\min_{\boldsymbol{\theta}} \frac{1}{n}\sum_{i=1}^{n} L\!\left(f_{\boldsymbol{\theta}}(\mathbf{x}_i),y_i\right),$$

where $L$ is a loss function measuring prediction error. Minimizing training loss alone does not guarantee generalization [8]. Model selection and final evaluation therefore need data not used to fit the candidate being assessed, such as cross-validation plus a held-out test set or separate validation and test sets.

Two central supervised tasks are:

  • Classification: predict a discrete category, such as spam versus non-spam, cat versus dog, or whether a student is placed. Binary, multiclass, and multilabel variants require different output and evaluation choices.
  • Regression: predict a numerical quantity, such as house price, temperature, or a test score. A numeric label does not by itself settle the task design; the target's meaning, range, noise, and error costs matter.

The word supervised refers to target information, not necessarily to a person watching each training step. Labels may come from human annotation, measurements, existing records, or delayed outcomes, and each source can introduce noise or bias.

Unsupervised learning

Unsupervised learning receives inputs $\{\mathbf{x}_i\}_{i=1}^{n}$ without a task-specific target $y_i$ and seeks useful structure. Examples include:

  • clustering, which groups examples according to a chosen representation and similarity notion;
  • dimensionality reduction, which constructs a lower-dimensional representation while preserving selected information;
  • density or representation estimation, which models regularities in the input distribution; and
  • some forms of anomaly detection, where unusual examples are identified relative to learned normal structure.

Customer segmentation and exploratory structure discovery fit naturally here. Market-basket analysis can also be treated as unsupervised association-rule discovery. However, anomaly detection is not exclusively unsupervised: it can be supervised when reliable anomaly labels exist.

There is no ground-truth label that automatically declares a discovered cluster “correct.” Results depend on representation, distance or probabilistic assumptions, hyperparameters, and the downstream purpose. Domain evaluation is therefore essential. The supplied summary claims that unsupervised learning accounts for roughly 80% of industry tasks, but provides no evidence or scope for that figure [1]. It is not treated here as an established prevalence statistic.

Semi-supervised learning

Semi-supervised learning combines a relatively small labelled set with a larger unlabelled set. It is attractive when raw examples are plentiful but expert labels are expensive. The unlabelled data help only under assumptions connecting input structure to the target - for example, that nearby examples tend to share a label. If those assumptions fail, confidently inferred pseudo-labels can reinforce errors.

A photo application in which users label a few faces and the system uses a larger unlabelled collection is an intuitive example, though an actual product may combine supervised, semi-supervised, and interactive components.

Reinforcement learning

Reinforcement learning (RL) concerns sequential decisions. An agent observes an environment, chooses an action according to a policy, and receives a reward while the environment changes state. The objective is not simply to maximize the next reward, but typically to maximize expected cumulative return. One discounted return is

$$G_t=\sum_{k=0}^{\infty}\gamma^k R_{t+k+1}, \qquad 0\leq\gamma<1,$$

where $R_{t+k+1}$ is a future reward and $\gamma$ discounts rewards farther into the future [7, sec. 3.1]. The agent must often balance exploration of uncertain actions against exploitation of actions currently believed to be good.

Game playing, robotics, and some control problems can be formulated this way. Autonomous driving may contain RL components, but describing the whole system as RL would ignore perception, planning, simulation, safety engineering, and explicit control. Likewise, a negative reward is commonly called a penalty, but designing a safe and faithful reward signal is a substantive problem.

Online learning is an update regime

Online learning updates a model sequentially or in small batches as new data arrive. Offline (static) training fits a model periodically from a stored dataset. This distinction cuts across the task categories above: an online algorithm can perform supervised regression, classification, clustering, or a component of RL. It is therefore misleading to present online learning as a mutually exclusive peer of supervised and unsupervised learning.

Online updates are useful when data arrive as a stream, the distribution changes quickly, or full retraining is expensive. Advertising and dynamic pricing are possible contexts, but frequent updates bring risks: corrupt inputs can rapidly damage the model, delayed labels complicate evaluation, and feedback from prior predictions can alter future training data. Production systems need monitoring, versioning, validation gates, rollback, and a clear update cadence. Even an offline model must be monitored for stale data and degraded performance [6].

From problem statement to a maintained ML system

Training an algorithm is only one part of a production ML system [6]. A sound lifecycle is iterative rather than a one-way checklist.

1. Frame the decision and success criteria

Identify the user or operational decision, available actions, prediction horizon, constraints, and cost of errors. Express $T$, $E$, and $P$, but also define a non-ML or simple-model baseline. A statistically good metric is useful only if it supports the real objective and satisfies latency, reliability, privacy, fairness, interpretability, and resource constraints.

2. Collect and understand data

Data may come from databases, sensors, application logs, APIs, surveys, or careful annotation. Record provenance, units, sampling process, consent and access constraints, missingness, label definition, and the time at which each feature becomes available. Exploratory data analysis (EDA) should investigate distributions, outliers, duplicates, imbalance, correlations, and plausible sources of bias - not merely generate plots.

3. Design the split before fitting transformations

Separate data into:

  • a training set for estimating model and preprocessing parameters;
  • a validation set, or cross-validation procedure, for selecting features, models, thresholds, and hyperparameters; and
  • a test set used for a final, comparatively unbiased estimate after design choices are fixed.

There is no universal percentage split. Dataset size, class balance, dependence structure, and evaluation precision determine suitable sizes. Random splitting is inappropriate when it leaks future information into the past or places closely related entities in different sets. Time-ordered applications may need chronological splits; medical or user data may need group-wise splitting so the same patient or user cannot appear on both sides.

Preprocessing parameters - means used for scaling, imputation values, selected features, vocabularies, and similar quantities - must be learned on training data only and then applied consistently to validation, test, and serving inputs. Using test information during fitting produces data leakage and an over-optimistic estimate [4]. Repeatedly choosing designs based on test results also turns the test set into an implicit validation set [5].

4. Prepare features and establish baselines

Clean data according to documented rules and convert raw observations into features available at prediction time. Scaling or normalization is useful for some algorithms but not universally required. Feature engineering incorporates domain knowledge; it should be reproducible and identical between training and serving. Compare against a meaningful baseline, such as the majority class, a historical average, a simple linear model, or an existing rule-based system.

5. Train, validate, and select

Choose a learning setting and model family consistent with the task, data volume, latency, interpretability, and error costs. Fit on training data, evaluate alternatives on validation data, and inspect not only aggregate metrics but also relevant data slices and error cases. Cross-validation can reduce dependence on one validation split when its assumptions fit the data. After choices are finalized, evaluate once on the held-out test set and report the protocol alongside the result.

6. Deploy the complete inference pipeline

Deployment includes the same feature transformations used during development, the model artifact, input validation, prediction logic, version metadata, and interfaces to the surrounding application. A web framework can expose a model, but selecting Flask, Django, Streamlit, an embedded target, or another platform does not by itself solve reliability, security, scale, or reproducibility. Release strategies should permit testing and rollback.

7. Monitor system and model behaviour

Monitor data schemas, missingness and distributions, training-serving skew, latency, throughput, failures, resource use, model age, prediction distributions, and - when trustworthy labels become available - performance metrics. Aggregate performance can hide serious failures on important subgroups, so relevant slices should also be checked. Production monitoring must cover both sudden incidents and gradual degradation [6].

8. Close the feedback loop carefully

Collect outcomes, corrections, user feedback, and operational impact. Check whether labels are delayed, selectively observed, or influenced by the model's own decisions. For example, a spam filter trained only from messages users can see may receive less feedback about messages it already blocked. Such loops can distort future experience $E$.

New data should trigger investigation or a controlled update policy - not blind retraining. Validate a candidate against current baselines and safety requirements, retain data/code/model lineage, deploy gradually where appropriate, and support rollback. Revisit problem framing when the real-world objective changes.

The “art” and “science” of ML

The supplied overview contrasts an automatable “science” of fitting and deployment with a human-centred “art” of problem framing, cleaning, EDA, and feature engineering [1]. This is a useful heuristic only if treated carefully - not as a strict binary.

ML relies on scientific and engineering discipline throughout: explicit hypotheses, controlled evaluation, reproducible pipelines, statistical reasoning, software testing, and monitoring. It also requires judgement throughout: deciding what to predict, recognizing misleading data, choosing representations, interpreting errors, and negotiating domain trade-offs. Training is not always routine, and data preparation is not merely subjective craft. Automation can assist both sides, but it cannot remove responsibility for the objective, evidence, or consequences.

Libraries such as scikit-learn and TensorFlow reduce implementation effort; they do not decide whether a target is legitimate, whether a split leaks information, or whether a metric represents useful and fair behaviour. Durable skill therefore combines theoretical understanding, empirical discipline, domain knowledge, and production engineering.

References

  1. Intro to ML, privately supplied, uncommitted secondary course-overview summary, filename intro-to-ML.txt; accessed 2026-11-18. Its authorship and preparation method are unknown. The original video, recording date, slides, and first-party administrative materials were unavailable.
  2. Tom M. Mitchell, Machine Learning, McGraw-Hill, 1997, Chapter 1, 414 pages, ISBN 0-07-042807-7. Author's official book page (accessed 2026-11-18).
  3. Christopher M. Bishop, Pattern Recognition and Machine Learning, Springer, 2006, ISBN 978-0-387-31073-2. Author's Microsoft Research book page (accessed 2026-11-18). Consulted to verify the bibliographic details of the reference text reported in the course summary.
  4. scikit-learn developers, “Common pitfalls and recommended practices,” especially “Data leakage,” scikit-learn User Guide. Official documentation (accessed 2026-11-18).
  5. Google, “Datasets: Dividing the original dataset,” Machine Learning Crash Course. Official course documentation (accessed 2026-11-18).
  6. Google, “Production ML systems,” including “Static versus dynamic training” and “Monitoring pipelines,” Machine Learning Crash Course. Module overview, training regimes, and monitoring (accessed 2026-11-18).
  7. Richard S. Sutton and Andrew G. Barto, Reinforcement Learning: An Introduction, 2nd ed., MIT Press, 2018, Section 3.1. Official book page (accessed 2026-11-18).
  8. Google, “Machine Learning Glossary,” entries for “mean absolute error” and “empirical risk minimization,” official glossary (accessed 2026-11-18).