<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sharonbayela on Medium]]></title>
        <description><![CDATA[Stories by Sharonbayela on Medium]]></description>
        <link>https://medium.com/@sharonbayela1803?source=rss-cf77c6c1c639------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*t5DkDFefuGVI_6Q2</url>
            <title>Stories by Sharonbayela on Medium</title>
            <link>https://medium.com/@sharonbayela1803?source=rss-cf77c6c1c639------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 07:03:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sharonbayela1803/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Forecasting Atmospheric CO2 with Gaussian Process Kernel Engineering.]]></title>
            <link>https://medium.com/@sharonbayela1803/forecasting-atmospheric-co2-with-gaussian-process-kernel-engineering-47ea377bd04a?source=rss-cf77c6c1c639------2</link>
            <guid isPermaLink="false">https://medium.com/p/47ea377bd04a</guid>
            <category><![CDATA[co2]]></category>
            <category><![CDATA[forecasting]]></category>
            <category><![CDATA[gaussian-process]]></category>
            <category><![CDATA[kernel-engineering]]></category>
            <dc:creator><![CDATA[Sharonbayela]]></dc:creator>
            <pubDate>Tue, 08 Sep 2026 18:32:25 GMT</pubDate>
            <atom:updated>2026-09-08T19:03:04.069Z</atom:updated>
            <content:encoded><![CDATA[<p>Atmospheric CO2 concentration is one of the most consequential time series we track. It underpins climate policy, informs emissions targets, and gives us a direct signal of how human activity is reshaping the atmosphere. It’s also a genuinely interesting machine learning problem in its own right. The Mauna Loa CO2 record contains a steady multi-decade rise, a strong repeating seasonal cycle tied to plant growth, and smaller irregular fluctuations and noise layered on top. Rather than fitting one smooth curve through all of that, a Gaussian Process lets us build a model that explicitly separates these effects, so we can both forecast future CO2 levels and understand what is actually driving the signal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TC8I1lZRFxftY7D78QIJCQ.png" /></figure><p>To choose the right model, it helps to look at what the data is actually made of. The long-term trend is smooth with no repeating structure, just a gradual multi-decade climb. That calls for an RBF kernel with a large length scale, which assumes nearby points in time are strongly correlated and lets that correlation fade slowly over decades. A periodic kernel would be the wrong tool here since it would incorrectly force the trend to repeat.</p><p>The seasonal cycle genuinely repeats once a year, driven by the growing season. An ExpSineSquared kernel is built for exactly that, forcing a periodic pattern. But an exactly periodic kernel is too rigid, since real seasonal cycles shift subtly over time. Multiplying it by an RBF kernel lets the shape of the yearly cycle drift slowly instead of repeating identically forever.</p><p>The leftover irregularities, medium-term wobbles like short climate anomalies, are not a single smooth speed. A Rational Quadratic kernel behaves like a blend of RBF kernels at different length scales, so it can flexibly capture variation that is not uniform. Finally, the remaining noise splits into a short-scale RBF for correlated, short-lived effects, and a WhiteKernel for pure, unstructured measurement error.</p><p>The RBF kernel is defined as <em>k(x, x’) = σ² exp(−(x−x’)² / 2l²)</em>, where l is the length scale and <em>σ²</em> is the amplitude. This value is the covariance the Gaussian Process assumes between two points in time, and <em>l </em>controls how far apart two points can be while still being treated as related. When <em>l</em> is large, the exponent stays close to zero even across decades, so covariance barely shrinks no matter how far apart the points are. That is what forces the function to move slowly and smoothly. When <em>l</em> is small, the exponent shrinks quickly as distance grows, so only points very close in time stay correlated, letting the function move quickly and capture fine, localized wiggle instead of a smooth trend.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xevOmDmwVAQ4lr-KFXboUQ.png" /></figure><p>Before fitting the model, we subtract the mean from the CO2 values so the data is centered around zero, matching the Gaussian Process’s zero-mean assumption while keeping the units in real ppm rather than rescaling them into abstract units. Once fitted, we extrapolate forward using synthetic time points running from the earliest date in the data to ten years beyond today, then add the mean back. The plot above shows the model’s predictions matching the historical measurements closely, and the forecast continuing the same trend and seasonal wiggle out to 2036, with the uncertainty band widening the further out the prediction goes.</p><p>The fitted kernel tells us what is actually driving the data. The long-term trend has an amplitude of about 45 ppm and a length scale of roughly 52 years. The seasonal component has an amplitude of about 2.6 ppm with a length scale near 90 years, meaning the yearly cycle shifts only gradually over time. A smaller Rational Quadratic term picks up medium-term irregularities, and the noise level is small, about 0.03 ppm, telling us the model is not relying on randomness. Most of the signal here really is explained by a rising trend and a predictable yearly cycle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Paa3h0C5xbVMEr2ffN3zSw.png" /></figure><p>Data quality at Mauna Loa improved significantly after 1968, stabilizing at 20 to 35 reliable measurement days per month. Because the Gaussian Process treats all data as equally trustworthy, fitting it on the sparse, noisy early records would distort long-term trends and seasonal decomposition. A limitation worth noting is that, if the periodicity bound on the seasonal kernel is loosened instead of fixed at one year, the optimizer can drift the period away from a true year while chasing a better statistical fit, which would distort the seasonal shape in future predictions. Similarly, if there were a multi-year gap in the data, the model would have no nearby points to anchor its guess, so predictions inside that gap would rely almost entirely on the kernel’s assumptions rather than actual evidence, and the uncertainty band would grow much wider through that stretch.</p><p>Building a composite kernel by adding the four kernels stated above together lets the model treat the data as the sum of independent effects, while multiplying a periodic kernel by an RBF kernel lets one assumption modulate another, is really just translating an understanding of a signal’s structure directly into the model’s math, which is also why the fitted hyper-parameters come out interpretable rather than abstract.</p><p><a href="https://scikit-learn.org/stable/auto_examples/gaussian_process/plot_gpr_co2.html#id2">Forecasting of CO2 level on Mona Loa dataset using Gaussian process regression (GPR)</a></p><p><a href="https://www.google.com/url?q=http%3A%2F%2Fwww.gaussianprocess.org%2Fgpml%2Fchapters%2FRW.pdf">Rasmussen, Carl Edward. “Gaussian processes in machine learning.” Summer school on machine learning. Springer, Berlin, Heidelberg, 2003</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47ea377bd04a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>