mini-module no-code try-without-ai regression ml-fundamentals ~20 min

Global vs Local Models Globale vs lokale Modelle

One equation for everything, or a different rule for every neighbourhood. The split that runs through all of machine learning. Eine Gleichung für alles, oder eine eigene Regel für jede Nachbarschaft. Diese Unterscheidung zieht sich durch das gesamte maschinelle Lernen.

Two parks. Two philosophies. Zwei Parks. Zwei Philosophien.

Somewhere in Moscow, the physicist Igor Kurchatov looked out at the grounds of his research institute and noticed that people were ignoring the paved paths. They cut across grass, wore tracks through gardens, found their own way. So he did something unusual: he waited. He let the paths form first, the ones people actually wanted, and only then paved them.

Irgendwo in Moskau blickte der Physiker Igor Kurtschatow auf das Gelände seines Forschungsinstituts. Er bemerkte, dass die Menschen die gepflasterten Wege ignorierten. Sie schnitten quer über den Rasen, trampelten Pfade durch Gärten und fanden ihren eigenen Weg. Also tat er etwas Ungewöhnliches: Er wartete. Er ließ die Pfade erst entstehen, also die, die die Menschen wirklich wollten. Und erst danach pflasterte er sie.

Sanssouci, a few hours west, was designed differently. Frederick the Great gave his gardeners a plan. Symmetry first. The paths exist where the geometry demands them, regardless of whether anyone's feet agreed.

Sanssouci, einige Stunden westlich, wurde anders entworfen. Friedrich der Große gab seinen Gärtnern einen Plan. Zuerst die Symmetrie. Die Wege liegen dort, wo die Geometrie es verlangt. Ob irgendwelche Füße dem zugestimmt haben, spielt keine Rolle.

Kurchatov Institute, Moscow, paths shaped by use
Local modelLokales Modell Kurchatov Institute, Moscow. The paths emerged from the data, from actual human behaviour. No equation was imposed in advance. Kurtschatow-Institut, Moskau. Die Wege entstanden aus den Daten, also aus echtem menschlichem Verhalten. Keine Gleichung wurde vorher auferlegt.
Schloss Sanssouci, Potsdam, geometric planned paths
Global modelGlobales Modell Schloss Sanssouci, Potsdam. The paths follow a single geometric plan. One rule governs the whole space, top-down, before anyone walked a step. Schloss Sanssouci, Potsdam. Die Wege folgen einem einzigen geometrischen Plan. Eine Regel beherrscht den gesamten Raum. Sie stand fest, bevor jemand einen Schritt gegangen ist.

This is not a metaphor for which approach is better. Both parks are beautiful. Both serve their purpose. The question is what that purpose is, and what you lose when you choose one over the other.

Das ist keine Metapher dafür, welcher Ansatz besser ist. Beide Parks sind schön. Beide erfüllen ihren Zweck. Die Frage ist, was dieser Zweck ist. Und was du verlierst, wenn du dich für eine Seite entscheidest.

The split Die Unterscheidung

Every model you build makes an implicit claim about the world: is the same rule true everywhere, or does the rule itself depend on where you are? This is the global vs local distinction. It is not about accuracy. It is about the shape of your assumptions.

Jedes Modell, das du baust, behauptet etwas über die Welt: Gilt dieselbe Regel überall, oder hängt die Regel davon ab, wo du gerade bist? Das ist der Unterschied zwischen global und lokal. Es geht dabei nicht um die Trefferquote. Es geht um die Form deiner Annahmen.

Global modelGlobales Modell

One function fits the entire dataset. The same equation applies whether you are at the edge or the centre, in a dense cluster or an empty region. Linear regression is the archetype: one line for all the points.

Eine Funktion passt auf den gesamten Datensatz. Dieselbe Gleichung gilt am Rand wie in der Mitte, im dichten Cluster wie im leeren Bereich. Die lineare Regression ist das Urbeispiel: eine Gerade für alle Punkte.

The assumption is that the world has a single underlying logic. You are trying to find it.

Die Annahme dahinter: Die Welt hat eine einzige zugrundeliegende Logik. Du versuchst, sie zu finden.

Local modelLokales Modell

Different rules for different regions. The model adapts to local structure rather than imposing a single form. K-NN is the archetype: your classification depends entirely on who your neighbours are right here, not on a global fit.

Verschiedene Regeln für verschiedene Regionen. Das Modell passt sich der lokalen Struktur an, statt eine einzige Form aufzuzwingen. K-NN ist das Urbeispiel: Deine Klassifizierung hängt allein davon ab, wer genau hier deine Nachbarn sind.

The assumption is that the world is patchwork. You are trying to map it.

Die Annahme dahinter: Die Welt ist ein Flickenteppich. Du versuchst, ihn zu kartieren.

Same data, two models Dieselben Daten, zwei Modelle

Place some points by clicking on the canvas. Each point has an x value (horizontal position) and a y value (vertical position), think of x as an input and y as the thing you are trying to predict. Then switch between a global fit (linear regression, one straight line for all the data) and a local fit (K-NN regression, each prediction is the average of K nearby points). Same data, very different curves.

Klick auf die Leinwand, um Punkte zu setzen. Jeder Punkt hat einen x-Wert (horizontale Position) und einen y-Wert (vertikale Position). Dabei ist x die Eingabe, und y ist das, was du vorhersagen willst. Wechsle dann zwischen zwei Anpassungen. Global heißt lineare Regression, also eine Gerade für alle Daten. Lokal heißt K-NN-Regression, also der Durchschnitt der K nächsten Punkte. Dieselben Daten, sehr verschiedene Kurven.

Interactive demo, click to add points Interaktive Demo: klicken zum Hinzufügen
5 (affects K-NN only)(nur K-NN)

What you give up Was du aufgibst

Neither approach is free. Every choice along the global–local axis carries a cost on the other side.

Keiner der Ansätze ist kostenlos. Jede Wahl auf der Achse zwischen global und lokal hat einen Preis auf der anderen Seite.

Global: interpretabilityGlobal: Interpretierbarkeit A global model has one set of parameters you can read and explain. "For every extra year of experience, salary increases by €3,400." That sentence is the model. You can audit it, challenge it, put it in a report. A local model has no such sentence. Ein globales Modell hat einen Satz von Gewichten, den du lesen und erklären kannst. „Für jedes weitere Jahr Erfahrung steigt das Gehalt um 3.400 €.“ Dieser Satz ist das Modell. Du kannst ihn prüfen, bestreiten oder in einen Bericht schreiben. Ein lokales Modell hat keinen solchen Satz.
Local: flexibilityLokal: Flexibilität A local model can follow data into any shape. A crescent, a spiral, a cluster with a hole in the middle, no problem. A linear model cannot do any of those. It will draw the best straight line it can and stop there. Ein lokales Modell folgt den Daten in jede Form. Eine Mondsichel, eine Spirale, ein Cluster mit einem Loch in der Mitte: kein Problem. Ein lineares Modell kann das nicht. Es zieht die beste Gerade, die es hinbekommt, und hört dort auf.
Global: generalisation from little dataGlobal: Generalisierung aus wenig Daten A global model can make reasonable predictions far from the training data, because it assumes the same rule holds everywhere. A local model in a sparse region has no neighbours to consult. It doesn't know what to do. Ein globales Modell macht auch weit weg von den Trainingsdaten vernünftige Vorhersagen. Es nimmt ja an, dass dieselbe Regel überall gilt. Ein lokales Modell hat in einer dünn besetzten Region keine Nachbarn. Es weiß dann nicht, was es tun soll.
Local: no bad global assumptionsLokal: keine schlechten globalen Annahmen A global model that assumes linearity is wrong everywhere if the real relationship is curved. A local model makes no such assumption. It can be wrong locally, but those errors don't propagate globally. Each region fails on its own terms. Ein globales Modell nimmt Linearität an. Ist die echte Beziehung gekrümmt, liegt es überall daneben. Ein lokales Modell macht diese Annahme nicht. Es kann lokal falsch liegen, aber der Fehler pflanzt sich nicht über die ganze Fläche fort.

When each wins Wann jedes gewinnt

GlobalGlobal LocalLokal
Data sizeDatengröße
Works with little data, the global assumption fills the gaps.Funktioniert mit wenig Daten. Die globale Annahme füllt die Lücken.
Needs enough data to have meaningful local neighbourhoods.Braucht genug Daten, damit lokale Nachbarschaften überhaupt etwas bedeuten.
Boundary shapeGrenzform
Simple, smooth. Good when the true boundary is actually simple.Einfach und glatt. Gut, wenn die echte Grenze auch einfach ist.
Arbitrary complexity. Follows the data wherever it goes.Beliebig komplex. Folgt den Daten, wohin sie auch gehen.
ExplanationErklärung
One set of coefficients you can show to a stakeholder.Ein Satz von Gewichten, den du jemandem zeigen kannst.
"It depends on the neighbourhood", hard to summarise.„Es hängt von der Nachbarschaft ab.“ Schwer zusammenzufassen.
ExtrapolationExtrapolation
Predicts in new regions by extending the global rule.Sagt auch in neuen Regionen vorher, indem es die globale Regel verlängert.
Struggles or fails where no training points exist nearby.Hat Mühe oder versagt, wo in der Nähe keine Trainingsdaten liegen.
OverfittingÜberanpassung
Underfits if the real relationship is complex.Unteranpassung, wenn die echte Beziehung komplex ist.
Overfits if K is too small, memorises noise as structure.Überanpassung, wenn K zu klein ist. Dann lernt es Rauschen als Struktur.

The real question Die eigentliche Frage

Before you choose a model, ask: do I believe the world has one rule here, or many? If you believe in one rule, a global model is not a compromise, it is the honest choice. If you believe the world is patchy and local, imposing a global form is the dishonest one. Most real problems live somewhere in between. That is why ensemble methods exist, and why that is a different module.

Bevor du ein Modell wählst, frag dich: Hat die Welt hier eine Regel oder viele? Glaubst du an eine Regel, dann ist ein globales Modell kein Kompromiss. Es ist die ehrliche Wahl. Hältst du die Welt für fleckig und lokal, dann ist ein globales Modell die unehrliche Wahl. Die meisten echten Probleme liegen dazwischen. Genau dafür gibt es Ensemble-Methoden, und die sind ein anderes Modul.