The Geometry of Time-Series: Scientific Machine Learning (Part 2)
The Science-of-Counting and Scientific Machine Learning
The Geometry of Time-Series: Scientific Machine Learning (Part 2)
The Science-of-Counting and Scientific Machine Learning
In practice, time‑series rarely behave like closed mechanical systems, or, as equilibrium statistical ensembles. Instead, they routinely exhibit sustained energy flux — energy entering or leaving the system over long durations — indicating that the dynamics are fundamentally open and non‑statistical. Part 2 extends the Lagrangian that defines statistics and machine learning to the more general science-of-counting. Scientific Machine Learning (SML) is then built on the science-of-counting. SML learns from any time-series and returns a complete set of (thermodynamic) measurements that define the state of the system.
What Is the Science‑of‑Counting Lagrangian?
In physics, a Lagrangian encodes the essential structure of a system. It tells you:
- What the system is
- What it values
- How it evolves
SML uses the same idea — but instead of describing particles or fields, the Lagrangian describes countable units. This is the original approach taken in the 19th century that gave us thermodynamics, electronics and physical chemistry (pre-field theory). Just because a theory is old, of course, doesn’t mean that it is wrong, or even stale.
What is Measurement?
One of the first things learned in High School science classes is that a measurement always has units. No units or wrong units, then the measurement or answer is wrong! There must always be a unit of measurement, and any measurement is always a multiple of the unit of measurement, in other words, is countable.
Measurement example. You want to measure the volume of a sandpile. You have as many identical coffee cans as you need; you begin to fill coffee cans with sand from the pile. Once a can is filled, you scrape off the excess sand from the top back into the pile, to make exactly one coffee can, with no sand lost. When done, you have an exact number of coffee cans of sand with known volume, and that is the answer. There is, most likely, still some sand that remains on the ground, necessarily smaller than the volume of a coffee can. It is unmeasurable in units of coffee cans, but not unknowable in the right units. If somewhat less than a coffee can of residual sand is too much to bear, then the option is to adopt a smaller unit of measure, for example, soup cans. The residual “error” is not cumulative.
All time-series, consisting of time-stamps and values, can be seen to be countable up to an appropriate decimal place — that need not be the smallest unit. Physically truncating the time-series to the correct decimal place is unnecessary, however. But an awareness of the units remains. Counting measurements in multiples of a unit is the meaning behind the science-of-counting.
What is a Scientific Reasoning Robot?
Humans have asked for a Scientific Reasoning Robot for many, many years (Babbage and Lovelace, 1820s). E.T. Jaynes produced probably the best requirements document and blueprints for a scientific reasoning “robot” in his book Probability Theory: The Logic of Science (Cambridge UP, 2003).
From Jaynes’ blueprints, a scientific reasoning web service is built to processes time-series and generate rigorous scientific intelligence about the system that generated the time-series.
We begin with the science-of-counting. A time series counts units, n, and the rate of change, ṅ, at each timestamp. The Lagrangian for the science-of-counting is a function of n and ṅ, given by:

The expected values for n and ṅ are denoted by <n> and <ṅ>, respectively. The Lagrange multipliers λ and σ enforce the counting constraints, and signal self-interaction. A vector of probabilities in a distribution, is given by p, so that each state i in p has probability p_i, and the probabilities add up to one, Σ p_i = 1. The information entropy is then given by H = — p.ln p.
The science-of-counting reduces to statistics and conventional machine learning when <ṅ> = 0, that is, when energy is forbidden to enter or exit the time-series.
The key point that changes everything is this: the science-of-counting is analytically solvable. Exactly, completely and uniquely. Concretely, this means that scientific measurements, like energy and momentum, have an exact and unique expression as functions. A measurement function can then be simply evaluated using the time-series. The ingestion of time-series data transforms the science-of-counting into Scientific Machine Learning (SML).
Scientific Machine Learning: Example
SML time-series ingestion determines the discrete probability distribution (red, below), p(λ,E), for a time-series of equity closing prices (GE, see insert). The discrete nature of the probability distribution (PD) is due to counting in units. The x-axis counts the number of demand units away from the mean (running average). Each unit away from the mean has its corresponding exact probability. The sum of the probabilities adds to one, analytically. The product of the unit and its associated probability is the demand distribution (blue). The plot is double-sided: probability (right), and the expected demand (left).

Discrete Demand Distribution and Probability Distribution for an equity (GE), based on closing prices. Expected Demand (<η>, blue) and Expected Supply (<ξ>, not shown), are the natural coordinates in Scientific Machine Learning when energy is entering or exiting the system.
Why This Matters for Machine Learning
Traditional ML tries to fit a model to data that has been sampled. SML derives the state of the system from the time-series.
Sampling assumes the world is stable. Counting assumes the world is dynamic.
Decisions in traditional ML are based on pattern-recognition. Decisions in SML use scientific measurements of time-series to answer business questions.
SML doesn’t ask, “What distribution generated this data?” It asks, “What geometry and energy flow must exist for this data to occur?”
Sampling gives you a forecast. Counting gives you a solvable non-equilibrium system that can be controlled if the energy entering or exiting the system can be controlled.
The difference is stark. A benefit analysis of conventional and scientific machine learning is summarized in the table below.

Benefit analysis of conventional and scientific machine learning.
Who is Gibbs?
This story is not heard often. Albert Einstein was asked a couple of years before he died in 1955, “Who is the smartest person you ever met?” Einstein replied, “I would put Willard Gibbs at the top of the list, but I never met him.” This is understandable because Gibbs died in 1903, when Einstein was still a patent clerk. What can be said about the person Einstein held in such esteem, and probably influenced Einstein to become a physicist? We have tried to give the flavor of Gibbs’ thought and insight in this Part, which underlies everything presented here.
What’s Next?!
The probability distribution, p(λ,E), that is the solution to the Lagrangian in this Part (Part 2) is also an exact solution to a completely different geometric problem in Part 3, a short exact sequence that defines the geometric structure! The exact sequence will be shown to detail the geometry of time-series, and what we can generally learn and say about time-series.
**Part 1 — The Misbehavior of Time-Series & Scientific Machine Learning**
Part 2 — The Science‑of‑Counting Lagrangian: A New Foundation for Machine Learning
**Part 3 — The Geometry of Time‑Series: Connections, Curvature and Control**
A visual, intuitive explanation of the SML geometric structure. Optimal solutions re-enforce and validate our intuition.
Part 4 — Thermodynamics of Data: Decision and Control
The thermodynamics of SML provides the means to control the system.
Part 5 — Cash‑Flow Science: A Scientific Approach to Buffer Optimization
A deep dive into the financial application, with diagrams and examples.
Part 6 — Beyond Finance: Business Operations
How SML applies to any open, energy‑exchanging system.
Part 7 — The Future of Decision Systems: Decision Machine
A vision piece tying the series together.
메타데이터
- post_id
- cbb2a92e69f0
- slug
- the-geometry-of-time-series-a-new-foundation-for-machine-learning-part-2-cbb2a92e69f0
- url
- https://medium.com/@mtempler_9952/the-geometry-of-time-series-a-new-foundation-for-machine-learning-part-2-cbb2a92e69f0
- canonical_url
- https://medium.com/@mtempler_9952/the-geometry-of-time-series-a-new-foundation-for-machine-learning-part-2-cbb2a92e69f0
- author_url
- https://medium.com/@mtempler_9952
- status
- ok
- fetched_at
- 2026-08-27 08:23:07