<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Online-Machine-Learning on Max Halford</title><link>https://maxhalford.github.io/tags/online-machine-learning/</link><description>Recent content in Online-Machine-Learning on Max Halford</description><generator>Hugo</generator><language>en-US</language><managingEditor>maxhalford25@gmail.com (Max Halford)</managingEditor><webMaster>maxhalford25@gmail.com (Max Halford)</webMaster><lastBuildDate>Tue, 21 Jul 2026 21:18:41 +0200</lastBuildDate><atom:link href="https://maxhalford.github.io/tags/online-machine-learning/index.xml" rel="self" type="application/rss+xml"/><item><title>What's next for River (and myself)</title><link>https://maxhalford.github.io/blog/whats-next-for-river/</link><pubDate>Mon, 20 Jul 2026 00:00:00 +0000</pubDate><author>maxhalford25@gmail.com (Max Halford)</author><guid>https://maxhalford.github.io/blog/whats-next-for-river/</guid><description>&lt;h2 id="the-last-few-years"&gt;The last few years&lt;/h2&gt;
&lt;p&gt;Although my PhD had nothing to do with online machine learning, that&amp;rsquo;s when I started to take an interest in it. I made a Python package called &lt;a href="https://github.com/MaxHalford/creme"&gt;creme&lt;/a&gt; in 2019. We joined forces with &lt;a href="https://scikit-multiflow.github.io/"&gt;scikit-multiflow&lt;/a&gt; in 2020 and agreed on the name &lt;a href="https://github.com/online-ml/river"&gt;River&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For some reason, I had this romantic vision of people working together in roughly equal proportions. However, I feel I did most of the core maintenance and decision-making, with others contributing in their areas of expertise and interest:&lt;/p&gt;</description></item><item><title>Online machine learning on the road @ IDE+A, TH Köln</title><link>https://maxhalford.github.io/blog/online-machine-learning-on-the-road/</link><pubDate>Thu, 26 Oct 2023 00:00:00 +0000</pubDate><author>maxhalford25@gmail.com (Max Halford)</author><guid>https://maxhalford.github.io/blog/online-machine-learning-on-the-road/</guid><description/></item><item><title>Online gradient descent written in SQL</title><link>https://maxhalford.github.io/blog/ogd-in-sql/</link><pubDate>Tue, 07 Mar 2023 00:00:00 +0000</pubDate><author>maxhalford25@gmail.com (Max Halford)</author><guid>https://maxhalford.github.io/blog/ogd-in-sql/</guid><description>&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt; &amp;ndash; &lt;em&gt;this post &lt;a href="https://news.ycombinator.com/item?id=35054786"&gt;generated&lt;/a&gt; a few insightful comments on Hacker News. I&amp;rsquo;ve also put the code in a &lt;a href="https://gist.github.com/MaxHalford/823c4e7f9216607dc853724ec74ec692"&gt;notebook&lt;/a&gt; for ease of use.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Modern MLOps is complex because it involves too many components. You need a message bus, a stream processing engine, an API, a model store, a feature store, a monitoring service, etc. Sadly, containerisation software and the unbundling trend have encouraged an appetite for complexity. I believe MLOps shouldn&amp;rsquo;t be this complex. For instance, MLOps can be made simpler by &lt;a href="https://www.ethanrosenthal.com/2022/05/10/database-bundling/"&gt;bundling the logic into your database&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Online active learning in 80 lines of Python</title><link>https://maxhalford.github.io/blog/online-active-learning-river-databutton/</link><pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate><author>maxhalford25@gmail.com (Max Halford)</author><guid>https://maxhalford.github.io/blog/online-active-learning-river-databutton/</guid><description>&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Active_learning_(machine_learning)"&gt;Active learning&lt;/a&gt; is a way to get humans to label data efficiently. A good active learning strategy minimizes the number of necessary labels, while maximizing a model&amp;rsquo;s performance. This usually works by focusing on samples where the model is unsure of its prediction.&lt;/p&gt;
&lt;p&gt;In a batch setting, the model is periodically retrained to learn from the freshly labeled samples. However, the training time is usually too prohibitive for this to happen each time a new label is provided. This isn&amp;rsquo;t the case with online models, because they are able to learn one sample at a time. Active and online learning naturally fit together.&lt;/p&gt;</description></item><item><title>The future of River</title><link>https://maxhalford.github.io/blog/future-of-river/</link><pubDate>Tue, 13 Dec 2022 00:00:00 +0000</pubDate><author>maxhalford25@gmail.com (Max Halford)</author><guid>https://maxhalford.github.io/blog/future-of-river/</guid><description>&lt;div align="center"&gt;
&lt;figure &gt;
 &lt;img src="https://maxhalford.github.io/img/blog/future-of-river/tweet.png" style="box-shadow: none;"&gt;
 &lt;figcaption&gt;&lt;a href="https://twitter.com/josh_wills/status/1585328751646109696"&gt;Source&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/div&gt;
&lt;p&gt;When I see tweets like this one, I&amp;rsquo;m both happy because people are aware of &lt;a href="https://riverml.xyz/"&gt;River&lt;/a&gt;, but also irked because it&amp;rsquo;s really difficult to make production-grade open source software.&lt;/p&gt;
&lt;p&gt;We just had a developer meeting a week ago. We planned &lt;a href="https://github.com/orgs/online-ml/projects/3?query=is%3Aopen+sort%3Aupdated-desc"&gt;what we will work on&lt;/a&gt; during the first half of 2023. I thought it would be worthwhile to give a high-level view of how we envision River&amp;rsquo;s future. If not to be comprehensive, at least to reassure potential users that River is alive and kicking 🤺&lt;/p&gt;</description></item><item><title>Matrix inverse mini-batch updates</title><link>https://maxhalford.github.io/blog/matrix-inverse-mini-batch/</link><pubDate>Wed, 24 Aug 2022 00:00:00 +0000</pubDate><author>maxhalford25@gmail.com (Max Halford)</author><guid>https://maxhalford.github.io/blog/matrix-inverse-mini-batch/</guid><description>&lt;p&gt;The inverse covariance matrix, also called &lt;a href="https://en.wikipedia.org/wiki/Precision_matrix"&gt;precision matrix&lt;/a&gt;, is useful in many places across the field of statistics. For instance, in machine learning, it is used for &lt;a href="https://maxhalford.github.io/blog/bayesian-linear-regression"&gt;Bayesian regression&lt;/a&gt; and &lt;a href="https://scikit-learn.org/stable/modules/mixture.html#gmm"&gt;mixture modelling&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;What&amp;rsquo;s interesting is that any batch model which uses a precision matrix can be turned into an online model. That is, provided the precision matrix can be estimated in a streaming fashion. For instance, scikit-learn&amp;rsquo;s &lt;a href="https://scikit-learn.org/stable/modules/generated/sklearn.covariance.EllipticEnvelope.html#sklearn.covariance.EllipticEnvelope"&gt;elliptic envelope&lt;/a&gt; method could have an online variant with a &lt;code&gt;partial_fit&lt;/code&gt; method.&lt;/p&gt;</description></item><item><title>First IRL meetup with the River developers</title><link>https://maxhalford.github.io/blog/first-river-meetup/</link><pubDate>Thu, 09 Jun 2022 00:00:00 +0000</pubDate><author>maxhalford25@gmail.com (Max Halford)</author><guid>https://maxhalford.github.io/blog/first-river-meetup/</guid><description>&lt;p&gt;&lt;a href="https://github.com/online-ml/river/"&gt;River&lt;/a&gt; is a Python software for doing online machine learning. It&amp;rsquo;s the result of a merger in early 2020 between &lt;a href="https://github.com/online-ml/river"&gt;creme&lt;/a&gt; and &lt;a href="https://github.com/scikit-multiflow/scikit-multiflow"&gt;scikit-multiflow&lt;/a&gt;. &lt;a href="https://smastelini.github.io/"&gt;Saulo Mastelini&lt;/a&gt;, &lt;a href="https://jacobmontiel.github.io/"&gt;Jacob Montiel&lt;/a&gt;, and myself are the three core developers. But there are many more people who contribute here and there!&lt;/p&gt;
&lt;p&gt;This week Saulo Mastelini and I got to meet in person. This is worth mentioning because Saulo is originally from Brazil, whereas I&amp;rsquo;m based in Europe. We connected and I&amp;rsquo;m glad to think of him as a good friend from now on. Of course we were not alone: some friends of mine from university also joined the fun. These are people who initially contributed to creme, back in what we already call the old days! Each one of them has their own areas of expertise, and contributed to various parts of the codebase.&lt;/p&gt;</description></item><item><title>Online machine learning with River @ GAIA</title><link>https://maxhalford.github.io/blog/online-machine-learning-with-river/</link><pubDate>Thu, 07 Apr 2022 00:00:00 +0000</pubDate><author>maxhalford25@gmail.com (Max Halford)</author><guid>https://maxhalford.github.io/blog/online-machine-learning-with-river/</guid><description/></item><item><title>Online machine learning in practice @ PyData PDX</title><link>https://maxhalford.github.io/blog/online-machine-learning-in-practice-pydata-pdx/</link><pubDate>Wed, 09 Feb 2022 00:00:00 +0000</pubDate><author>maxhalford25@gmail.com (Max Halford)</author><guid>https://maxhalford.github.io/blog/online-machine-learning-in-practice-pydata-pdx/</guid><description/></item><item><title>The online machine learning predict/fit switcheroo</title><link>https://maxhalford.github.io/blog/predict-fit-switcheroo/</link><pubDate>Thu, 06 Jan 2022 00:00:00 +0000</pubDate><author>maxhalford25@gmail.com (Max Halford)</author><guid>https://maxhalford.github.io/blog/predict-fit-switcheroo/</guid><description>&lt;h2 id="why-im-writing-this"&gt;Why I&amp;rsquo;m writing this&lt;/h2&gt;
&lt;p&gt;Fact: designing open source software is hard. It&amp;rsquo;s difficult to make design decisions which don&amp;rsquo;t make any compromises. I like to fall back on Dieter Rams&amp;rsquo; &lt;a href="https://ifworlddesignguide.com/design-specials/dieter-rams-10-principles-for-good-design"&gt;10 principles for good design&lt;/a&gt;. I feel like they apply rather well to software design. Especially when said software is open source, due to the many users and the plethora of use cases.&lt;/p&gt;
&lt;p&gt;I had to make a significant design decision for &lt;a href="https://github.com/online-ml/river/"&gt;River&lt;/a&gt;. It boils down to the fact that making a prediction with a model pipeline is a stateful operation, whereas users understandably expect it to be pure with no side-effects. This regularly comes up on the issue tracker, as you can see &lt;a href="https://github.com/online-ml/river/issues/130"&gt;here&lt;/a&gt;, &lt;a href="https://github.com/online-ml/river/issues/359"&gt;here&lt;/a&gt;, and &lt;a href="https://github.com/online-ml/river/issues/499"&gt;here&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Online machine learning in practice @ Applied AI</title><link>https://maxhalford.github.io/blog/real-time-ml-next-frontier-applied-ai/</link><pubDate>Fri, 17 Dec 2021 00:00:00 +0000</pubDate><author>maxhalford25@gmail.com (Max Halford)</author><guid>https://maxhalford.github.io/blog/real-time-ml-next-frontier-applied-ai/</guid><description/></item><item><title>Online machine learning in practice @ LVMH</title><link>https://maxhalford.github.io/blog/real-time-ml-next-frontier-lvmh/</link><pubDate>Fri, 10 Dec 2021 00:00:00 +0000</pubDate><author>maxhalford25@gmail.com (Max Halford)</author><guid>https://maxhalford.github.io/blog/real-time-ml-next-frontier-lvmh/</guid><description/></item><item><title>The challenges of online machine learning in production @ Itaú Unibanco</title><link>https://maxhalford.github.io/blog/challenges-of-online-machine-learning-in-production/</link><pubDate>Fri, 26 Feb 2021 00:00:00 +0000</pubDate><author>maxhalford25@gmail.com (Max Halford)</author><guid>https://maxhalford.github.io/blog/challenges-of-online-machine-learning-in-production/</guid><description/></item><item><title>A brief introduction to online machine learning @ Hong Kong Machine Learning Meetup</title><link>https://maxhalford.github.io/blog/brief-introduction-to-online-machine-learning/</link><pubDate>Wed, 10 Jun 2020 00:00:00 +0000</pubDate><author>maxhalford25@gmail.com (Max Halford)</author><guid>https://maxhalford.github.io/blog/brief-introduction-to-online-machine-learning/</guid><description/></item><item><title>The correct way to evaluate online machine learning models</title><link>https://maxhalford.github.io/blog/online-learning-evaluation/</link><pubDate>Sun, 07 Jun 2020 00:00:00 +0000</pubDate><author>maxhalford25@gmail.com (Max Halford)</author><guid>https://maxhalford.github.io/blog/online-learning-evaluation/</guid><description>&lt;h2 id="motivation"&gt;Motivation&lt;/h2&gt;
&lt;p&gt;Most supervised machine learning algorithms work in the batch setting, whereby they are fitted on a training set offline, and are used to predict the outcomes of new samples. The only way for batch machine learning algorithms to learn from new samples is to train them from scratch with both the old samples and the new ones. Meanwhile, some learning algorithms are online, and can predict as well as update themselves when new samples are available. This encompasses any model trained with &lt;a href="https://leon.bottou.org/publications/pdf/compstat-2010.pdf"&gt;stochastic gradient descent&lt;/a&gt; &amp;ndash; which includes deep neural networks, &lt;a href="https://www.csie.ntu.edu.tw/~b97053/paper/Rendle2010FM.pdf"&gt;factorisation machines&lt;/a&gt;, and &lt;a href="https://www.cs.huji.ac.il/~shais/papers/ShalevSiSrCo10.pdf"&gt;SVMs&lt;/a&gt; &amp;ndash; as well as &lt;a href="https://homes.cs.washington.edu/~pedrod/papers/kdd00.pdf"&gt;decision trees&lt;/a&gt;, &lt;a href="https://ai.stanford.edu/~ang/papers/icml04-onlinemetric.pdf"&gt;metric learning&lt;/a&gt;, and &lt;a href="https://people.csail.mit.edu/jrennie/papers/icml03-nb.pdf"&gt;naïve Bayes&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Online machine learning with decision trees @ Toulouse AOC workgroup</title><link>https://maxhalford.github.io/blog/online-machine-learning-with-decision-trees/</link><pubDate>Thu, 07 May 2020 00:00:00 +0000</pubDate><author>maxhalford25@gmail.com (Max Halford)</author><guid>https://maxhalford.github.io/blog/online-machine-learning-with-decision-trees/</guid><description/></item><item><title>Machine learning for streaming data with creme</title><link>https://maxhalford.github.io/blog/medium-creme/</link><pubDate>Thu, 26 Mar 2020 00:00:00 +0000</pubDate><author>maxhalford25@gmail.com (Max Halford)</author><guid>https://maxhalford.github.io/blog/medium-creme/</guid><description/></item><item><title>The benefits of online machine learning @ Quantmetry</title><link>https://maxhalford.github.io/blog/the-benefits-of-online-learning-quantmetry/</link><pubDate>Tue, 29 Oct 2019 00:00:00 +0000</pubDate><author>maxhalford25@gmail.com (Max Halford)</author><guid>https://maxhalford.github.io/blog/the-benefits-of-online-learning-quantmetry/</guid><description/></item><item><title>The benefits of online machine learning @ Element AI</title><link>https://maxhalford.github.io/blog/the-benefits-of-online-learning-element-ai/</link><pubDate>Wed, 23 Oct 2019 00:00:00 +0000</pubDate><author>maxhalford25@gmail.com (Max Halford)</author><guid>https://maxhalford.github.io/blog/the-benefits-of-online-learning-element-ai/</guid><description/></item><item><title>The benefits of online machine learning @ Airbus Bizlab</title><link>https://maxhalford.github.io/blog/the-benefits-of-online-learning-airbus-bizlab/</link><pubDate>Fri, 28 Jun 2019 00:00:00 +0000</pubDate><author>maxhalford25@gmail.com (Max Halford)</author><guid>https://maxhalford.github.io/blog/the-benefits-of-online-learning-airbus-bizlab/</guid><description/></item><item><title>Machine learning incrémental: des concepts à la pratique @ Toulouse Data Science Meetup</title><link>https://maxhalford.github.io/blog/machine-learning-incremental-tds/</link><pubDate>Tue, 28 May 2019 00:00:00 +0000</pubDate><author>maxhalford25@gmail.com (Max Halford)</author><guid>https://maxhalford.github.io/blog/machine-learning-incremental-tds/</guid><description/></item><item><title>Online machine learning with creme @ PyData Amsterdam</title><link>https://maxhalford.github.io/blog/online-machine-learning-with-creme-pydata/</link><pubDate>Sat, 11 May 2019 00:00:00 +0000</pubDate><author>maxhalford25@gmail.com (Max Halford)</author><guid>https://maxhalford.github.io/blog/online-machine-learning-with-creme-pydata/</guid><description/></item><item><title>Streaming groupbys in pandas for big datasets</title><link>https://maxhalford.github.io/blog/pandas-streaming-groupby/</link><pubDate>Wed, 05 Dec 2018 00:00:00 +0000</pubDate><author>maxhalford25@gmail.com (Max Halford)</author><guid>https://maxhalford.github.io/blog/pandas-streaming-groupby/</guid><description>&lt;p&gt;If you&amp;rsquo;ve done a bit of Kaggling, then you&amp;rsquo;ve probably been typing a fair share of &lt;code&gt;df.groupby(some_col)&lt;/code&gt;. That is, if you&amp;rsquo;re using Python. If you&amp;rsquo;re handling tabular data, then a lot of your features will revolve around computing &lt;em&gt;aggregate statistics&lt;/em&gt;. This is very true for the ongoing &lt;a href="https://www.kaggle.com/c/PLAsTiCC-2018"&gt;PLAsTiCC Astronomical Classification challenge&lt;/a&gt;. The goal of the competition is to classify objects in the sky into one of 14 groups. The bulk of the available data is a set of so-called &lt;em&gt;light curve&lt;/em&gt;. A light curve is a sequence of brightness measures observations along time. Each light curve is filtered at different passbands. The idea is that there is one light curve per passband and per object and that the shape of each light curve should tell us what kind of object we&amp;rsquo;re looking at. Yada yada.&lt;/p&gt;</description></item></channel></rss>